Update version 9 & Fix

This commit is contained in:
StageGuard
2020-07-30 10:18:13 +08:00
parent 7e38f980d5
commit b8674f1f0d
4 changed files with 97 additions and 40 deletions

View File

@@ -10,7 +10,19 @@ A script to play Sheets generated by SkyStudio automatically in game Sky with ac
"use strict";
var emitter = events.emitter(threads.currentThread());
threads.start(function() {
emitter.emit("evaluate", http.get("https://cdn.jsdelivr.net/gh/StageGuard/SkyAutoPlayerScript@" + http.get("https://gitee.com/stageguard/SkyAutoPlayerScript/raw/master/gitVersion").body.string() + "/source/SkyAutoplayer.js").body.string());
emitter.emit("evaluate", (function(){
var resp = http.get("https://gitee.com/stageguard/SkyAutoPlayerScript/raw/master/source/SkyAutoplayer.js");
if(resp.statusCode >= 200 && resp.statusCode < 300) {
return resp.body.string();
} else {
resp = http.get("https://cdn.jsdelivr.net/gh/StageGuard/SkyAutoPlayerScript@" + http.get("https://gitee.com/stageguard/SkyAutoPlayerScript/raw/master/gitVersion").body.string() + "/source/SkyAutoplayer.js");
if(resp.statusCode >= 200 && resp.statusCode < 300) {
return resp.body.string();
} else {
return "console.show();console.log(\"Failed to load script\")";
}
}
}()));
});
emitter.on('evaluate', function(s){
eval(s);