From a9501b1034e8eb12a754ca01004ac85e3b61abc8 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 19 Sep 2018 11:19:27 -0300 Subject: You should be able to teleport as long that HP > 90% (or you're in town) Not sure if this will work --- npc/items/teleporter.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'npc/items') 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: -- cgit v1.2.3-60-g2f50