Created
September 21, 2019 03:25
-
-
Save sunasaji/6a5024c852c326b03f96f85bd7405ffb to your computer and use it in GitHub Desktop.
Vケット3のワールドを順次ロードするuwscスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//vket3_world_loader | |
//Vケット3のワールドを順次ロードするuwscスクリプト | |
//License: CC0 | |
PUBLIC instance_id, check_interval, user_id | |
//使い方 | |
// 下記のuser_idの「usr_xxx...」の部分に、自分のユーザIDを設定して保存し、 | |
// 保存したスクリプトをUWSC.exeにドラッグ&ドロップして放置する。 | |
// 数分おきにVRCウィンドウがアクティブになり、ワールドが自動でロードされる。 | |
user_id = "usr_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | |
// 自分のユーザIDは、 | |
// vrchat.netにログインして、左上の自分のアイコンをクリックすると | |
// ブラウザのアドレスバーに出る「usr_」から始まる文字列。 | |
//インスタンスIDをランダム生成 | |
instance_id=int(random(100000)) | |
//ワールドロード完了をチェックする間隔 | |
check_interval = 200 | |
// Vket3 Entrance | |
World_Open("wrld_bdecb2dd-3b53-4184-9573-aece548263d2") | |
// Vket3 NeoShibuya-Day | |
World_Open("wrld_9b2ba0d9-a3ca-42fa-bd14-f6aa7d5ad5db") | |
// Vket3 NeoShibuya-Night | |
World_Open("wrld_81948c1e-66fe-414c-887d-843838615dd3") | |
// Vket3 NeoShibuya-Error | |
World_Open("wrld_3d2318fe-730e-4958-babb-3279fb31cc75") | |
// Vket3 VirtualPlant-Factory | |
World_Open("wrld_c2d84589-e873-436a-915a-6fff52937221") | |
// Vket3 VirtualPlant-Hangar | |
World_Open("wrld_670e57b6-9475-4a68-aca4-81dd5fde54c7") | |
// Vket3 PrettyPopParty-Pastel | |
World_Open("wrld_e7082274-b794-4369-82ec-5b4752d81dd8") | |
// Vket3 PrettyPopParty-Vivid | |
World_Open("wrld_b6c246d9-163c-4f5f-8893-54e0b674efef") | |
// Vket3 CastelloMagica-Hall | |
World_Open("wrld_aeb86975-274b-475a-bab1-03f9076c7b2e") | |
// Vket3 CastelloMagica-Library | |
World_Open("wrld_da7330ea-cf41-4f00-b289-dfc9677a5027") | |
// Vket3 CastelloMagica-Laboratory | |
World_Open("wrld_dbc6d41f-3b04-4a99-817a-be66004d31a5") | |
// Vket3 SkyIsland-Forest | |
World_Open("wrld_abc47a3d-75f1-4167-b049-6a43f7533435") | |
// Vket3 SkyIsland-Mountain | |
World_Open("wrld_92ead54a-28f8-4714-8d69-9999325d6170") | |
// Vket3 SkyIsland-Sea | |
World_Open("wrld_63c113f1-093d-4c27-b6d0-5160c39f1d91") | |
// Vket3 KowloonEmpire-SanbanBoulevard | |
World_Open("wrld_d98e39e4-ddb0-4e8f-b2b0-dad00eb3f693") | |
// Vket3 KowloonEmpire-KetsubanAlley | |
World_Open("wrld_fc4e6c7d-8f17-4e96-ba45-d4148d4a6811") | |
// Vket3 Quest | |
World_Open("wrld_b4850cd2-5bfc-4151-af17-a1e2f33a9b66") | |
//ワールドを開いて、ロード完了を待つ | |
function World_Open(str) | |
world_url = "vrchat://launch/?id=" + str + ":" + instance_id + "~private(" + user_id + ")" | |
while True | |
if World_Load_End() | |
exec("cmd /c start=" + world_url ) | |
sleep(check_interval) | |
Result = true | |
break | |
else | |
sleep(check_interval) | |
endif | |
wend | |
fend | |
// ワールドロード中はfalse、それ以外はtrue、ロード中の画面の色(青緑)で判定 | |
function World_Load_End() | |
// VRCウィンドウのID取得 | |
w_id = getid( "VRChat" ) | |
mouseorg( w_id ,2 ,MORG_FORE ) | |
// VRCウィンドウをアクティブにする | |
acw(w_id) | |
c = PeekColor(100, 100) | |
c_r = Color_Red(c) | |
c_g = Color_Green(c) | |
c_b = Color_Blue(c) | |
//ロード中の緑色が表示されているか判定 | |
if (c_r < 5) and (c_g > 52) and (c_g < 72) and (c_b > 55) and (c_b < 75) | |
Result = false | |
else | |
Result = true | |
sleep(60) | |
//VRChatウィンドウを閉じる | |
ctrlwin(w_id, CLOSE) | |
sleep(20) | |
endif | |
fend | |
// 色取得 | |
function Color_Red(c) | |
Result = c and $FF | |
fend | |
function Color_Green(c) | |
Result = (c and $FF00) / $100 | |
fend | |
function Color_Blue(c) | |
Result = (c and $FF0000) / $10000 | |
fend |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment