From 8a4bf716002a017de77fe7df301ef8e4aaf00a2e Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 9 Apr 2021 11:00:49 -0300 Subject: Initial commit --- npc/001-1/rowboathelper.txt | 141 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 npc/001-1/rowboathelper.txt (limited to 'npc/001-1/rowboathelper.txt') diff --git a/npc/001-1/rowboathelper.txt b/npc/001-1/rowboathelper.txt new file mode 100644 index 00000000..d7809bf0 --- /dev/null +++ b/npc/001-1/rowboathelper.txt @@ -0,0 +1,141 @@ +// Evol scripts. +// Author: +// Toams +// Description: +// helper scripts for rowboat usage +// Notes: +// Curious Hole bypass the cutscenes + +// calling the Rowboat +001-1,200,60,0 script Curious Hole NPC_NO_SPRITE,{ + + .@q = getq(General_Narrator); + + mesc l("You see a curious hole behind some rocks."); + next; + mesn strcharinfo(0); + mesq l("Hey, anyone there?"); + next; + mesc l("..."); + next; + if (.@q < 2) + { + mesc l("Altough you can't get rid of the feeling someone is listening on the other side, you don't get any replies."); + close; + } + else + { + narrator(S_LAST_BLANK_LINE | S_LAST_NEXT, + l("Suddenly you remember the strange phrase Mona overheard Sophialla saying"), + l("Maybe you should try this phrase?")); + if (askyesno() == ASK_YES) + { + mesn strcharinfo(0); + mesc l("Sagratha is great."); + next; + + if (getvariableofnpc(.caller, "#Rowboat")) { + // Can you use it, or is it in grace time? + if (getvariableofnpc(.clocks, "#Rowboat") > gettimetick(2)) { + mesn; + mesq l("Please be patient. Someone else is using the rowboat right now."); + close; + } + // Rowboat already there, so change owner + mesn; + mesq l("Hello, a rowboat is already on the beach. You can use it."); + set(getvariableofnpc(.caller, "#Rowboat"), getcharid(3)); + set(getvariableofnpc(.clocks, "#Rowboat"), gettimetick(2)+15); + close; + } + // Rowboat is at hideout, send it to you + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("Hello, a rowboat is on his way to the beach. Please wait for a while for it to arrive."); + + set(getvariableofnpc(.caller, "#Rowboat"), getcharid(3)); + set(getvariableofnpc(.clocks, "#Rowboat"), gettimetick(2)+30); + doevent("#Rowboat::OnMoveToBeach"); + close; + } + else + close; + } + +OnInit: + .distance = 1; +} + +// UNUSED +//unmounting the rowboat at eastern beach +001-1,202,62,0 script unmountrowboateast NPC_HIDDEN,1,1,{ + + function UnMount { + narrator(S_LAST_BLANK_LINE | S_LAST_NEXT, + l("Do you want to leave the boat?")); + if (askyesno() == ASK_YES) + { + slide_or_warp("001-1", 199, 62); + setmount 0; + close; + } +} + +OnTouch: + UnMount; + end; + +OnInit: + .distance = 1; +} + + +//unmounting the rowboat at southern beach +001-1,68,143,0 script unmountrowboatsouth NPC_HIDDEN,1,1,{ + + function UnMount { + narrator(S_LAST_BLANK_LINE | S_LAST_NEXT, + l("Do you want to leave the boat?")); + if (askyesno() == ASK_YES) + { + slide_or_warp("001-1", 68, 138); + setmount 0; + close; + } +} + +OnTouch: + UnMount; + end; + +OnInit: + .distance = 1; +} + + +//unmounting the rowboat at western beach +001-1,25,101,0 script unmountrowboatwest NPC_HIDDEN,1,1,{ + + function UnMount { + narrator(S_LAST_BLANK_LINE | S_LAST_NEXT, + l("Do you want to leave the boat?")); + if (askyesno() == ASK_YES) + { + slide_or_warp("001-1", 27, 101); + setmount 0; + close; + } +} + +OnTouch: + UnMount; + end; + +OnInit: + .distance = 1; +} + +function script ForcedUnmount { + setmount 0; + return; +} + -- cgit v1.2.3-60-g2f50