summaryrefslogtreecommitdiff
path: root/npc/017-1/drowned_man.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/017-1/drowned_man.txt')
-rw-r--r--npc/017-1/drowned_man.txt19
1 files changed, 18 insertions, 1 deletions
diff --git a/npc/017-1/drowned_man.txt b/npc/017-1/drowned_man.txt
index 1b0477b08..b325debc9 100644
--- a/npc/017-1/drowned_man.txt
+++ b/npc/017-1/drowned_man.txt
@@ -96,12 +96,29 @@ OnInit:
// Of course, I could use a blackbox too, but this is not the purpose.
// You don't want to solve the map hint, then you'll solve my formula!! /tableflip
017-1,162,226,0 script #JumpArea01 NPC_NO_SPRITE,0,0,{
- // TODO: Check if you want to jump
+ // Are you in the bridge?
if (!isin("017-1", 158, 222, 1))
end;
+
+ // Rate-limited? (3 seconds rate limit)
+ if (@nojump <= gettimetick(0)+3)
+ end;
+
mesc l("Are you really going to jump here?");
next;
if (askyesno() == ASK_YES) {
+ // Can't jump with pets
+ getinventorylist();
+ for (.@i=4000; .@i < 4015 ; .@i++) {
+ if (array_find(@inventorylist_id[], .@i) >= 0) {
+ mesc l("Can't bring pets with you..."), 1;
+ next;
+ mesc l("Do you really think the poor creature should jump a bridge in water and DIE?"), 1;
+ @nojump=gettimetick(0);
+ close;
+ }
+ }
+ // Do the jump!
closeclientdialog;
slide .x, .y;
if (VarDiffValue(5220, 5270, .x*32) && VarDiffValue(7330, 7390, .y*32))