summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/items/teleporter.txt24
1 files changed, 18 insertions, 6 deletions
diff --git a/npc/items/teleporter.txt b/npc/items/teleporter.txt
index 9679d280e..3abfc210e 100644
--- a/npc/items/teleporter.txt
+++ b/npc/items/teleporter.txt
@@ -17,6 +17,10 @@ L_Cooldown:
OnUse:
if (TELEPORTER_TIME > gettimetick(2))
goto L_Cooldown;
+ if (readparam(Hp) < readparam(MaxHp)) {
+ dispbottom l("You are hurt, and cannot use this.");
+ end;
+ }
mesn;
mesc l("Ozthokk, a great sage from the Land Of Fire, holds secrets of time and space travel.");
@@ -33,16 +37,24 @@ OnUse:
close;
L_Save:
- doevent "shake::OnGM";
- warp "Save", 0, 0;
- TELEPORTER_TIME=gettimetick(2)+(60*30);
+ if (readparam(Hp) < readparam(MaxHp)) {
+ dispbottom l("You are hurt, and cannot use this.");
+ } else {
+ doevent "shake::OnGM";
+ warp "Save", 0, 0;
+ TELEPORTER_TIME=gettimetick(2)+(60*30);
+ }
closedialog;
end;
L_LoF:
- doevent "shake::OnGM";
- warp "017-1", 0, 0;
- TELEPORTER_TIME=gettimetick(2)+(60*30);
+ if (readparam(Hp) < readparam(MaxHp)) {
+ dispbottom l("You are hurt, and cannot use this.");
+ } else {
+ doevent "shake::OnGM";
+ warp "017-1", 0, 0;
+ TELEPORTER_TIME=gettimetick(2)+(60*30);
+ }
closedialog;
end;
}