summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-09-19 11:19:27 -0300
committerJesusaves <cpntb1@ymail.com>2018-09-19 11:19:27 -0300
commita9501b1034e8eb12a754ca01004ac85e3b61abc8 (patch)
tree4ca07409775fc7592e8af53c7813df3da27c62aa
parentfcaef924e5cbc86e8b6f722772c054a2b17a2c14 (diff)
downloadserverdata-a9501b1034e8eb12a754ca01004ac85e3b61abc8.tar.gz
serverdata-a9501b1034e8eb12a754ca01004ac85e3b61abc8.tar.bz2
serverdata-a9501b1034e8eb12a754ca01004ac85e3b61abc8.tar.xz
serverdata-a9501b1034e8eb12a754ca01004ac85e3b61abc8.zip
You should be able to teleport as long that HP > 90% (or you're in town)
Not sure if this will work
-rw-r--r--npc/items/teleporter.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/npc/items/teleporter.txt b/npc/items/teleporter.txt
index 595dd9be8..d956ec3f1 100644
--- a/npc/items/teleporter.txt
+++ b/npc/items/teleporter.txt
@@ -11,7 +11,9 @@
// Checks if you can warp
function loftel_check {
getmapxy(.@m$, .@x, .@y, 0);
- return (readparam(Hp) < readparam(MaxHp) && !getmapflag(.@m$, mf_town));
+ .@is_hurt=(readparam(Hp) < readparam(MaxHp)*9/10); // <90% hp
+ .@is_town=(getmapflag(.@m$, mf_town));
+ return (.@is_hurt && !.@is_town);
}
L_Cooldown: