Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function LifeWatch(life) {
- if (NTConfig_LifeThresh > 0 && life < Math.floor(me.hpmax * NTConfig_LifeThresh / 100)) {
- NTLW_DrinkPotInt(0);
- }
- if (NTConfig_LifeRejuvThresh > 0 && life < Math.floor(me.hpmax * NTConfig_LifeRejuvThresh / 100)) {
- NTLW_DrinkPotInt(2);
- }
- if (NTConfig_LifeChicken > 0 && !NTC_InTown() && life <= Math.floor(me.hpmax * NTConfig_LifeChicken / 100)) {
- scriptBroadcast("chicken");
- }
- }
- addEventListener("melife", LifeWatch);
- function ScriptMsg(msg) {
- if (msg === "chicken") {
- quit();
- }
- }
- addEventListener("scriptmsg", ScriptMsg);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement