mirror of https://github.com/KingRan/KR.git
22 lines
96 KiB
JavaScript
22 lines
96 KiB
JavaScript
|
/*
|
|||
|
JOY_COIN_MAXIMIZE = 最大化硬币收益,如果合成后全部挖土后还有空位,则开启此模式(默认开启) 0关闭 1开启
|
|||
|
|
|||
|
请确保新用户助力过开工位,否则开启游戏了就不算新用户,后面就不能助力开工位了!!!!!!!!!!
|
|||
|
|
|||
|
如需关闭请添加变量,变量名:HELP_JOYPARK,变量值:false
|
|||
|
|
|||
|
此游戏黑号严重,所以请自行定时,火爆后停止放置一段时间恢复
|
|||
|
|
|||
|
做合成 购买等,无助力,无任务
|
|||
|
|
|||
|
============Quantumultx===============
|
|||
|
|
|||
|
[task_local]
|
|||
|
#京东版-汪汪庄园
|
|||
|
1 1 1 1 * jd_wwzy.js, tag=京东版-汪汪庄园, enabled=true
|
|||
|
*/
|
|||
|
const $ = new Env('京东版-汪汪庄园');
|
|||
|
var version_='jsjiami.com.v7';const Ililil=iii1II;(function(l1iii1,iiilIl,Il1ilI,iIliIl,l1Illi,iiilIi,l1Illl){return l1iii1=l1iii1>>0x1,iiilIi='hs',l1Illl='hs',function(Ii111I,iI11ll,liIl1i,liIl1l,IIiII1){const Il1il1=iii1II;liIl1l='tfi',iiilIi=liIl1l+iiilIi,IIiII1='up',l1Illl+=IIiII1,iiilIi=liIl1i(iiilIi),l1Illl=liIl1i(l1Illl),liIl1i=0x0;const lIi1I=Ii111I();while(!![]&&--iIliIl+iI11ll){try{liIl1l=parseInt(Il1il1(0x3f8,'N9sb'))/0x1+parseInt(Il1il1(0x464,'pMwZ'))/0x2*(parseInt(Il1il1(0x20b,'@r]M'))/0x3)+parseInt(Il1il1(0x1ff,'s4W6'))/0x4*(parseInt(Il1il1(0x462,'s4W6'))/0x5)+parseInt(Il1il1(0x3cb,'oscf'))/0x6*(parseInt(Il1il1(0x4a6,'Siy4'))/0x7)+parseInt(Il1il1(0x2a6,'dnhS'))/0x8*(-parseInt(Il1il1(0x51a,'H!Bb'))/0x9)+-parseInt(Il1il1(0x273,'r6w('))/0xa*(-parseInt(Il1il1(0x49d,'0qsL'))/0xb)+-parseInt(Il1il1(0x488,'rj9J'))/0xc;}catch(Ii1111){liIl1l=liIl1i;}finally{IIiII1=lIi1I[iiilIi]();if(l1iii1<=iIliIl)liIl1i?l1Illi?liIl1l=IIiII1:l1Illi=IIiII1:liIl1i=IIiII1;else{if(liIl1i==l1Illi['replace'](/[IplyfOegCquxXrNPktK=]/g,'')){if(liIl1l===iI11ll){lIi1I['un'+iiilIi](IIiII1);break;}lIi1I[l1Illl](IIiII1);}}}}}(Il1ilI,iiilIl,function(Ill1li,Ililii,I111ll,I1liIi,I1ii1i,I1ii1l,iIii1){return Ililii='\x73\x70\x6c\x69\x74',Ill1li=arguments[0x0],Ill1li=Ill1li[Ililii](''),I111ll='\x72\x65\x76\x65\x72\x73\x65',Ill1li=Ill1li[I111ll]('\x76'),I1liIi='\x6a\x6f\x69\x6e',(0x1394e7,Ill1li[I1liIi](''));});}(0x17e,0xa201b,Iii11l,0xc1),Iii11l)&&(version_=Iii11l);const liI111=$[Ililil(0x34a,'r#fh')]()?require(Ililil(0x449,'r6w(')):'',IiIlI=$[Ililil(0x30e,'$u7K')]()?require('./sendNotify'):'',iIlI1i=require(Ililil(0x38b,'@r]M')),iII1Il=require('./function/krgetua');let IIIliI=[],iII1Ii='',iIlI1l=![],llIill=0x0,l1IIii;if($[Ililil(0x23c,'rj9J')]()){Object['keys'](liI111)['forEach'](illiii=>{const Ill1ll=Ililil;IIIliI[Ill1ll(0x201,'cQG7')](liI111[illiii]);});if(process[Ililil(0x2d2,'PhsM')][Ililil(0x56e,'N9sb')]&&process[Ililil(0x3eb,'0qsL')][Ililil(0x3f9,'HyIt')]==='false')console[Ililil(0x3d2,'dnhS')]=()=>{};}else IIIliI=[$['getdata'](Ililil(0x563,'bJXc')),$[Ililil(0x2f7,'PGg5')](Ililil(0x5b2,'Femh')),...lIIi11($[Ililil(0x4bb,'Femh')](Ililil(0x5b0,'r6w('))||'[]')[Ililil(0x375,'cQG7')](IIIll1=>IIIll1[Ililil(0x1bd,'pMwZ')])][Ililil(0x27d,'a#F2')](illiil=>!!illiil);$['JOY_COIN_MAXIMIZE']=process['env'][Ililil(0x20a,'Vwt*')]==='1',$['log'](Ililil(0x533,'N9sb')+($[Ililil(0x517,'0qsL')]?Ililil(0x3e2,'oscf'):'关闭')+'\x20\x20');let lIIi1I=Date[Ililil(0x3b2,'bJXc')]();const l1IIil=Ililil(0x335,'$u7K');message='',!(async()=>{const I1liIl=Ililil,liI11l={'bkWaF':function(l1l1i,I1I1II){return l1l1i+I1I1II;},'BnbsO':'失败次数多,避免死循环,跳出!','iHdPk':function(i11ll,Ili11I){return i11ll===Ili11I;},'kJNYI':I1liIl(0x1bb,'PhsM'),'erIaS':I1liIl(0x34f,'Wx2$'),'UOIBm':I1liIl(0x4f5,'U8kA'),'RDciC':function(i11li,Illil){return i11li===Illil;},'vIaOJ':I1liIl(0x51c,'EWgf'),'QjdqZ':I1liIl(0x504,'F@YA'),'fYkDD':function(iil11i,Ill1II){return iil11i!==Ill1II;},'TmrqT':function(llIili,Illii){return llIili(Illii);},'rqEai':I1liIl(0x38d,'0qsL'),'GszHc':function(iIlI11,IIII){return iIlI11+IIII;},'XEhqX':function(l1IIlI,iil111){return l1IIlI+iil111;},'ATUsh':function(llIil1,iiiIII){return llIil1+iiiIII;},'YAMLb':I1liIl(0x39b,'N9sb'),'iDwNt':function(Ill1I1,lIi1ii){return Ill1I1==lIi1ii;},'mJeMU':function(lIi1il,liI11i){return lIi1il===liI11i;},'SYduS':'sKyat','acJue':'KCIZu','vxhyU':I1liIl(0x54f,'rj9J'),'JLoYZ':I1liIl(0x4f7,'ElHJ'),'VglnW':I1liIl(0x289,'PL$P'),'JEkQj':'Zi6CMKqNUANQa1m3j3NulA','WjHhS':'s1HgT4EXmMeUQzWIrsk4Ag','rjaxd':function(l1l1l,illilI){return l1l1l*illilI;},'xBRvS':function(IiIli,illil1,IIIlii){return IiIli(illil1,IIIlii);},'lFxnA':function(iil11I,iII1II){return iil11I+iII1II;},'RmPHW':function(IiIll,llIilI){return IiIll*llIilI;},'yvfuD':function(IlliI,I1I1I1,IIIlil){return IlliI(I1I1I1,IIIlil);},'jgJAY':function(Ili111,Il11){return Ili111*Il11;},'EfHKl':function(iiil11,llII1I,ilI1II){return iiil11(llII1I,ilI1II);},'fUZgR':function(iillI1,i11l1){return iillI1+i11l1;},'IqzHo':function(IlllI,iliIl){return IlllI*iliIl;},'shalg':function(ii1i11
|
|||
|
// prettier-ignore
|
|||
|
function Env(t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); class s { constructor(t) { this.env = t } send(t, e = "GET") { t = "string" == typeof t ? { url: t } : t; let s = this.get; return "POST" === e && (s = this.post), new Promise((e, i) => { s.call(this, t, (t, s, r) => { t ? i(t) : e(s) }) }) } get(t) { return this.send.call(this.env, t) } post(t) { return this.send.call(this.env, t, "POST") } } return new class { constructor(t, e) { this.name = t, this.http = new s(this), this.data = null, this.dataFile = "box.dat", this.logs = [], this.isMute = !1, this.isNeedRewrite = !1, this.logSeparator = "\n", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const i = this.getdata(t); if (i) try { s = JSON.parse(this.getdata(t)) } catch { } return s } setjson(t, e) { try { return this.setdata(JSON.stringify(t), e) } catch { return !1 } } getScript(t) { return new Promise(e => { this.get({ url: t }, (t, s, i) => e(i)) }) } runScript(t, e) { return new Promise(s => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [o, h] = i.split("@"), n = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(n, (t, e, i) => s(i)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e); if (!s && !i) return {}; { const i = s ? t : e; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of i) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, e, s) { return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, i, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}"; try { const e = JSON.parse(h); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i) } catch (e) { const o = {}; this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i) } } else s = this.setval(t, e); return s } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.d
|