From e52d63bfef0d4b9baccffbb8797d21d7c60890db Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 20 Mar 2019 15:04:40 -0300 Subject: Can't jump with pets to Lilit v.v --- npc/017-1/drowned_man.txt | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'npc') 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)) -- cgit v1.2.3-60-g2f50