Greasy Fork is available in English.
Currently trusted by over 100,000 users!
< Обсуждения ScriptSource: The Leading Portal for Web Apps [YouTube/Quora/Reddit/Discord/+More]
Here is the code for pizza. Please update it
Please update code of pizza, I did an update but you reported me to remove. So here you can use:
var hasCookie = false; var hasPizza = false; function heal(){ if (recentHealth>=100) return; console.log(recentHealth); console.log(HERE I AM IN THE HEAL FUNC with null{hasApple}); var dataTemplate = {"data":[], "options":{"compress":false}, "nsp": "/", "type": 2}; if (hasApple){ if (!haveApple()){ hasCookie = true; heal(); return; } else { //User has apple var data2 = dataTemplate; data2['data'] = ["5", 0, null]; ws.send(encodeSEND(data2)); } } else { if (hasCookie){ if (!haveCookie()){ hasCookie = false; hasPizza = true; heal(); return; } else { console.log('user has cookie'); var data2 = dataTemplate; data2['data'] = ["5", 1, null]; ws.send(encodeSEND(data2)); } } else { if (hasPizza){ if (!havePizza()){ hasPizza = false; heal(); return; } else { console.log('user has pizza'); var data2 = dataTemplate; data2['data'] = ["5", 2, null]; ws.send(encodeSEND(data2)); } } } } dataTemplate["data"]=["4", 1, null]; let encoded = encodeSEND(dataTemplate); ws.send(encoded); recentHealth += hasApple ? 20 : 40; } function haveApple(){ console.log("Im being used and justDied is:" + justDied); if (justDied){ hasApple = true; return true; } if (hasApple) hasApple = isElementVisible(document.getElementById("actionBarItem13")); return hasApple; } function haveCookie(){ if (hasCookie) hasCookie = isElementVisible(document.getElementById("actionBarItem14")); return hasCookie; } function havePizza(){ if (hasPizza) hasPizza = isElementVisible(document.getElementById("actionBarItem15")); return hasPizza; }
HERE I AM IN THE HEAL FUNC with null{hasApple}
not work
Войдите, чтобы ответить.
Here is the code for pizza. Please update it
Please update code of pizza, I did an update but you reported me to remove. So here you can use:
var hasCookie = false; var hasPizza = false; function heal(){ if (recentHealth>=100) return; console.log(recentHealth); console.log(
HERE I AM IN THE HEAL FUNC with null{hasApple}
); var dataTemplate = {"data":[], "options":{"compress":false}, "nsp": "/", "type": 2}; if (hasApple){ if (!haveApple()){ hasCookie = true; heal(); return; } else { //User has apple var data2 = dataTemplate; data2['data'] = ["5", 0, null]; ws.send(encodeSEND(data2)); } } else { if (hasCookie){ if (!haveCookie()){ hasCookie = false; hasPizza = true; heal(); return; } else { console.log('user has cookie'); var data2 = dataTemplate; data2['data'] = ["5", 1, null]; ws.send(encodeSEND(data2)); } } else { if (hasPizza){ if (!havePizza()){ hasPizza = false; heal(); return; } else { console.log('user has pizza'); var data2 = dataTemplate; data2['data'] = ["5", 2, null]; ws.send(encodeSEND(data2)); } } } } dataTemplate["data"]=["4", 1, null]; let encoded = encodeSEND(dataTemplate); ws.send(encoded); recentHealth += hasApple ? 20 : 40; } function haveApple(){ console.log("Im being used and justDied is:" + justDied); if (justDied){ hasApple = true; return true; } if (hasApple) hasApple = isElementVisible(document.getElementById("actionBarItem13")); return hasApple; } function haveCookie(){ if (hasCookie) hasCookie = isElementVisible(document.getElementById("actionBarItem14")); return hasCookie; } function havePizza(){ if (hasPizza) hasPizza = isElementVisible(document.getElementById("actionBarItem15")); return hasPizza; }