diff options
author | wushin <pasekei@gmail.com> | 2014-04-11 14:04:55 -0500 |
---|---|---|
committer | wushin <pasekei@gmail.com> | 2014-04-15 20:26:28 -0500 |
commit | 6e9543af67c5e027269bfc32e9c6f36111f3832a (patch) | |
tree | e18deac399a030b18b2e257060d8f435a13bd082 /world/map/npc/042-1/hasan.txt | |
parent | 7632f53fd6f0c2accf45983d2885ef596d4bee7e (diff) | |
download | serverdata-6e9543af67c5e027269bfc32e9c6f36111f3832a.tar.gz serverdata-6e9543af67c5e027269bfc32e9c6f36111f3832a.tar.bz2 serverdata-6e9543af67c5e027269bfc32e9c6f36111f3832a.tar.xz serverdata-6e9543af67c5e027269bfc32e9c6f36111f3832a.zip |
Tutorial Edit
Switched to Bit mask
Map Edits for the New Maps
Less requirements to get out
Diffstat (limited to 'world/map/npc/042-1/hasan.txt')
-rw-r--r-- | world/map/npc/042-1/hasan.txt | 174 |
1 files changed, 78 insertions, 96 deletions
diff --git a/world/map/npc/042-1/hasan.txt b/world/map/npc/042-1/hasan.txt index dc9ff3e4..25f7ff86 100644 --- a/world/map/npc/042-1/hasan.txt +++ b/world/map/npc/042-1/hasan.txt @@ -1,31 +1,28 @@ // This file is part of the Tutorial // Authors: Jenalya, alastrim -042-1.gat,90,61,0|script|Hasan|189, +042-1.gat,116,84,0|script|Hasan|189,0,2, { - set @toll, 10000; - set @x, getx(); - set @y, gety(); + goto L_Main; +L_Main: if (FLAGS & FLAG_TUTORIAL_DONE) goto L_Tut_Done; - // Please consider rewriting this in terms of isin() - // it's not that trivial to put this in a rectangle... - if ( (@y < 58)&&(@x < 89) || (@x < 87) ) - goto L_Cliff_Up; + + set @toll, 10000; + callfunc "TutorialState"; // implicitly, $@ScorpionFighter is nonzero - if (getcharid(3) == $@ScorpionFighter) - goto L_Fear; - if (hasan == 4) + if (@tutorial == 13) goto L_Thank; - if (hasan == 3) + if ((getcharid(3) == $@ScorpionFighter) || ($@ScorpionFighter && $@ScorpionFighter != getcharid(3))) + goto L_Afraid; + if (@tutorial == 12) goto L_Trick; - if (hasan > 0) + if ((@tutorial == 10) || (@tutorial == 11)) goto L_Toll; mes "[Unfriendly Guy]"; mes "\"Hey! You can't pass here.\""; - next; menu "Why not?",L_Next, "Who says that?",L_Next; @@ -33,20 +30,25 @@ L_Next: mes "[Unfriendly Guy]"; mes "\"I, Hasan the Mighty, have decided to put a toll on this path.\""; + set @tutorial_tmp, 10; + callfunc "SetTutorialMask"; next; goto L_Toll; L_Toll: mes "[Hasan]"; mes "\"Give me " + @toll + "GP, and I may let you pass.\""; - if (hasan == 0) - set hasan, 1; - next; if (Zeny >= @toll) - menu - "Ok, here you go.",L_Pay, - "What? I don't have that much money!",L_NoPay, - "We'll see if you can stop me!",L_Fight; + goto L_HasToll; + goto L_NoToll; + +L_HasToll: + menu + "Ok, here you go.",L_Pay, + "What? I don't have that much money!",L_NoPay, + "We'll see if you can stop me!",L_Fight; + +L_NoToll: menu "What? I don't have that much money!",L_NoPay, "We'll see if you can stop me!",L_Fight; @@ -87,7 +89,6 @@ L_Cheat: L_Trick: mes "[Hasan]"; mes "\"Are you going to pay now? " + @toll + "GP, and I may let you pass.\""; - next; menu "I don't have that much money!",L_NoPay, "No. (Scratch your head.)",L_ScratchHead; @@ -95,15 +96,12 @@ L_Trick: L_ScratchHead: if ($@ScorpionFighter) goto L_Wait; - mes "While you're scratching your head, you see Kaan coming nearer to the cliff above you."; - // close2 blocks - close2; set $@ScorpionTimer, 0; set $@ScorpionFighter, getcharid(3); set $@ScorpDeath, PC_DIE_COUNTER; - monster "042-1.gat",89,63,"Scorpion",1003,1, "Hasan::OnScorpionDeath"; - initnpctimer; - end; + cmdothernpc "#ScorpionTrigger", "HasanSpawn"; + mes "While you're scratching your head, you see Kaan approaching behind Hasan."; + close; L_Thank: mes "[Hasan]"; @@ -120,7 +118,6 @@ L_Thank: callfunc "TutorialCompleted"; next; mes "\"You want to go to the bazaar, right? Shall I tell you how to get there?\""; - next; menu "Sure, thanks.",L_HasanThanks, "I'll try to find the way myself.",L_Explore; @@ -139,12 +136,6 @@ L_Explore: mes "\"Alright. Take care!\""; goto L_Close; -L_Fear: - mes "[Hasan]"; - mes "\"Sc-sc-sco-scorpion!\""; - mes "He seems close to tears."; - goto L_Close; - L_Tut_Done: mes "[Hasan]"; if (BaseLevel >= 40) @@ -153,44 +144,41 @@ L_Tut_Done: mes "\"Bah, nothing interesting is happening here.\""; goto L_Close; -L_Cliff_Up: - mes "You see a guy in shabby clothes when you look down the cliff."; +L_Wait: + mes "There is a scorpion near Hasan already. I think Kaan is helping someone else... Maybe I should try the plan later."; goto L_Close; -L_SummonAgain: - message strcharinfo(0), "Kaan is mad at you for your interference! He walks over to the edge of the cliff and throws a rock on top of your head, then lets another scorpion run just near Hasan!"; - percentheal -100, 0; - message strcharinfo(0), "Kaan: \"Just go while he is distracted and no one is interfering!\""; - monster "042-1.gat",89,63,"Scorpion",1003,1, "Hasan::OnScorpionDeath"; +L_Afraid: + message strcharinfo(0), "Hasan: \"" + strcharinfo(0) + "! Please help me!\""; end; -L_Clean: - killmonster "042-1.gat", "Hasan::OnScorpionDeath"; - set $@ScorpionFighter, 0; - set $@ScorpionTimer, 0; - set $@ScorpDeath, 0; - stopnpctimer; - end; +L_Close: + set @toll, 0; + close; -L_TimeOut: - message strcharinfo(0), "Hasan, with his eyes almost closed, trembling with fear, runs toward the scorpion and stabs it with all his strength! Seems like you took too long and the plan didn't work this time."; - warp "042-1.gat", 91, 58; - message strcharinfo(0), "Hasan: \"Hey you! I told you you cannot pass!\""; - goto L_Clean; +OnTouch: + if (FLAGS & FLAG_TUTORIAL_DONE) + goto L_Close; + goto L_Main; +} -L_MessageDeath: - message strcharinfo(0), "Ouch... I should be more careful when fighting these monsters."; - goto L_Clean; +042-1.gat,0,0,0|script|#ScorpionTrigger|35, +{ + end; -L_Wait: - mes "There is a scorpion near Hasan already. I think Kaan is helping someone else... Maybe I should try the plan later."; - goto L_Close; +OnCommandHasanSpawn: + goto L_Summon; -L_Close: - set @toll, 0; - set @x, 0; - set @y, 0; - close; +L_Summon: + monster "042-1.gat",115,85,"Scorpion",1003,1, "#ScorpionTrigger::OnScorpionDeath"; + initnpctimer; + end; + +L_SummonAgain: + message strcharinfo(0), "Kaan is mad at you for your interference! He walks over to the edge of the cliff and throws a rock on top of your head, then lets another scorpion run just near Hasan!"; + percentheal -100, 0; + message strcharinfo(0), "Kaan: \"Just go while he is distracted and no one is interfering!\""; + goto L_Summon; OnTimer5000: if (attachrid($@ScorpionFighter) == 0) @@ -206,50 +194,44 @@ OnTimer5000: OnScorpionDeath: if (getcharid(3) != $@ScorpionFighter) goto L_SummonAgain; - if (hasan != 3) - end; - set hasan, 4; + if (@tutorial != 12) + goto L_Clean; + set @tutorial_tmp, 13; + callfunc "SetTutorialMask"; message strcharinfo(0), "You saved Hasan."; goto L_Clean; -} +L_TimeOut: + message strcharinfo(0), "Hasan, with his eyes almost closed, trembling with fear, runs toward the scorpion and stabs it with all his strength! Seems like you took too long and the plan didn't work this time."; + warp "042-1.gat", 114, 85; + message strcharinfo(0), "Hasan: \"Hey you! I told you you cannot pass!\""; + goto L_Clean; -042-1.gat,90,62,0|script|#Toll|32767,2,2, -{ - end; +L_MessageDeath: + message strcharinfo(0), "Ouch... I should be more careful when fighting these monsters."; + goto L_Clean; -OnTouch: - // implicitly, $@ScorpionFighter is nonzero - if ($@ScorpionFighter == getcharid(3)) - end; - if ((FLAGS & FLAG_TUTORIAL_DONE) || (hasan == 4)) - end; - warp "042-1.gat", 91, 58; - message strcharinfo(0), "Hasan: \"Stop!\""; +L_Clean: + killmonster "042-1.gat", "#ScorpionTrigger::OnScorpionDeath"; + set $@ScorpionFighter, 0; + set $@ScorpionTimer, 0; + set $@ScorpDeath, 0; + stopnpctimer; end; - } -042-1.gat,96,69,0|script|#barrier|45,0,2 +042-1.gat,117,85,0|script|#warp|45,0,0, { - end; - -OnTouch: if (FLAGS & FLAG_TUTORIAL_DONE) goto L_Tut; - warp "042-1.gat", 94, 69; - // implicitly, $@ScorpionFighter is nonzero - if ($@ScorpionFighter == getcharid(3)) - message strcharinfo(0), "Hasan: \"" + strcharinfo(0) + "! Please help me!\""; - if ($@ScorpionFighter && $@ScorpionFighter != getcharid(3)) - // is this reachable? - message strcharinfo(0), "Hasan: \"Hey! Stop right there!\""; - if (hasan == 4) - message strcharinfo(0), "Hasan: \"Please wait a moment!\""; + goto L_SendBack; + +L_SendBack: + message strcharinfo(0), "Hasan: I can do this all day."; + warp "042-1.gat", 114, 85; end; L_Tut: - warp "022-1.gat", 23, 38; + warp "022-1.gat", 49, 82; end; - } |