diff options
Diffstat (limited to 'world/map/npc/029-1')
-rw-r--r-- | world/map/npc/029-1/_import.txt | 13 | ||||
-rw-r--r-- | world/map/npc/029-1/_mobs.txt | 35 | ||||
-rw-r--r-- | world/map/npc/029-1/_warps.txt | 4 | ||||
-rw-r--r-- | world/map/npc/029-1/aahna.txt | 23 | ||||
-rw-r--r-- | world/map/npc/029-1/barrier.txt | 5 | ||||
-rw-r--r-- | world/map/npc/029-1/dock.txt | 6 | ||||
-rw-r--r-- | world/map/npc/029-1/ferry_master.txt | 21 | ||||
-rw-r--r-- | world/map/npc/029-1/hasan.txt | 212 | ||||
-rw-r--r-- | world/map/npc/029-1/hideandseek.txt | 403 | ||||
-rw-r--r-- | world/map/npc/029-1/kaan.txt | 125 | ||||
-rw-r--r-- | world/map/npc/029-1/liana.txt | 47 | ||||
-rw-r--r-- | world/map/npc/029-1/mapflags.txt | 2 | ||||
-rw-r--r-- | world/map/npc/029-1/monster_guide.txt | 48 | ||||
-rw-r--r-- | world/map/npc/029-1/rewards_master.txt | 151 | ||||
-rw-r--r-- | world/map/npc/029-1/soul-menhir.txt | 18 | ||||
-rw-r--r-- | world/map/npc/029-1/traveler.txt | 2 | ||||
-rw-r--r-- | world/map/npc/029-1/tutorial.txt | 75 | ||||
-rw-r--r-- | world/map/npc/029-1/valon.txt | 158 | ||||
-rw-r--r-- | world/map/npc/029-1/vincent.txt | 150 | ||||
-rw-r--r-- | world/map/npc/029-1/zegas.txt | 108 |
20 files changed, 1579 insertions, 27 deletions
diff --git a/world/map/npc/029-1/_import.txt b/world/map/npc/029-1/_import.txt index 80303795..e8afa64e 100644 --- a/world/map/npc/029-1/_import.txt +++ b/world/map/npc/029-1/_import.txt @@ -3,7 +3,20 @@ map: 029-1.gat npc: npc/029-1/_mobs.txt npc: npc/029-1/_warps.txt +npc: npc/029-1/aahna.txt npc: npc/029-1/barrier.txt npc: npc/029-1/dock.txt +npc: npc/029-1/ferry_master.txt +npc: npc/029-1/hasan.txt +npc: npc/029-1/hideandseek.txt +npc: npc/029-1/kaan.txt +npc: npc/029-1/liana.txt npc: npc/029-1/mapflags.txt +npc: npc/029-1/monster_guide.txt +npc: npc/029-1/rewards_master.txt +npc: npc/029-1/soul-menhir.txt npc: npc/029-1/traveler.txt +npc: npc/029-1/tutorial.txt +npc: npc/029-1/valon.txt +npc: npc/029-1/vincent.txt +npc: npc/029-1/zegas.txt diff --git a/world/map/npc/029-1/_mobs.txt b/world/map/npc/029-1/_mobs.txt index e7ebba61..ce8e7a64 100644 --- a/world/map/npc/029-1/_mobs.txt +++ b/world/map/npc/029-1/_mobs.txt @@ -1,45 +1,40 @@ // This file is generated automatically. All manually changes will be removed when running the Converter. // Candor Island mobs -029-1.gat,69,65,12,13|monster|EvilMushroom|1013,4,20000ms,60000ms,Mob029-1::On1013 -029-1.gat,32,33,12,13|monster|Squirrel|1038,3,30000ms,60000ms,Mob029-1::On1038 029-1.gat,46,48,4,1|monster|CloverPatch|1037,1,10000ms,120000ms,Mob029-1::On1037 -029-1.gat,37,60,22,20|monster|SpikyMushroom|1019,5,10000ms,30000ms,Mob029-1::On1019 -029-1.gat,54,36,17,18|monster|Bat|1017,4,25000ms,30000ms,Mob029-1::On1017 -029-1.gat,59,51,13,9|monster|LogHead|1025,2,25000ms,30000ms,Mob029-1::On1025 +029-1.gat,73,93,14,13|monster|Maggot|1002,8,100000ms,30000ms,Mob029-1::On1002 +029-1.gat,90,35,15,11|monster|TameScorpion|1046,16,100000ms,30000ms,Mob029-1::On1046 +029-1.gat,93,100,21,18|monster|TameScorpion|1046,8,100000ms,30000ms,Mob029-1::On1046 +029-1.gat,43,43,31,23|monster|Scorpion|1003,2,100000ms,30000ms,Mob029-1::On1003 +029-1.gat,76,42,52,25|monster|ManaBug|1131,3,30ms,0ms,Mob029-1::On1131 029-1.gat,0,0,0|script|Mob029-1|-1 { end; -On1013: - set @mobID, 1013; +On1002: + set @mobID, 1002; callfunc "MobPoints"; end; -On1017: - set @mobID, 1017; +On1003: + set @mobID, 1003; callfunc "MobPoints"; end; -On1019: - set @mobID, 1019; - callfunc "MobPoints"; - end; - -On1025: - set @mobID, 1025; +On1037: + set @mobID, 1037; callfunc "MobPoints"; end; -On1037: - set @mobID, 1037; +On1046: + set @mobID, 1046; callfunc "MobPoints"; end; -On1038: - set @mobID, 1038; +On1131: + set @mobID, 1131; callfunc "MobPoints"; end; } diff --git a/world/map/npc/029-1/_warps.txt b/world/map/npc/029-1/_warps.txt index d7ee1fd0..6f0049be 100644 --- a/world/map/npc/029-1/_warps.txt +++ b/world/map/npc/029-1/_warps.txt @@ -1,3 +1,7 @@ // This file is generated automatically. All manually changes will be removed when running the Converter. // Candor Island warps +029-1.gat,40,88|warp|To Valon's House|-1,-1,029-2.gat,29,61 +029-1.gat,44,83|warp|To Storeroom|-1,-1,029-2.gat,22,92 +029-1.gat,52,84|warp|To The Magic Shack|-1,-1,029-2.gat,103,61 +029-1.gat,58,79|warp|To Two Arms|-1,-1,029-2.gat,94,30 diff --git a/world/map/npc/029-1/aahna.txt b/world/map/npc/029-1/aahna.txt new file mode 100644 index 00000000..1b1c4489 --- /dev/null +++ b/world/map/npc/029-1/aahna.txt @@ -0,0 +1,23 @@ +// Aahna +// Author: Wushin +// Npc +029-1.gat,71,52,0|script|Aahna|404 +{ + setarray @npc_loc, 71, 52, 3; + callfunc "PCtoNPCRange"; + if (@npc_check) + goto L_Range; + goto L_Meet; + +L_Meet: + mes "[Aahna]"; + mes "\"Hello, What a lovely day for a stroll.\""; + goto L_Close; + +L_Range: + message strcharinfo(0), "Whats that? Come closer I can't hear you."; + goto L_Close; + +L_Close: + close; +} diff --git a/world/map/npc/029-1/barrier.txt b/world/map/npc/029-1/barrier.txt index b7d6b62c..1acb0d17 100644 --- a/world/map/npc/029-1/barrier.txt +++ b/world/map/npc/029-1/barrier.txt @@ -1,7 +1,8 @@ -029-1.gat,54,37,0|script|#CandorBarrier|45,0,0 +029-1.gat,69,61,0|script|#CandorBarrier|45,0,0 { if ($@FIGHT_CAVE_STATUS == 1) goto L_Block; - warp "029-3.gat", 46, 23; + if (BaseLevel < 40) goto L_Block; + warp "029-3.gat", 49, 53; end; L_Block: diff --git a/world/map/npc/029-1/dock.txt b/world/map/npc/029-1/dock.txt index 6f195f36..7430971c 100644 --- a/world/map/npc/029-1/dock.txt +++ b/world/map/npc/029-1/dock.txt @@ -1,19 +1,19 @@ // The ferry dock // Ferry Sign -029-1.gat,27,36,0|script|Ferry Schedule#8|397 +029-1.gat,43,104,0|script|Ferry Schedule#8|397 { callfunc "FerryManifest"; end; } -029-1.gat,16,36,0|script|Candor Koga|395,6,2 +029-1.gat,51,118,0|script|Candor Koga|395,8,8 { callfunc "BoardCandorFerry"; close; } -029-1.gat,22,37,0|script|#CandorDock|127 +029-1.gat,55,110,0|script|#CandorDock|127 { end; OnCommandArrive: diff --git a/world/map/npc/029-1/ferry_master.txt b/world/map/npc/029-1/ferry_master.txt new file mode 100644 index 00000000..3163e6b2 --- /dev/null +++ b/world/map/npc/029-1/ferry_master.txt @@ -0,0 +1,21 @@ +// + +029-1.gat,45,107,0|script|Ferry Master#candor|138 +{ + mes "[Ferry Master]"; + mes "\"Hello! Do you need something?\""; + goto L_Main; + +L_Main: + menu + "How do I use the ferry?", L_Explain, + "Nothing I guess", L_Close; + +L_Explain: + mes "[Ferry Master]"; + callfunc "FerryHelp"; + goto L_Main; + +L_Close: + close; +} diff --git a/world/map/npc/029-1/hasan.txt b/world/map/npc/029-1/hasan.txt new file mode 100644 index 00000000..7a6b906e --- /dev/null +++ b/world/map/npc/029-1/hasan.txt @@ -0,0 +1,212 @@ +// This file is part of the Tutorial +// Authors: Jenalya, alastrim +// Hasan should be threatening someone else you come to help +// Going to throw someone in the water +// npctalk 2 NPCs Hasan talks about giving someone a short trip to Docks +// They respond by asking play for help +// Hasan tells them to but out of it. + +029-1.gat,35,33,0|script|Scared Man|160 +{ + setarray @npc_loc, 35, 33, 4; + callfunc "PCtoNPCRange"; + if (@npc_check) + goto L_End; + if (@tutorial >= 13) + goto L_TutDone; + message strcharinfo(0), "He looks too afraid to say anything."; + goto L_End; + +L_TutDone: + message strcharinfo(0), "Thanks. Hasan has been much nicer to me now"; + goto L_End; + +L_End: + end; +} +029-1.gat,33,33,0|script|Hasan|189,3,3 +{ + setarray @npc_loc, 33, 33, 4; + callfunc "PCtoNPCRange"; + if (@npc_check) + goto L_Close; + goto L_Main; + +L_Main: + callfunc "TutorialState"; + if ((getcharid(3) == $@ScorpionFighter) || ($@ScorpionFighter && $@ScorpionFighter != getcharid(3))) + goto L_Afraid; + if (@tutorial == 14) + goto L_TutDone; + if (@tutorial == 13) + goto L_Thank; + if (@tutorial == 12) + goto L_Trick; + if ((@tutorial == 9) || (@tutorial == 10) || (@tutorial == 11)) + goto L_FightAgain; + + mes "You over hear some people nearby."; + mes "[Unfriendly Guy]"; + mes "\"I told you if you didn't get the money, I'd give you swimming lessons, Haha!\""; + mes "[Scared Man]"; + mes "\"But the only person I need protection from is you.\""; + mes "[Unfriendly Guy]"; + mes "\"Thats why the price is so high.\""; + mes "\"Because I'm the toughest person in all of Candor\""; + mes "[Scared Man]"; + mes "\"No, your just a mean bully. Wait till I tell the guards about this!\""; + mes "[Unfriendly Guy]"; + mes "\"You do that and the next swimming lesson will be sleeping with the fishes.\""; + mes "[Scared Man]"; + mes "\"No, please don't. *sob*\""; + mes "Sounds like this person is in trouble.\""; + set @tutorial_tmp, 9; + callfunc "SetTutorialMask"; + mes "[Unfriendly Guy]"; + mes "\"What are you looking at?\""; + menu + "What ever you call maggot slime scrapped off a boat after a walk through the sewers.\"", L_Fight, + "Who me? I saw nothing, just passing by.", L_Close; + +L_FightAgain: + mes "[Hasan]"; + mes "\"Have you come back for a thrashing?\""; + menu + "No.", L_Close, + "Yes.", L_Fight; + +L_Fight: + mes "[Hasan]"; + mes "\"Do you really think you can beat me?\""; + mes "He pulls out a nasty looking dagger and stabs it in your direction."; + set Hp, 1; + mes "That hurt! You begin to think searching for a different solution might be healthier."; + mes "Maybe Kaan can help?"; + goto L_Close; + +L_Trick: + mes "[Hasan]"; + mes "\"Have you come back for another thrashing?\""; + menu + "No.",L_Close, + "Yes, yours! (Scratch your head.)",L_ScratchHead; + +L_ScratchHead: + if ($@ScorpionFighter) + goto L_Wait; + set $@ScorpionTimer, 0; + set $@ScorpionFighter, getcharid(3); + set $@ScorpDeath, PC_DIE_COUNTER; + cmdothernpc "#ScorpionTrigger", "HasanSpawn"; + specialeffect 22; + mes "While you're scratching your head, a scorpion appears."; + close; + +L_Thank: + mes "[Hasan]"; + mes "\"You - you saved me!"; + mes "I was mean to people, but you still saved me!\""; + mes "\"Hey, you're a really cool person."; + mes "I mean, the way you finished that ghastly scorpion!"; + mes "Amazing!\""; + mes "\"Let me tell you something, I will no longer bully people."; + mes "And you can have my Sharp Knife.\""; + getitem "SharpKnife", 1; + set @tutorial_tmp, 14; + callfunc "SetTutorialMask"; + mes "\"You want to go to Hurnscald, right? Shall I tell you how to get there?\""; + menu + "Sure, thanks.",L_HasanThanks, + "I'll try to find the way myself.",L_Explore; + +L_HasanThanks: + mes "[Hasan]"; + mes "\"Ok, when you leave here go back to the city. Wait on the south end of"; + mes "the city for the ferry to arrive at the docks. It will take you to Hurnscald.\""; + goto L_Close; + +L_Explore: + mes "[Hasan]"; + mes "\"Alright. Take care!\""; + goto L_Close; + +L_TutDone: + mes "[Hasan]"; + mes "\"You didn't see anything. I tell you what I'll be nicer if you don't tell anyone?\""; + menu + "As long as you learned your lesson.", L_TutCont; + +L_TutCont: + mes "\"I have, I promise not to bully people anymore. It's not fun being scared.\""; + goto L_Close; + +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_Afraid: + message strcharinfo(0), "Hasan: \"" + strcharinfo(0) + "! Please help me!\""; + end; + +L_Close: + close; + +OnTouch: + if (@tutorial >= 13) + end; + goto L_Main; +} +029-1.gat,0,0,0|script|#ScorpionTrigger|35 +{ + end; + +OnCommandHasanSpawn: + goto L_Summon; + +L_Summon: + monster "029-1.gat",33,33,"WeakScorpion",1046,1, "#ScorpionTrigger::OnScorpionDeath"; + initnpctimer; + end; + +L_SummonAgain: + message strcharinfo(0), "Kaan is mad at you for your interference! He summons a rock above your head, then summons another scorpion near Hasan!"; + percentheal -100, 0; + goto L_Summon; + +OnTimer5000: + if (attachrid($@ScorpionFighter) == 0) + goto L_Clean; + set $@ScorpionTimer, $@ScorpionTimer + 5; + if ($@ScorpionTimer >= 300) + goto L_TimeOut; + if (PC_DIE_COUNTER > $@ScorpDeath) + goto L_MessageDeath; + setnpctimer 0; + end; + +OnScorpionDeath: + if (getcharid(3) != $@ScorpionFighter) + goto L_SummonAgain; + 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!"; + goto L_Clean; + +L_MessageDeath: + message strcharinfo(0), "Ouch... I should be more careful when fighting these monsters."; + goto L_Clean; + +L_Clean: + killmonster "029-1.gat", "#ScorpionTrigger::OnScorpionDeath"; + set $@ScorpionFighter, 0; + set $@ScorpionTimer, 0; + set $@ScorpDeath, 0; + stopnpctimer; + end; +} diff --git a/world/map/npc/029-1/hideandseek.txt b/world/map/npc/029-1/hideandseek.txt new file mode 100644 index 00000000..4a4476ff --- /dev/null +++ b/world/map/npc/029-1/hideandseek.txt @@ -0,0 +1,403 @@ +// Children playing Hide and Seek +// QUEST_NorthTulimshar +// BYTE 0 +// Bit 0: started quest at Ayasha +// Bit 1 - 5: found one of the kids each +// Bit 6: talked to Ayasha after finding all kids +// Bit 7: unused +// Author: Jenalya + +-|script|#hideandseekNTconfig|-1 +{ + end; + +OnInit: + set $@hideandseekNT_started, (1 << 0); + set $@hideandseekNT_found1, (1 << 1); + set $@hideandseekNT_found2, (1 << 2); + set $@hideandseekNT_found3, (1 << 3); + set $@hideandseekNT_found4, (1 << 4); + set $@hideandseekNT_found5, (1 << 5); + set $@hideandseekNT_ended, (1 << 6); + end; +} +function|script|CountHideNSeek +{ + set @hidden_kid_cnt, 0; + if (QUEST_NorthTulimshar & $@hideandseekNT_found1) + set @hidden_kid_cnt, (@hidden_kid_cnt + 1); + if (QUEST_NorthTulimshar & $@hideandseekNT_found2) + set @hidden_kid_cnt, (@hidden_kid_cnt + 1); + if (QUEST_NorthTulimshar & $@hideandseekNT_found3) + set @hidden_kid_cnt, (@hidden_kid_cnt + 1); + if (QUEST_NorthTulimshar & $@hideandseekNT_found4) + set @hidden_kid_cnt, (@hidden_kid_cnt + 1); + if (QUEST_NorthTulimshar & $@hideandseekNT_found5) + set @hidden_kid_cnt, (@hidden_kid_cnt + 1); + return; +} +029-1.gat,64,90,0|script|AyashaDebug|258 +{ + mes "[Ayasha Debug]"; + menu + "Show", L_Show, + "Reset", L_Reset, + "Close.", L_Close; + +L_Show: + set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT); + mes "State: " + @state; + if (QUEST_NorthTulimshar & $@hideandseekNT_started) + mes "Start set"; + if (QUEST_NorthTulimshar & $@hideandseekNT_found1) + mes "Found 1 set"; + if (QUEST_NorthTulimshar & $@hideandseekNT_found2) + mes "Found 2 set"; + if (QUEST_NorthTulimshar & $@hideandseekNT_found3) + mes "Found 3 set"; + if (QUEST_NorthTulimshar & $@hideandseekNT_found4) + mes "Found 4 set"; + if (QUEST_NorthTulimshar & $@hideandseekNT_found5) + mes "Found 5 set"; + if (QUEST_NorthTulimshar & $@hideandseekNT_ended) + mes "Complete set"; + goto L_Close; + +L_Reset: + set QUEST_NorthTulimshar, 0; + goto L_Close; + +L_Close: + close; + +OnInit: + if (!debug) + disablenpc "AyashaDebug"; + end; +} +029-1.gat,62,90,0|script|Ayasha|258 +{ + set @child_number, 0; + callfunc "XmasList"; + + set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT); + + set @EXP, 75; + + if (@state > 63) goto L_Done; + if (@state == 63) goto L_Reward; + if (@state > 0) goto L_Doing; + + mes "You see a girl who is holding her hands in front of her face."; + mes "[Ayasha]"; + mes "\"98... 99... 100!\""; + mes "She takes away her hands and looks up."; + menu + "Hello, what are you doing?",L_Next, + "(Leave)",L_Close; + +L_Next: + mes "[Ayasha]"; + mes "\"I'm playing hide and seek with my friends!"; + mes "Do you want to play with us?\""; + menu + "Sure, sounds like fun.",L_Next1, + "I'm busy with more important things!",L_Close; + +L_Next1: + mes "[Ayasha]"; + mes "\"Great! You can take my turn with searching. You need to find all five of my friends."; + mes "They're hiding somewhere on the island, you will have to explore to find them. They could be hiding anywhere.\""; + + set QUEST_NorthTulimshar, QUEST_NorthTulimshar | $@hideandseekNT_started; + goto L_Close; + +L_Doing: + callfunc "CountHideNSeek"; + mes "[Ayasha]"; + mes "\"You still need to find some of my friends. You have found " + @hidden_kid_cnt + " out of 5 of my friends.\""; + mes "Remember, they're hiding somewhere on the island, you will have to explore to find them. They could be hiding anywhere.\""; + goto L_Close; + +L_Reward: + mes "[Ayasha]"; + mes "\"Oh, you found them all! Good job! Now it's my turn with searching again. Go and hide!\""; + getexp @EXP, 0; + set QUEST_NorthTulimshar, QUEST_NorthTulimshar | $@hideandseekNT_ended; + menu + "I think I need to do other things now.",L_Next2; + +L_Next2: + mes "[Ayasha]"; + mes "\"Oh, ok."; + mes "Have you already seen Hurnscald? It's a very exciting place! I love the entertainer. She can make so many funny faces.\""; + goto L_Close; + +L_Done: + mes "[Ayasha]"; + mes "\"Hello! It was fun to play with you."; + mes "When you go to the Hurnscald, you can say hello to Mikhail. He's very nice! But very shy.\""; + goto L_Close; + +L_Close: + set @state, 0; + set @EXP, 0; + close; +} + +029-1.gat,50,105,0|script|Latif|262 +{ + set @child_number, 1; + callfunc "XmasList"; + set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT); + + set @EXP, 15; + + if (@state > 63) goto L_Done; + if ((@state > 0) && !(QUEST_NorthTulimshar & $@hideandseekNT_found1)) goto L_Find; + if (@state > 0) goto L_Doing; + + mes "You see a kid hiding behind a box."; + menu + "What are you doing there?",L_Next, + "(Leave)",L_Close; + +L_Next: + mes "[Latif]"; + mes "\"Hiding. We're playing hide and seek. Don't say that is boring. It's fun.\""; + menu + "I agree, it's fun.",L_Agree, + "Hide and seek? Lame.",L_Next1; + +L_Next1: + mes "[Latif]"; + mes "\"My friend Vincent thinks so too. He doesn't join us playing."; + mes "Do you know what he does instead? He builds action figures out of Bug Legs! That is lame.\""; + goto L_Close; + +L_Agree: + mes "[Latif]"; + mes "\"Yeah, right? My friend Vincent doesn't thinks so. He doesn't join us playing."; + mes "Do you know what he does instead? He builds action figures out of Bug Legs! That is lame.\""; + goto L_Close; + +L_Find: + mes "[Latif]"; + mes "\"Hey! Ah, you found me. Well done. But my hiding place wasn't that difficult this time.\""; + getexp @EXP, 0; + set QUEST_NorthTulimshar, QUEST_NorthTulimshar | $@hideandseekNT_found1; + mes "\"Here, do you want a candy?\""; + getitem "Candy", 1; + goto L_Close; + +L_Doing: + callfunc "CountHideNSeek"; + mes "[Latif]"; + mes "\"You didn't find all of us yet? Seems like the other ones found a better place to hide.\""; + mes "\"" + @hidden_kid_cnt + " out of 5 have been found.\""; + goto L_Close; + +L_Done: + mes "[Latif]"; + mes "\"The northeastern most building of town is a workshop. My father works there and wants me to do that too when I'm grown up. But I don't want do that! I want to go on an adventure! Just like you.\""; + goto L_Close; + +L_Close: + set @state, 0; + set @EXP, 0; + close; +} + +029-1.gat,48,67,0|script|Charda|260 +{ + set @child_number, 2; + callfunc "XmasList"; + set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT); + + set @EXP, 15; + + if (@state > 63) goto L_Done; + if ((@state > 0) && !(QUEST_NorthTulimshar & $@hideandseekNT_found2)) goto L_Find; + if (@state > 0) goto L_Doing; + + mes "[Charda]"; + mes "\"Hello. Psht, be careful. I'm playing hide and seek with Ayasha. You'll draw attention to my hiding place.\""; + mes "\"They will never find me here.\""; + goto L_Close; + +L_Find: + mes "[Charda]"; + mes "\"Oh! Got me! You're good at this.\""; + getexp @EXP, 0; + set QUEST_NorthTulimshar, QUEST_NorthTulimshar | $@hideandseekNT_found2; + mes "She takes something out of her pocket."; + mes "\"I'm hungry now. Do you want chocolate too?\""; + getitem "ChocolateBar", 1; + mes "\"My mom doesn't want me to eat so much chocolate, but I got it from the trader at the Hurnscald Market. He sells many different things"; + mes "when we goto vacation in Hurnscald. I convinced him to teach me how to trade. It's fun.\""; + goto L_Close; + +L_Doing: + callfunc "CountHideNSeek"; + mes "[Charda]"; + mes "\"Did you find the others yet?\""; + mes "\"Hrmm, no looks like only " + @hidden_kid_cnt + " out of 5 have been found.\""; + goto L_Close; + +L_Done: + mes "[Charda]"; + mes "\"Hey! We're still playing hide and seek. What are you going to do? Will you go to Hurnscald with the ferry? The mother of my friends Rossy and Julia come from there. They are on a vacation there at the moment.\""; + mes "\"Rossy told me that it's a very beautiful place. Lots of trees and flowers and grass, everything's green.\""; + mes "She sighs."; + mes "[Charda]"; + mes "\"Sounds wonderful.\""; + goto L_Close; + +L_Close: + set @state, 0; + set @EXP, 0; + close; +} + +029-1.gat,100,36,0|script|Faris|259 +{ + set @child_number, 3; + callfunc "XmasList"; + set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT); + + set @EXP, 25; + + if (@state > 63) goto L_Done; + if ((@state > 0) && !(QUEST_NorthTulimshar & $@hideandseekNT_found3)) goto L_Find; + if (@state > 0) goto L_Doing; + + mes "[Faris]"; + mes "\"Oh, hi there. What are you doing here on the beach?\""; + menu + "I'm just having a look around.",L_Next, + "It's nice place here, isn't it?",L_Next; + +L_Next: + mes "[Faris]"; + mes "\"Hey, you're cool. I'm hiding here from Ayasha, we're playing hide and seek. This is the best hiding place ever.\""; + goto L_Close; + +L_Find: + mes "[Faris]"; + mes "\"You found me! Well done. You look a bit thirsty, here.\""; + getexp @EXP, 0; + getitem "CactusDrink", 1; + set QUEST_NorthTulimshar, QUEST_NorthTulimshar | $@hideandseekNT_found3; + mes "\"It's really cool you're playing with us. I'm sure you have a lot of other things to do."; + mes "You're an adventurer, right? I want to become an adventurer too when I'm grown up. I'll talk to Aidan then.\""; + mes "\"Aidan is outside Sorfina's place and you can register there for monster points. That's something the Wizard's Council made up. They reward you for slaying monsters. It's so cool.\""; + goto L_Close; + +L_Doing: + callfunc "CountHideNSeek"; + mes "[Faris]"; + mes "\"Are you still searching for the others? Nobody else is here.\""; + mes "\"It seems you found " + @hidden_kid_cnt + " out of 5 of my friends.\""; + goto L_Close; + +L_Done: + mes "[Faris]"; + mes "\"I'll go to Hurnscald's Inn and ask Bernard for some soup when we're done with playing. His soup is delicious!\""; + goto L_Close; + +L_Close: + set @state, 0; + set @EXP, 0; + close; +} + +029-1.gat,28,52,0|script|Rasin|263 +{ + set @child_number, 4; + callfunc "XmasList"; + set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT); + + set @EXP, 15; + + if (@state > 63) goto L_Done; + if ((@state > 0) && !(QUEST_NorthTulimshar & $@hideandseekNT_found4)) goto L_Find; + if (@state > 0) goto L_Doing; + + mes "[Rasin]"; + mes "\"The harbor is to the south from here. There you can take a ferry to other places."; + mes "And now go away, I'm playing hide and seek and Ayasha shouldn't see me here. You'll draw her attention when you talk to me.\""; + goto L_Close; + +L_Find: + mes "[Rasin]"; + mes "\"Ah, you found me. I need to find a better place to hide next time.\""; + getexp @EXP, 0; + set QUEST_NorthTulimshar, QUEST_NorthTulimshar | $@hideandseekNT_found4; + goto L_Close; + +L_Doing: + callfunc "CountHideNSeek"; + mes "[Rasin]"; + mes "\"Hehe, I'm curious when you'll have found all of us.\""; + mes "\"There are " + @hidden_kid_cnt + " out of 5 found.\""; + goto L_Close; + +L_Done: + mes "[Rasin]"; + mes "\"Thanks for playing with us! It was fun!"; + mes "Will you leave Candor to go on an adventure in other places of the world?\""; + goto L_Close; + +L_Close: + set @state, 0; + set @EXP, 0; + close; +} + +029-1.gat,79,99,0|script|Ghada|265 +{ + set @child_number, 5; + callfunc "XmasList"; + set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT); + + set @EXP, 15; + + if (@state > 63) goto L_Done; + if ((@state > 0) && !(QUEST_NorthTulimshar & $@hideandseekNT_found5)) goto L_Find; + if (@state > 0) goto L_Doing; + + mes "You see a girl standing behind the wheat. She has a look of intense concentration on her face."; + menu + "Hi, what are you doing there?",L_Next, + "(Leave)",L_Close; + +L_Next: + mes "[Ghada]"; + mes "\"Oh, hello. I'm hiding. We're playing hide and seek.\""; + goto L_Close; + +L_Find: + mes "[Ghada]"; + mes "\"Oh no! You found me! You must be very clever."; + mes "My friend Sandra is clever too, but she said it's a waste of time to play hide and seek.\""; + getexp @EXP, 0; + set QUEST_NorthTulimshar, QUEST_NorthTulimshar | $@hideandseekNT_found5; + goto L_Close; + +L_Doing: + callfunc "CountHideNSeek"; + mes "[Ghada]"; + mes "\"Are you still searching for the others? I'm sure you'll find them soon.\""; + mes "\"You found " + @hidden_kid_cnt + " out of 5 us.\""; + goto L_Close; + +L_Done: + mes "[Ghada]"; + mes "\"It's so nice that you played with us! You're about the same age as my older sister, but she never plays with us. Her name is Sarah.\""; + goto L_Close; + +L_Close: + set @state, 0; + set @EXP, 0; + close; +} diff --git a/world/map/npc/029-1/kaan.txt b/world/map/npc/029-1/kaan.txt new file mode 100644 index 00000000..0dabb802 --- /dev/null +++ b/world/map/npc/029-1/kaan.txt @@ -0,0 +1,125 @@ +// This file is part of the Tutorial +// Author: Jenalya + +029-1.gat,46,95,0|script|Kaan|160 +{ + setarray @npc_loc, 46, 97, 4; + callfunc "PCtoNPCRange"; + if (@npc_check) + goto L_OutOfRange; + + callfunc "TutorialState"; + if (!(@kaan_talked)) goto L_Tanisha; + if (@tutorial >= 13) goto L_TutDone; + if (@tutorial == 12) goto L_Plan; + if (@tutorial == 11) goto L_TrickKnown; + if (@tutorial == 10) goto L_Trick; + if (@tutorial == 9) goto L_Hasan; + goto L_Out; + +L_OutOfRange: + message strcharinfo(0), "Come closer!"; + goto L_Close; + +L_Tanisha: + set STARTAREA, STARTAREA | $@SpokeToKaan; + mes "[Young Man]"; + mes "\"You're the person I brought here, right?"; + mes "My name is Kaan, I'm Tanisha's brother.\""; + mes "\"She was babbling at me about it all the morning until I sent her to take care of the maggots in the cafe.\""; + mes "Kaan grins mischieviously."; + mes "[Kaan]"; + mes "\"She hates maggots.\""; + mes "\"Did you already talk to Tanisha?\""; + menu + "Yes, I helped her with the maggots.",L_Tanisha1, + "Yeah, and she's done with the maggots.",L_Tanisha1; + +L_Tanisha1: + mes "[Kaan]"; + mes "\"Ah, that is good news."; + mes "You know, we have a lot of problems with bugs here.\""; + mes "\"I've slain many bugs here to keep them out of our fields.\""; + mes "\"If we don't watch out the maggots will eat all of our stocks."; + mes "And the island is crawling with scorpions.\""; + mes "\"Are you going to visit Hurnscald?"; + mes "Hurnscald is a wondeful place! Traders, entertainers, adventurers - it's very exciting.\""; + mes "\"And Ian the trainer is hanging around there often. You should talk to him, he's a smart guy.\""; + mes "\"The ferry to the south takes your there for free.\""; + goto L_Close; + +L_Out: + mes "[Kaan]"; + mes "\"Hello! How are you? Did you already visit Hurnscald?\""; + menu + "Yes.", L_Close, + "Not yet.",L_Close; + +L_Hasan: + mes "[Kaan]"; + mes "\"Hello! How are you? Did you already visit Hurnscald?\""; + menu + "A guy named Hasan is bullying someone.",L_Next1, + "Yes.", L_Close, + "Not yet.",L_Close; + +L_Next1: + mes "\"Hasan! That's crazy. He becomes more cheeky with every day."; + mes "I'd like to help you, but - I won't risk an open confrontation with him.\""; + mes "\"Sometimes he just freaks out and then he's dangerous."; + mes "He might listen to one of the adult men, but they're all off to work in Hurnscald during the day.\""; + mes "\"We should think about some kind of trick. Ah, if only I knew his weak point.\""; + set @tutorial_tmp, 10; + callfunc "SetTutorialMask"; + goto L_Trick; + +L_Trick: + mes "[Kaan]"; + mes "\"Do you have any idea what Hasan's weakness could be?"; + mes "I wonder if Sorfina know something about him that could help us.\""; + menu + "No idea.",L_Close; + +L_TrickKnown: + mes "[Kaan]"; + mes "\"Do you have any idea what Hasan's weakness could be?"; + menu + "He's afraid of scorpions.",L_Next2, + "No idea.",L_Close; + +L_Next2: + mes "[Kaan]"; + mes "\"Scorpions?! Right! How could I forget?"; + mes "When he was a child, he nearly died because he fell into a scorpion nest.\""; + set @tutorial_tmp, 12; + callfunc "SetTutorialMask"; + next; + goto L_Explain; + +L_Explain: + mes "\"Ok, then here's the plan:"; + mes "\"You'll go to Hasan and give me a sign when you're ready."; + mes "Lets say the sign is that you're scratching your head."; + mes "I'll watch you from this point.\""; + mes "\"When you give me the sign, I'll summon a scorpion on him."; + mes "I bet that will show him for the coward he really is.\""; + mes "\"How's that? We can start as soon as you're ready.\""; + goto L_Close; + +L_Plan: + mes "[Kaan]"; + mes "\"I'm ready. Just give me the sign when you're down there."; + mes "Or do you want me to explain the plan again?\""; + menu + "Yes please.",L_Explain, + "No, everything's alright.",L_Close; + +L_TutDone: + mes "[Kaan]"; + mes "\"Hi there. I hope you enjoy your time in Hurnscald."; + mes "Hasan can be a real troublemaker, but it seems like he has calmed down for now.\""; + goto L_Close; + +L_Close: + close; +} diff --git a/world/map/npc/029-1/liana.txt b/world/map/npc/029-1/liana.txt new file mode 100644 index 00000000..dd95cc0c --- /dev/null +++ b/world/map/npc/029-1/liana.txt @@ -0,0 +1,47 @@ +// Talk NPCs to help make trek interesting between Tutorial and Bazaar. + +029-1.gat,62,96,0|script|Liana|205 +{ + setarray @npc_loc, 62, 96, 4; + callfunc "PCtoNPCRange"; + if (@npc_check) + goto L_End; + goto L_Talk; + +L_Talk: + mes "[Liana]"; + mes "\"Hurnscald is a large city. I'm sure glad I live in Candor because I know where everything's at.\""; + if (@tutorial == 10) goto L_Hasan; + goto L_Close; + +L_Hasan: + mes "[Liana]"; + mes "\"Are you enjoying yourself in Candor? Do you have any questions?\""; + menu + "A guy named Hasan is bullying people.",L_Next, + "No, thanks.",L_Close; + +L_Next: + mes "\"Ah, Hasan. He's causing trouble again?\""; + mes "She shakes her head."; + mes "\This guy has been a plague ever since he could walk. He's always causing trouble.\""; + mes "\"And his father... Well, one day his father thought he should teach Hasan a lesson.\""; + mes "\"He took him into the desert and then left him there!"; + mes "Hasan was only seven years old!\""; + mes "\"I never understood how someone could do something like that to a child, even if it's a rascal like Hasan.\""; + mes "\"Anyway, Hasan tried to find his way back home, but stumbled into a nest of scorpions!\""; + mes "She shakes her head."; + mes "\"If Lieutenant Dausen hadn't have come along that moment, Hasan would have died that day.\""; + mes "\"However, the scorpions poison caused a bad fever and once Hasan had recovered from that, he was even more malicious than before.\""; + mes "She sighs."; + set @tutorial_tmp, 11; + callfunc "SetTutorialMask"; + goto L_Close; + +L_End: + mes "You'll have to move closer"; + goto L_Close; + +L_Close: + close; +} diff --git a/world/map/npc/029-1/mapflags.txt b/world/map/npc/029-1/mapflags.txt index 03b117f8..2f352ae3 100644 --- a/world/map/npc/029-1/mapflags.txt +++ b/world/map/npc/029-1/mapflags.txt @@ -1 +1 @@ -029-1.gat|mapflag|resave|029-1,69,69 +029-1.gat|mapflag|resave|029-1,39,102 diff --git a/world/map/npc/029-1/monster_guide.txt b/world/map/npc/029-1/monster_guide.txt new file mode 100644 index 00000000..705dce05 --- /dev/null +++ b/world/map/npc/029-1/monster_guide.txt @@ -0,0 +1,48 @@ +// + +029-1.gat,45,97,0|script|Aidan|102 +{ + if (MPQUEST == 0) + goto L_Register; + mes "[Aidan the Monster Guide]"; + mes "You currently have " +Mobpt+ " Monster Points. These points are acquired while killing monsters"; + close; + +L_Register: + mes "[Aidan the Monster Guide]"; + mes "Oh my, you don't seem to be registered as a Quest Participant. Would you like to register?"; + next; + goto L_Choice; + +L_Choice: + menu + "Register",L_R, + "Not at the moment", + L_N,"Information",L_I; + +L_R: + mes "[Aidan the Monster Guide]"; + mes "Give me a second to look over your paperwork."; + next; + mes "[Monster Guide]"; + mes "Well, looks like you qualify!"; + mes "Welcome to the questing world!"; + set MPQUEST,1; + close; + +L_N: + mes "[Aidan the Monster Guide]"; + mes "Very well, you don't know what you're missing."; + close; + +L_I: + mes "[Aidan the Monster Guide]"; + mes "Here in The Mana World, there are certain rewards for your vanquishing of foes."; + mes "For example, there are Monster Points; every monster you kill has a certain amount of points that get added to your account."; + mes "The more points you have, the more expensive things you can buy using them."; + next; + mes "[Monster Guide]"; + mes "So whaddaya say, sign up won't you?"; + next; + goto L_Choice; +} diff --git a/world/map/npc/029-1/rewards_master.txt b/world/map/npc/029-1/rewards_master.txt new file mode 100644 index 00000000..cf8a1c1d --- /dev/null +++ b/world/map/npc/029-1/rewards_master.txt @@ -0,0 +1,151 @@ +// + +029-1.gat,47,97,0|script|Ishi|106 +{ + if (MPQUEST == 0) goto L_Register; + if (tvis == 0) set tvis, 1; + if (Mobpt < tvis) goto L_NotEnough; + + setarray @Items$, "AppleCake", "Arrow", "Beer", "Boots", "BugLeg", "CactusDrink", "CactusPotion", "Cake", "Candy", "CasinoCoins", "CherryCake", "ChickenLeg", "ChocolateBar", "ChocolateCake", "CottonBoots", "CottonCloth", "CottonShirt", "CottonShorts", "FancyHat", "GreenApple", "HardSpike", "IronOre", "Lifestone", "LightBlueDye", "MaggotSlime", "Milk", "Orange", "OrangeCake", "OrangeCupcake", "PinkPetal", "PileOfAsh", "PinkAntenna", "PoltergeistPowder", "RawLog", "RedApple", "RedDye", "ScorpionStinger", "SerfHat", "SmallHealingPotion", "SmallMushroom", "SnakeSkin", "SpectrePowder", "Steak", "TinyHealingPotion", "WhiteCake", "WhiteFur", "WispPowder", "YellowDye", "Coal"; + + mes "[Ishi the Rewards Master]"; + mes "\"Welcome! I see you have " + Mobpt + " Monster Points. Would you like to exchange some of those for items?\""; + next; + + set @i, 0; + setarray @Menu$, "", "", "", "", "", "", "", "", "", "", "", ""; + callsub S_prep_menu; + + menu + @Menu$[0], L_MenuItems, + @Menu$[1], L_MenuItems, + @Menu$[2], L_MenuItems, + @Menu$[3], L_MenuItems, + @Menu$[4], L_MenuItems, + @Menu$[5], L_MenuItems, + @Menu$[6], L_MenuItems, + @Menu$[7], L_MenuItems, + @Menu$[8], L_MenuItems, + @Menu$[9], L_MenuItems, + @Menu$[10], L_MenuItems, + @Menu$[11], L_MenuItems; + +L_MenuItems: + // this is for the last entry "No thanks": + if (@menu > @i) goto L_Close; + // this is for the "Give all" entry: + if (@menu == 11) goto L_Give_all; + + set @req, @menu; + set @rec, 0; + goto L_Item_Loop; + +L_Item_Loop: + if (@rec == @req || Mobpt < tvis) goto L_Item_Done; + + callsub S_give_item; + set @rec, @rec + 1; + goto L_Item_Loop; + +L_Item_Done: + if (@rec < @req) mes "It looks like your Monster Points were over estimated."; + goto L_Close; + +L_Register: + mes "[Ishi the Rewards Master]"; + mes "\"Hey, it seems like you didn't register as a quest participant yet! You can sign up with Aidan.\""; + goto L_Close; + +L_NotEnough: + mes "[Ishi the Rewards Master]"; + mes "\"You don't have enough Monster Points for a reward. You'll need to kill some more monsters first.\""; + goto L_Close; + +L_Give_all: + // we need to count how many loop iterations are done there, + // since the server complains about more than 250 (70 according to Jaxad0127) + // gotos without interrupting next statement. + set @gotocounter, 50; + goto L_Give_all_loop; + +L_Give_all_loop: + set @gotocounter, @gotocounter - 1; + if (@gotocounter < 1) goto L_Give_all_next; + set @itemgiveerror, 0; + callsub S_give_item; + if (@itemgiveerror != 0) goto L_Close; + goto L_Give_all_loop; + +L_Give_all_next: + next; + mes "[Ishi the Rewards Master]"; + mes "\"You have received a lot of items. You still have " + Mobpt + " monster points. Shall we continue?\""; + menu + "Yes", L_Give_all, + "No", L_Close; + +L_Close: + set @gotocounter, 0; + set @itemgiveerror, 0; + set @pts, 0; + set @dif, 0; + set @i, 0; + cleararray @Menu$[0], "", 10; + cleararray @Items$[0], "", 10; + close; + +////////////////////////////////////////////////// +// Subroutines +////////////////////////////////////////////////// + +S_prep_menu: + set @pts, Mobpt; + set @dif, tvis; + goto L_Menu_Loop; + +L_Menu_Loop: + if (@pts < @dif || @i == 10) goto L_Menu_Check; + + set @Menu$[@i], @i + 1; + + set @i, @i + 1; + set @pts, @pts - @dif; + set @dif, @dif + 1; + + goto L_Menu_Loop; + +L_Menu_Check: + // if we are able to give 10, we can enable the option to give all we can have + if (@i != 10) goto L_Menu_Done; + set @Menu$[@i], "Please give me as many as I deserve!"; + set @i, @i + 1; + goto L_Menu_Done; + +L_Menu_Done: + set @Menu$[@i], "No thanks"; + return; + +S_give_item: + set @itemgiveerror, 0; + getinventorylist; + if (@inventorylist_count == 100) goto S_give_noinv; + if (Mobpt < tvis) goto S_give_nomobpts; + set Mobpt, Mobpt - tvis; + set tvis, tvis + 1; + set @item$, @Items$[rand(getarraysize(@Items$))]; + + getitem @item$, 1; + + mes "You received one " + getitemname(@item$) + "!"; + return; + +S_give_noinv: + mes "Your inventory is full!"; + set @itemgiveerror, 1; + return; + +S_give_nomobpts: + mes "It looks like your Monster Points were over estimated."; + set @itemgiveerror, 1; + return; +} diff --git a/world/map/npc/029-1/soul-menhir.txt b/world/map/npc/029-1/soul-menhir.txt new file mode 100644 index 00000000..adabfff1 --- /dev/null +++ b/world/map/npc/029-1/soul-menhir.txt @@ -0,0 +1,18 @@ +// + +029-1.gat,39,101,0|script|Soul Menhir#candor|344 +{ + callfunc "ClearVariables"; + set @map$, "029-1.gat"; + setarray @Xs, 38, 39, 40, 38, 40, 38, 39, 40; + setarray @Ys, 100, 100, 100, 101, 101, 102, 102, 102; + set @x, 0; + set @y, 0; + callfunc "SoulMenhir"; + set @map$, ""; + cleararray @Xs[0], 0, getarraysize(@Xs); + cleararray @Ys[0], 0, getarraysize(@Ys); + set @x, 0; + set @y, 0; + close; +} diff --git a/world/map/npc/029-1/traveler.txt b/world/map/npc/029-1/traveler.txt index 9de43b14..13377fbf 100644 --- a/world/map/npc/029-1/traveler.txt +++ b/world/map/npc/029-1/traveler.txt @@ -2,7 +2,7 @@ // Author: Wombat, wushin // cost depending on level and adapted to new scripting guidelines: Jenalya -029-1.gat,69,67,0|script|Knitra the Traveler|103 +029-1.gat,69,68,0|script|Knitra the Traveler|103 { set @NpcName$, "Knitra"; set @NpcTravelBit, $@candor_bit; diff --git a/world/map/npc/029-1/tutorial.txt b/world/map/npc/029-1/tutorial.txt new file mode 100644 index 00000000..6a3df4ff --- /dev/null +++ b/world/map/npc/029-1/tutorial.txt @@ -0,0 +1,75 @@ +// This file is part of the Tutorial +// Author: Jenalya +// if you enter the tutorial area from outside, it is set to be already done +-|script|#TutorialConfig|-1 +{ + end; + +OnInit: + set $@ScorpionFighter, 0; + set $@ScorpionTimer, 0; + set $@ScorpDeath, 0; + set $@SpokeToKaan, (1 << 31); + end; +} +function|script|TutorialState +{ + callfunc "ClearVariables"; + set @tutorial, ((STARTAREA & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT); + set @kaan_talked, (STARTAREA & $@SpokeToKaan); + return; +} +function|script|SetTutorialMask +{ + set STARTAREA, (STARTAREA & ~(NIBBLE_0_MASK) | (@tutorial_tmp << NIBBLE_0_SHIFT)); + set @tutorial_tmp, 0; + return; +} +029-2.gat,21,26,0|script|TutDebug|154 +{ + mes "[TutDebug]"; + mes "Reset?"; + menu + "Reset Kaan/Hasan",L_Kaan, + "Yes.",L_Reset, + "No.",L_Close; + +L_Kaan: + set @tutorial_tmp, 8; + set STARTAREA, (STARTAREA & ~(NIBBLE_0_MASK) | (@tutorial_tmp << NIBBLE_0_SHIFT)); + set STARTAREA, STARTAREA &~ $@SpokeToKaan; + mes "Reset!"; + goto L_Close; + +L_Reset: + set TUT_var, 0; + set @tutorial_tmp, 0; + set STARTAREA, (STARTAREA & ~(NIBBLE_0_MASK) | (@tutorial_tmp << NIBBLE_0_SHIFT)); + set STARTAREA, STARTAREA &~ $@SpokeToKaan; + mes "Reset!"; + goto L_Close; + +L_Close: + close; + +OnInit: + if(!debug) + disablenpc "TutDebug"; + end; +} +029-1.gat,32,99,0|script|#tutorialoutside|45,0,0 +{ + callfunc "TutorialState"; + if (@tutorial >= 8) + goto L_Warp; + goto L_ResetTutorial; + +L_ResetTutorial: + set @tutorial_tmp, 8; + callfunc "SetTutorialMask"; + goto L_Warp; + +L_Warp: + warp "029-2.gat", 114, 92; + end; +} diff --git a/world/map/npc/029-1/valon.txt b/world/map/npc/029-1/valon.txt new file mode 100644 index 00000000..0ce62c79 --- /dev/null +++ b/world/map/npc/029-1/valon.txt @@ -0,0 +1,158 @@ +// This file is part of the Tutorial +// Author: Jenalya, Wushin +-|script|#ValonConfig|-1 +{ + end; + +OnInit: + setarray $@ValonMob, 1002,1050,1046,1003; + setarray $@ValonMobName$, "Maggots","House Maggots","Tame Scorpions","Scorpion"; + setarray $@ValonMobCnt, 10,5,3,1; + end; +} +function|script|ValonState +{ + set @valon_state, ((STARTAREA & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT); + set @valon_mob, 0; + if (@valon_state >= 2) + set @valon_mob, (@valon_state - 2); + set @valon_count, ((STARTAREA & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT); + return; +} +function|script|setValonMask +{ + set STARTAREA, (STARTAREA & ~(NIBBLE_1_MASK) | (@valon_tmp << NIBBLE_1_SHIFT)); + set @valon_tmp, 0; + return; +} +function|script|ResetValonCntMask +{ + set STARTAREA, (STARTAREA & ~(NIBBLE_2_MASK) | (0 << NIBBLE_2_SHIFT)); + return; +} +function|script|AddValonCntMask +{ + set @valon_tmp, (@valon_count + 1); + if (@valon_tmp > $@ValonMobCnt[@valon_mob]) + set @valon_tmp, $@ValonMobCnt[@valon_mob]; + set STARTAREA, (STARTAREA & ~(NIBBLE_2_MASK) | (@valon_tmp << NIBBLE_2_SHIFT)); + set @valon_tmp, 0; + callfunc "ValonProgress"; + return; +} +function|script|ValonProgress +{ + callfunc "ValonState"; + if ((@valon_state > 1) && (@valon_state < 6)) + message strcharinfo(0), $@ValonMobName$[@valon_mob] + ": " + @valon_count + "/" + $@ValonMobCnt[@valon_mob]; + return; +} +029-1.gat,74,86,0|script|ValonDebug|156 +{ + mes "[Valon Debug]"; + mes "Reset?"; + menu + "Yes.", L_Reset, + "No.", L_Close; + +L_Reset: + set STARTAREA, (STARTAREA & ~(NIBBLE_1_MASK) | (0 << NIBBLE_1_SHIFT)); + set STARTAREA, (STARTAREA & ~(NIBBLE_2_MASK) | (0 << NIBBLE_2_SHIFT)); + mes "Reset!"; + goto L_Close; + +L_Close: + close; + +OnInit: + if (!debug) + disablenpc "ValonDebug"; + end; +} +029-1.gat,72,86,0|script|Valon|156 +{ + setarray @npc_loc, 72, 86, 4; + callfunc "PCtoNPCRange"; + if (@npc_check) + goto L_Close; + callfunc "ValonState"; + if (@valon_state >= 6) + goto L_QuestComplete; + if (@valon_start == 1) + goto L_QuestAskAgain; + if (@valon_count >= $@ValonMobCnt[@valon_mob]) + goto L_NextMob; + if ((@valon_state >= 2) && (@valon_state < 6)) + goto L_QuestStarted; + goto L_QuestAsk; + +L_QuestAskAgain: + mes "[Valon]"; + mes "\"Hello, Adventurer! Have you come back to help?\""; + menu + "Yes. I will help with the island beasts.", L_Accept, + "Maybe some other time.", L_Close; + +L_QuestAsk: + mes "[Valon]"; + mes "\"Hello!"; + mes "You're looking for adventures, right?\""; + mes "\"But you shouldn't underestimate this island, it is dangerous.\""; + mes "\"It's crawling with scorpions, and the heat has overcome adventurers tougher than you are.\""; + mes "\"I should know I guard this gate from all manner of island beasts.\""; + mes "\"Maybe you would like help and earn your stripes?\""; + mes "\"The Council of Wizard's does offer a reward for helping...\""; + set @valon_tmp, 1; + callfunc "setValonMask"; + callfunc "ResetValonCntMask"; + menu + "YES!!! let me at them!", L_Accept, + "Maybe some other time.", L_Close; + +L_Accept: + set @valon_tmp, 2; + callfunc "setValonMask"; + callfunc "ValonState"; + goto L_NewMob; + +L_NextMob: + getexp 40, 0; + mes "\"I see you killed all the " + $@ValonMobName$[@valon_mob] + " needed.\""; + mes "\"The Wizard's thank thee as well.\""; + set Zeny, Zeny + 25; + set @valon_tmp, (@valon_state + 1); + callfunc "setValonMask"; + callfunc "ResetValonCntMask"; + callfunc "ValonState"; + if (@valon_mob == getarraysize($@ValonMob)) + goto L_QuestOver; + goto L_NewMob; + +L_NewMob: + mes "\"Let's see whats on the list. Ah ok, I need you to kill me " + $@ValonMobCnt[@valon_mob] + " " + $@ValonMobName$[@valon_mob] + "\""; + mes "\"I'll be waiting here, come back and see after you've killed those mobs.\""; + goto L_Close; + +L_QuestStarted: + mes "[Valon]"; + mes "Hail adventurer! You are well on your way to mastering the beasts of the island.\""; + mes "\"You need to kill " + $@ValonMobName$[@valon_mob] + ": " + @valon_count + "/" + $@ValonMobCnt[@valon_mob] + "\""; + mes "\"Come back and see me when the job is done.\""; + goto L_Close; + +L_QuestOver: + mes "[Valon]"; + mes "\"Thanks once again for helping with the monsters in the island.\""; + getexp 50, 0; + set @valon_tmp, (@valon_state + 1); + callfunc "setValonMask"; + goto L_Close; + +L_QuestComplete: + mes "[Valon]"; + mes "\"Thanks once again for helping with the monsters in the island.\""; + goto L_Close; + +L_Close: + close; +} diff --git a/world/map/npc/029-1/vincent.txt b/world/map/npc/029-1/vincent.txt new file mode 100644 index 00000000..36ce4c2d --- /dev/null +++ b/world/map/npc/029-1/vincent.txt @@ -0,0 +1,150 @@ +// Variables used: nibble 2 of QUEST_SouthTulimshar + +029-1.gat,108,108,0|script|Vincent Debug|113 +{ + mes "[Vincent Debug]"; + mes "Reset?"; + menu + "Yes.", L_Reset, + "No.", L_Close; + +L_Reset: + set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(NIBBLE_2_MASK) | (0 << NIBBLE_2_SHIFT)); + mes "Reset!"; + goto L_Close; + +L_Close: + close; + +OnInit: + if (!debug) + disablenpc "Vincent Debug"; + end; +} +029-1.gat,107,110,0|script|Vincent|113 +{ + // This NPC previously used the variable TMW_Quest + callfunc "ClearVarTMW_Quest"; + set @halloween_npc_id, $@halloween_npc_vincent; + callfunc "TrickOrTreat"; + + set @state, ((QUEST_SouthTulimshar & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT); + + if (@state >= 2) goto L_Done; + if (@state == 1) goto L_Progress; + goto L_Convince_Vincent_First; + +L_Convince_Vincent_First: + mes "[Vincent]"; + mes "\"I'm making an action figure. I'm almost done with it.\""; + next; + + set @TEMP, rand(4); + if(@TEMP == 1) goto L_Opening2; + if(@TEMP == 2) goto L_Opening3; + if(@TEMP == 3) goto L_Opening4; + goto L_Opening1; + +L_Opening1: + mes "\"I just need 5 more Bug Legs to finish my action figure!\""; + next; + goto L_Ask; + +L_Opening2: + mes "\"This maggot action figure is awesome! I just need to attach 5 Bug Legs.\""; + next; + goto L_Ask; + +L_Opening3: + mes "\"This is a great action figure! A must have! All I need is a few parts...\""; + next; + goto L_Ask; + +L_Opening4: + mes "\"Can you get me 5 Bug Legs? I need them to replace the action figure parts.\""; + next; + goto L_Ask; + +L_Ask: + mes "\"Will you help me find 5 Bug Legs?\""; + next; + menu + "Yes.", L_Sure, + "No.", L_Close; + +L_Sure: + set @state, 1; + callsub S_Update_Var; + set @TEMP, rand(4); + if(@TEMP == 1) goto L_Req2; + if(@TEMP == 2) goto L_Req3; + if(@TEMP == 3) goto L_Req4; + goto L_Req1; + +L_Req1: + mes "[Vincent]"; + mes "\"Thank you!\""; + next; + goto L_Wait; + +L_Req2: + mes "[Vincent]"; + mes "\"I don't know how to thank you enough!\""; + next; + goto L_Wait; + +L_Req3: + mes "[Vincent]"; + mes "\"I will thank you when I get them!\""; + next; + goto L_Wait; + +L_Req4: + mes "[Vincent]"; + mes "\"I'm sure I will give a small reward.\""; + next; + goto L_Wait; + +L_Wait: + mes "\"Now please go get me 5 Bug Legs.\""; + goto L_Close; + +L_Progress: + if(countitem("BugLeg") >= 5) + goto L_Have; + mes "[Vincent]"; + mes "\"Please help me collect 5 Bug Legs! I need them to complete my action figure.\""; + goto L_Close; + +L_Have: + mes "[Vincent]"; + mes "\"Excellent! Finally I can complete the model!!\""; + next; + if(countitem("BugLeg") < 5) + goto L_Progress; + delitem "BugLeg", 5; + getexp 50, 0; + set Zeny, Zeny + 1000; + set @state, 2; + callsub S_Update_Var; + + mes "[Vincent]"; + mes "\"Here you go, a little of my appreciation!\""; + mes ""; + mes "[1000 gold]"; + goto L_Close; + +L_Done: + mes "[Vincent]"; + mes "\"Thanks for your help!\""; + goto L_Close; + +L_Close: + set @TEMP, 0; + set @state, 0; + close; + +S_Update_Var: + set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(NIBBLE_2_MASK) | (@state << NIBBLE_2_SHIFT)); + return; +} diff --git a/world/map/npc/029-1/zegas.txt b/world/map/npc/029-1/zegas.txt new file mode 100644 index 00000000..8ecc55e4 --- /dev/null +++ b/world/map/npc/029-1/zegas.txt @@ -0,0 +1,108 @@ +// Barrels +// Author: Wushin +// Npc +029-1.gat,45,85,0|script|Zegas|165 +{ + setarray @npc_loc, 45, 85, 2; + callfunc "PCtoNPCRange"; + if (@npc_check) + goto L_Range; + + callfunc "CheckBarrelQuest"; + if (@barrel_quest == 1) + goto L_Find; + if (@barrel_quest == 2) + goto L_Looking; + if (@barrel_quest == 3) + goto L_QuestEnd; + if (@barrel_quest == 4) + goto L_Thanks; + goto L_Meet; + +L_Range: + message strcharinfo(0), "Whats that? Come closer I can't hear you."; + goto L_Close; + +L_Meet: + mes "[Zegas]"; + mes "\"Hey do you have a second?\""; + next; + mes "\"The storehouse here is over run with house maggots.\""; + next; + mes "\"Wouldn't you know it, the bug bomb Eomie gave us is in one of the store room barrels.\""; + next; + mes "\"Can you search the barrels for the bug bomb and set it off when you find it?\""; + set @barrel_tmp, 1; + callfunc "SetBarrelMask"; + menu + "Sure.",L_Start, + "Maybe some other time.",L_Close; + +L_Find: + mes "[Zegas]"; + mes "\"The storehouse is still over run with house maggots.\""; + next; + mes "\"Please help me find the bug bomb Eomie gave us is in one of the store room barrels?\""; + menu + "Sure.",L_Start, + "Maybe some other time.",L_Close; + +L_Start: + mes "[Zegas]"; + set @barrel_tmp, 2; + callfunc "SetBarrelMask"; + mes "\"Thanks, come back and see me once you found the bug bomb and set it off.\""; + goto L_Close; + +L_Looking: + mes "[Zegas]"; + mes "\"Still haven't found it? Well keep looking I know it's in there some where.\""; + goto L_Close; + +L_QuestEnd: + mes "[Zegas]"; + mes "\"From the smell I can see you found the bug bomb!\""; + mes "\"Thanks once again, I know it's not much but here is 50 GP for your troubles.\""; + getexp 50, 0; + set Zeny, (Zeny + 50); + set @barrel_tmp, 4; + callfunc "SetBarrelMask"; + goto L_Close; + +L_Thanks: + mes "[Zegas]"; + mes "\"Thanks for Helping with clear out the store room!\""; + goto L_Close; + +L_Close: + close; +} +029-1.gat,47,86,0|script|ZegasDebug|165 +{ + mes "[Zegas Debug]"; + mes "Reset ?"; + menu + "Yes.", L_Reset, + "No.", L_Close; + +L_Reset: + set STARTAREA, (STARTAREA & ~(NIBBLE_4_MASK) | (0 << NIBBLE_4_SHIFT)); + set STARTAREA, STARTAREA &~ (1 << 20); + set STARTAREA, STARTAREA &~ (1 << 21); + set STARTAREA, STARTAREA &~ (1 << 22); + set STARTAREA, STARTAREA &~ (1 << 23); + set STARTAREA, STARTAREA &~ (1 << 24); + set STARTAREA, STARTAREA &~ (1 << 25); + set STARTAREA, STARTAREA &~ (1 << 26); + set STARTAREA, STARTAREA &~ (1 << 27); + mes "Reset!"; + goto L_Close; + +L_Close: + close; + +OnInit: + if (!debug) + disablenpc "ZegasDebug"; + end; +} |