Created
September 25, 2019 15:48
-
-
Save sunasaji/20c6e15ba88c4c76ac312f29e901ad22 to your computer and use it in GitHub Desktop.
落選マーケットのワールドを順次ロードする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
//ochimake_world_loader | |
//落選マーケットのワールドを順次ロードする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 = 300 | |
// RAKUSEN MARKET - A / B | |
World_Open("wrld_452930cc-5105-4e7e-bd79-1d94f1690dbd") | |
// RAKUSEN MARKET - C / D | |
World_Open("wrld_9cee5c26-97a9-4129-b21a-902954f3a8c9") | |
// RAKUSEN MARKET - E / F | |
World_Open("wrld_21dbe0f5-abf1-4fee-9825-a3776caba5fd") | |
//ワールドを開いて、ロード完了を待つ | |
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