summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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: