summaryrefslogtreecommitdiff
path: root/npc/items
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-07-09 12:29:10 -0300
committerJesusaves <cpntb1@ymail.com>2018-07-09 12:29:10 -0300
commitdf47304d11b9b38c5d61374b6f37a407b6f78aa4 (patch)
tree95d47b005144212a00b681196be6fcb0f830ff78 /npc/items
parentf53d673e4fb16502df10f8e6bd6ec03015a34d79 (diff)
downloadserverdata-df47304d11b9b38c5d61374b6f37a407b6f78aa4.tar.gz
serverdata-df47304d11b9b38c5d61374b6f37a407b6f78aa4.tar.bz2
serverdata-df47304d11b9b38c5d61374b6f37a407b6f78aa4.tar.xz
serverdata-df47304d11b9b38c5d61374b6f37a407b6f78aa4.zip
Cannot use teleporter if hurt
Diffstat (limited to 'npc/items')
-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;
}