From f4aad0b8a088ffbd648bb1fcace56d2f8dc96909 Mon Sep 17 00:00:00 2001 From: wushin Date: Fri, 21 Jun 2013 11:28:26 -0500 Subject: New server content to support new caves Added mobs:Angry Fire Goblin, Angry Sea Slime, Angry Green Slime. Moved NPCs in sandstorm around. Malvox got a house and lives in it now on 002-2 The mines go a layer deeper so the merchant was moved into the camp along with nathan. Naem and Sema moved down with respective maps. Sandstorm_mine_barrier is not mining_camp_barrier --- world/map/data/resnametable.txt | 5 + world/map/db/mob_db.txt | 7 + world/map/npc/002-1/merchant.txt | 3 - world/map/npc/002-1/rogue.txt | 53 ------- world/map/npc/002-1/sandstorm_mine_barrier.txt | 22 --- world/map/npc/002-2/rogue.txt | 53 +++++++ world/map/npc/002-3/merchant.txt | 3 + world/map/npc/002-3/mine_triggerone.txt | 67 --------- world/map/npc/002-3/mine_triggerthree.txt | 67 --------- world/map/npc/002-3/mine_triggertwo.txt | 70 ---------- world/map/npc/002-3/mining_camp_barrier.txt | 22 +++ world/map/npc/002-3/naem.txt | 152 --------------------- world/map/npc/002-3/nathan.txt | 2 +- world/map/npc/002-3/underground_palace_barrier.txt | 22 --- world/map/npc/002-4/chest.txt | 51 ------- world/map/npc/002-4/mine_triggerone.txt | 67 +++++++++ world/map/npc/002-4/mine_triggerthree.txt | 67 +++++++++ world/map/npc/002-4/mine_triggertwo.txt | 70 ++++++++++ world/map/npc/002-4/miners.txt | 78 ----------- world/map/npc/002-4/naem.txt | 152 +++++++++++++++++++++ world/map/npc/002-4/underground_palace_barrier.txt | 22 +++ world/map/npc/002-5/chest.txt | 51 +++++++ world/map/npc/002-5/sema.txt | 78 +++++++++++ 23 files changed, 598 insertions(+), 586 deletions(-) delete mode 100644 world/map/npc/002-1/merchant.txt delete mode 100644 world/map/npc/002-1/rogue.txt delete mode 100644 world/map/npc/002-1/sandstorm_mine_barrier.txt create mode 100644 world/map/npc/002-2/rogue.txt create mode 100644 world/map/npc/002-3/merchant.txt delete mode 100644 world/map/npc/002-3/mine_triggerone.txt delete mode 100644 world/map/npc/002-3/mine_triggerthree.txt delete mode 100644 world/map/npc/002-3/mine_triggertwo.txt create mode 100644 world/map/npc/002-3/mining_camp_barrier.txt delete mode 100644 world/map/npc/002-3/naem.txt delete mode 100644 world/map/npc/002-3/underground_palace_barrier.txt delete mode 100644 world/map/npc/002-4/chest.txt create mode 100644 world/map/npc/002-4/mine_triggerone.txt create mode 100644 world/map/npc/002-4/mine_triggerthree.txt create mode 100644 world/map/npc/002-4/mine_triggertwo.txt delete mode 100644 world/map/npc/002-4/miners.txt create mode 100644 world/map/npc/002-4/naem.txt create mode 100644 world/map/npc/002-4/underground_palace_barrier.txt create mode 100644 world/map/npc/002-5/chest.txt create mode 100644 world/map/npc/002-5/sema.txt diff --git a/world/map/data/resnametable.txt b/world/map/data/resnametable.txt index 07f1f6a2..552a135b 100644 --- a/world/map/data/resnametable.txt +++ b/world/map/data/resnametable.txt @@ -2,8 +2,10 @@ 001-2.gat#001-2.wlk# 001-3.gat#001-3.wlk# 002-1.gat#002-1.wlk# +002-2.gat#002-2.wlk# 002-3.gat#002-3.wlk# 002-4.gat#002-4.wlk# +002-5.gat#002-5.wlk# 003-1.gat#003-1.wlk# 003-2.gat#003-2.wlk# 004-1.gat#004-1.wlk# @@ -54,6 +56,7 @@ 020-3.gat#020-3.wlk# 021-1.gat#021-1.wlk# 021-2.gat#021-2.wlk# +021-3.gat#021-3.wlk# 022-1.gat#022-1.wlk# 024-1.gat#024-1.wlk# 024-2.gat#024-2.wlk# @@ -85,6 +88,8 @@ 041-1.gat#041-1.wlk# 042-1.gat#042-1.wlk# 042-2.gat#042-2.wlk# +043-1.gat#043-1.wlk# +043-3.gat#043-3.wlk# 044-1.gat#044-1.wlk# 044-3.gat#044-3.wlk# 045-1.gat#045-1.wlk# diff --git a/world/map/db/mob_db.txt b/world/map/db/mob_db.txt index b1bc5b3b..b2292884 100644 --- a/world/map/db/mob_db.txt +++ b/world/map/db/mob_db.txt @@ -113,5 +113,12 @@ 1101, DemonicSpirit, DemonicSpirit, 72, 1505, 0, 0, 63, 1, 125, 175, 4, 6, 20, 40, 10, 10, 110, 45, 1, 1, 1, 0, 89, 133, 230, 900, 672, 480, 631, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 30 1102, Luvia, Luvia, 127, 48044, 60, 0, 29216, 5, 339, 364, 50, 92, 1, 29, 55, 255, 255, 255, 31, 30, 1, 0, 69, 181, 220, 1200, 672, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 1103, WitchGuard, WitchGuard, 84, 9742, 0, 0, 510, 2, 200, 220, 25, 50, 90, 65, 45, 5, 120, 69, 1, 1, 1, 0, 89, 133, 290, 1200, 672, 30, 631, 2000, 631, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 40 +//1104, Reserved for DemonicMouboo +//1105, Reserved for ViciousSquirrel +//1106, Reserved for WickedMushroom +//1107, Reserved for Bluepar +1108, AngryFireGoblin, AngryFireGoblin, 30, 320, 0, 0, 4, 1, 25, 40, 0, 10, 3, 3, 3, 2, 10, 50, 1, 1, 1, 3, 23, 133, 800, 1872, 672, 480, 505, 800, 501, 150, 518, 800, 502, 150, 521, 70, 522, 10, 701, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 30 +1109, AngrySeaSlime, AngrySeaSlime, 80, 1200, 0, 0, 23, 1, 40, 70, 13, 17, 3, 30, 3, 0, 35, 35, 1, 1, 1, 0, 41, 135, 1500, 1872, 672, 480, 535, 800, 657, 800, 518, 500, 510, 1000, 700, 100, 1199, 5000, 568, 100, 541, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +1110, AngryGreenSlime, AngryGreenSlime, 60, 1000, 0, 0, 126, 1, 100, 160, 20, 30, 20, 30, 10, 10, 30, 30, 1, 1, 1, 0, 21, 175, 1200, 1872, 672, 480, 502, 200, 4004, 20, 501, 100, 521, 250, 522, 200, 526, 500, 503, 500, 535, 750, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 20 #ID, Name, Jname, LV, HP, SP, EXP, JEXP, Range1, ATK1, ATK2, DEF, MDEF, STR, AGI, VIT, INT, DEX, LUK, Range2, Range3, Scale, Race, Element,Mode, Speed, Adelay, Amotion,Dmotion,Drop1id,Drop1per, Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per, Drop8id,Drop8per,Item1, Item2, MEXP, ExpPer, MVP1id, MVP1per,MVP2id, MVP2per,MVP3id, MVP3per,mutationcount,mutationstrength diff --git a/world/map/npc/002-1/merchant.txt b/world/map/npc/002-1/merchant.txt deleted file mode 100644 index b1b2c3fd..00000000 --- a/world/map/npc/002-1/merchant.txt +++ /dev/null @@ -1,3 +0,0 @@ -// - -002-1.gat,19,99,0|shop|Ishyah|109,MinersHat :-1,MinerGloves :-1,ShortBow :-1,Arrow :-1,LeatherShield :-1 diff --git a/world/map/npc/002-1/rogue.txt b/world/map/npc/002-1/rogue.txt deleted file mode 100644 index 7358230c..00000000 --- a/world/map/npc/002-1/rogue.txt +++ /dev/null @@ -1,53 +0,0 @@ -// - -002-1.gat,22,21,0|script|Malivox|103,{ - -// if (ResetA_charstate == 1) goto L_Multiple; - -// set @cost, 10000000 / ($ResetA_uses + 1); - - set @cost, BaseLevel * 100; - - mes "[Rogue Mage]"; - mes "\"I have come across a spell that will"; - mes "reset your status points."; - mes "Normally this spell is expensive, but"; - mes "due to an unusual constellation of the"; - mes "stars I can cast it very cheaply!"; - mes "For you it will cost only "+@cost+" gp.\""; - next; - menu - "Reset my stats",-, - "Forget about it",L_Pass; - - if (Zeny<@cost) goto L_NoMoney; - -// set $ResetA_uses, $ResetA_uses + 1; -// set ResetA_charstate, 1; - -L_Reset: - set Zeny, Zeny-@cost; - resetstatus; - - mes "[Rogue Mage]"; - mes "\"There you are."; - mes ""; - mes "Good as new!\""; - goto L_Close; - -L_Pass: - mes "[Rogue Mage]"; - mes "\"Very well then, see you.\""; - goto L_Close; - -L_NoMoney: - mes "[Rogue Mage]"; - mes "\"Oh dear, the price cannot be bargained."; - mes ""; - mes "Perhaps you can borrow from a friend?\""; - goto L_Close; - -L_Close: - set @cost, 0; - close; -} diff --git a/world/map/npc/002-1/sandstorm_mine_barrier.txt b/world/map/npc/002-1/sandstorm_mine_barrier.txt deleted file mode 100644 index 49c9b733..00000000 --- a/world/map/npc/002-1/sandstorm_mine_barrier.txt +++ /dev/null @@ -1,22 +0,0 @@ -//Sandstorm mine barrier - -002-1.gat,20,94,0|script|#Sandstorm_Mine_Barrier|45,0,0,{ - - // This NPC previously used the variable TMW_Quest - callfunc "ClearVarTMW_Quest"; - - set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT); - - if (@state >= 8) goto L_Sandstorm_Barrier_Open; - - message strcharinfo(0), "Some force seems to block your entrance."; - goto L_End; - -L_Sandstorm_Barrier_Open: - warp "002-3.gat",37,31; - goto L_End; - -L_End: - set @state, 0; - end; -} diff --git a/world/map/npc/002-2/rogue.txt b/world/map/npc/002-2/rogue.txt new file mode 100644 index 00000000..f8245da5 --- /dev/null +++ b/world/map/npc/002-2/rogue.txt @@ -0,0 +1,53 @@ +// + +002-2.gat,25,28,0|script|Malivox|103,{ + +// if (ResetA_charstate == 1) goto L_Multiple; + +// set @cost, 10000000 / ($ResetA_uses + 1); + + set @cost, BaseLevel * 100; + + mes "[Rogue Mage]"; + mes "\"I have come across a spell that will"; + mes "reset your status points."; + mes "Normally this spell is expensive, but"; + mes "due to an unusual constellation of the"; + mes "stars I can cast it very cheaply!"; + mes "For you it will cost only "+@cost+" gp.\""; + next; + menu + "Reset my stats",-, + "Forget about it",L_Pass; + + if (Zeny<@cost) goto L_NoMoney; + +// set $ResetA_uses, $ResetA_uses + 1; +// set ResetA_charstate, 1; + +L_Reset: + set Zeny, Zeny-@cost; + resetstatus; + + mes "[Rogue Mage]"; + mes "\"There you are."; + mes ""; + mes "Good as new!\""; + goto L_Close; + +L_Pass: + mes "[Rogue Mage]"; + mes "\"Very well then, see you.\""; + goto L_Close; + +L_NoMoney: + mes "[Rogue Mage]"; + mes "\"Oh dear, the price cannot be bargained."; + mes ""; + mes "Perhaps you can borrow from a friend?\""; + goto L_Close; + +L_Close: + set @cost, 0; + close; +} diff --git a/world/map/npc/002-3/merchant.txt b/world/map/npc/002-3/merchant.txt new file mode 100644 index 00000000..3eb2f426 --- /dev/null +++ b/world/map/npc/002-3/merchant.txt @@ -0,0 +1,3 @@ +// + +002-3.gat,60,47,0|shop|Ishyah|109,MinersHat :-1,MinerGloves :-1,ShortBow :-1,Arrow :-1,LeatherShield :-1 diff --git a/world/map/npc/002-3/mine_triggerone.txt b/world/map/npc/002-3/mine_triggerone.txt deleted file mode 100644 index 05aa1c01..00000000 --- a/world/map/npc/002-3/mine_triggerone.txt +++ /dev/null @@ -1,67 +0,0 @@ -//Sandstorm mine trigger 1 Trigger 002-3 35,43 (127) -// Variables used: nibble 4 and 5 of QUEST_SouthTulimshar - -002-3.gat,30,47,0|script|Button|400,0,0,{ - - // This NPC previously used the variable TMW_Quest - callfunc "ClearVarTMW_Quest"; - - set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT); - - if (@state == 24) goto L_Trigger_Wrong_1; - if (@state == 23) goto L_Trigger_Wrong_1; - if (@state == 22) goto L_Trigger_1; - - mes "There is a large button on the ground. A key hole appears on the button."; - goto L_Close; - -L_Trigger_Wrong_1: - mes "There is a large button on the ground. A key hole appears on the button."; - menu - "Put the key in, turn right.", L_Right_Wrong_1, - "Put the key in, turn left.", L_Left_Wrong_1, - "Do nothing.", L_Nothing_1; - -L_Right_Wrong_1: - set @state, 22; - callsub S_Update_Var; - mes "You turn the key right."; - goto L_Close; - -L_Left_Wrong_1: - set @state, 22; - callsub S_Update_Var; - mes "You turn the key left."; - goto L_Close; - -L_Trigger_1: - mes "There is a large button on the ground. A key hole appears on the button."; - menu - "Put the key in, turn right.", L_Right_1, - "Put the key in, turn left.", L_Left_1, - "Do nothing.", L_Nothing_1; - -L_Right_1: - set @state, 23; - callsub S_Update_Var; - mes "You turn the key right. A clicking sound echoes throughout the mine."; - goto L_Close; - -L_Left_1: - set @state, 22; - callsub S_Update_Var; - mes "You turn the key left."; - goto L_Close; - -L_Nothing_1: - mes "You leave the button alone."; - goto L_Close; - -L_Close: - set @state, 0; - close; - -S_Update_Var: - set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(BYTE_2_MASK) | (@state << BYTE_2_SHIFT)); - return; -} diff --git a/world/map/npc/002-3/mine_triggerthree.txt b/world/map/npc/002-3/mine_triggerthree.txt deleted file mode 100644 index 0bfecd22..00000000 --- a/world/map/npc/002-3/mine_triggerthree.txt +++ /dev/null @@ -1,67 +0,0 @@ -//Sandstorm mine trigger 3 Trigger 002-3 98,42 (127) -// Variables used: nibble 4 and 5 of QUEST_SouthTulimshar - -002-3.gat,91,99,0|script|Button|400,0,0,{ - - // This NPC previously used the variable TMW_Quest - callfunc "ClearVarTMW_Quest"; - - set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT); - - if (@state == 24) goto L_Trigger_Wrong_3; - if (@state == 23) goto L_Trigger_3; - if (@state == 22) goto L_Trigger_Wrong_3; - - mes "There is a large button on the ground. A key hole appears on the button."; - goto L_Close; - -L_Trigger_Wrong_3: - mes "There is a large button on the ground. A key hole appears on the button."; - menu - "Put the key in, turn right.", L_Right_Wrong_3, - "Put the key in, turn left.", L_Left_Wrong_3, - "Do nothing.", L_Nothing_3; - -L_Right_Wrong_3: - set @state, 22; - callsub S_Update_Var; - mes "You turn the key right."; - goto L_Close; - -L_Left_Wrong_3: - set @state, 22; - callsub S_Update_Var; - mes "You turn the key left."; - goto L_Close; - -L_Trigger_3: - mes "There is a large button on the ground. A key hole appears on the button."; - menu - "Put the key in, turn right.", L_Right_3, - "Put the key in, turn left.", L_Left_3, - "Do nothing.", L_Nothing_3; - -L_Right_3: - set @state, 22; - callsub S_Update_Var; - mes "You turn the key right."; - goto L_Close; - -L_Left_3: - set @state, 24; - callsub S_Update_Var; - mes "You turn the key left. A clicking sound echoes throughout the mine."; - goto L_Close; - -L_Nothing_3: - mes "You leave the button alone."; - goto L_Close; - -L_Close: - set @state, 0; - close; - -S_Update_Var: - set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(BYTE_2_MASK) | (@state << BYTE_2_SHIFT)); - return; -} diff --git a/world/map/npc/002-3/mine_triggertwo.txt b/world/map/npc/002-3/mine_triggertwo.txt deleted file mode 100644 index d18712ee..00000000 --- a/world/map/npc/002-3/mine_triggertwo.txt +++ /dev/null @@ -1,70 +0,0 @@ -//Sandstorm mine trigger -// Variables used: -// - nibble 4 and 5 of QUEST_SouthTulimshar -// - in FLAGS, FLAG_OPENED_UNDERGROUND - -002-3.gat,100,37,0|script|Button|400,0,0,{ - - // This NPC previously used the variable TMW_Quest - callfunc "ClearVarTMW_Quest"; - - set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT); - - if (@state == 24) goto L_Trigger_2; - if (@state == 23) goto L_Trigger_Wrong_2; - if (@state == 22) goto L_Trigger_Wrong_2; - - mes "There is a large button on the ground. A key hole appears on the button."; - goto L_Close; - -L_Trigger_Wrong_2: - mes "There is a large button on the ground. A key hole appears on the button."; - menu - "Put the key in, turn right.", L_Right_Wrong_2, - "Put the key in, turn left.", L_Left_Wrong_2, - "Do nothing.", L_Nothing_2; - -L_Right_Wrong_2: - set @state, 22; - callsub S_Update_Var; - mes "You turn the key right."; - goto L_Close; - -L_Left_Wrong_2: - set @state, 22; - callsub S_Update_Var; - mes "You turn the key left."; - goto L_Close; - -L_Trigger_2: - mes "There is a large button on the ground. A key hole appears on the button."; - menu - "Put the key in, turn right.", L_Right_2, - "Put the key in, turn left.", L_Left_2, - "Do nothing.", L_Nothing_2; - -L_Right_2: - set @state, 22; - callsub S_Update_Var; - mes "You turn the key right."; - goto L_Close; - -L_Left_2: - set @state, 25; - callsub S_Update_Var; - set FLAGS, FLAGS | FLAG_OPENED_UNDERGROUND; - mes "You turn the key left. A clicking sound echoes throughout the mine, followed by a loud thump."; - goto L_Close; - -L_Nothing_2: - mes "You leave the button alone."; - goto L_Close; - -L_Close: - set @state, 0; - close; - -S_Update_Var: - set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(BYTE_2_MASK) | (@state << BYTE_2_SHIFT)); - return; -} diff --git a/world/map/npc/002-3/mining_camp_barrier.txt b/world/map/npc/002-3/mining_camp_barrier.txt new file mode 100644 index 00000000..84a239e8 --- /dev/null +++ b/world/map/npc/002-3/mining_camp_barrier.txt @@ -0,0 +1,22 @@ +//Sandstorm mine barrier + +002-3.gat,82,32,0|script|#Sandstorm_Mine_Barrier|45,0,0,{ + + // This NPC previously used the variable TMW_Quest + callfunc "ClearVarTMW_Quest"; + + set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT); + + if (@state >= 8) goto L_Sandstorm_Barrier_Open; + + message strcharinfo(0), "Some force seems to block your entrance."; + goto L_End; + +L_Sandstorm_Barrier_Open: + warp "002-4.gat",37,31; + goto L_End; + +L_End: + set @state, 0; + end; +} diff --git a/world/map/npc/002-3/naem.txt b/world/map/npc/002-3/naem.txt deleted file mode 100644 index bfcde613..00000000 --- a/world/map/npc/002-3/naem.txt +++ /dev/null @@ -1,152 +0,0 @@ -// Variables used: -// - nibble 4 and 5 of QUEST_SouthTulimshar -// - in FLAGS, bits FLAG_GOT_NAEM_GLOVES and FLAG_OPENED_UNDERGROUND - -002-3.gat,85,97,6|script|Naem|109,{ - - // This NPC previously used the variable TMW_Quest - callfunc "ClearVarTMW_Quest"; - - set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT); - - if (FLAGS & FLAG_GOT_NAEM_GLOVES) goto L_Naem_Complete; - if (FLAGS & FLAG_OPENED_UNDERGROUND) goto L_Naem_Gloves; - if (@state == 22) goto L_Naem_Code; - if (@state == 21) goto L_Naem_Lt; - if (@state == 20) goto L_Naem_Memory; - if ((@state > 17) && (@state < 19)) - goto L_Naem_Great; - if (@state == 17) goto L_Naem_Waits_3; - if (@state == 16) goto L_Naem_Help_3; - if (@state == 15) goto L_Naem_Waits_2; - if (@state == 14) goto L_Naem_Help_2; - if (@state == 13) goto L_Naem_Waits_1; - if (@state == 12) goto L_Naem_Help_1; - if (@state == 10) goto L_Naem_Cool; - if (@state == 9) goto L_Naem_Okay; - - mes "[Naem]"; - mes "\"I'm just mining away here. Lots of work to do.\""; - goto L_Close; - -L_Naem_Okay: - set @state, 10; - callsub S_Update_Var; - mes "[Naem]"; - mes "\"Oh, hello there. Nickos wanted you to check on me? Yeah, you can tell him I'm okay.\""; - goto L_Close; - -L_Naem_Cool: - mes "[Naem]"; - mes "\"Yeah, I'm cool. Just mining away here.\""; - goto L_Close; - -L_Naem_Help_1: - set @state, 13; - callsub S_Update_Var; - mes "[Naem]"; - mes "\"Oh, you are here to help move my bags? Cool, I've got a few ready to go. Go ahead and take this one!\""; - next; - mes "Naem hands you a bag of ore."; - next; - mes "[Naem]"; - mes "\"After you deliver that one to Nathan, come on back, I've got a couple more ready to go.\""; - goto L_Close; - -L_Naem_Waits_1: - mes "[Naem]"; - mes "\"After you deliver that bag of ore to Nathan, come on back, I've got a couple more ready to go.\""; - goto L_Close; - -L_Naem_Help_2: - set @state, 15; - callsub S_Update_Var; - mes "Naem gives you a bag of ore."; - next; - mes "[Naem]"; - mes "\"Just one more after this one and we'll be all caught up!\""; - goto L_Close; - -L_Naem_Waits_2: - mes "[Naem]"; - mes "\"Just one more bag of ore after the one you got and we'll be all caught up!\""; - goto L_Close; - -L_Naem_Help_3: - set @state, 17; - callsub S_Update_Var; - mes "[Naem]"; - mes "Hands a bag of ore to you."; - next; - mes "\"Last one!\""; - goto L_Close; - -L_Naem_Waits_3: - mes "[Naem]"; - mes "\"You got my last sack already. Just give it to Nathan and we'll have caught up.\""; - goto L_Close; - -L_Naem_Great: - mes "[Naem]"; - mes "\"Hi ho! It's off to work I go! I work every day for meager pay, a miner's life for me...\""; - goto L_Close; - -L_Naem_Memory: - mes "You see Naem grimacing in pain as you approach."; - next; - mes "[Naem]"; - mes "\"Oh, my head! Some rocks fell on me and bonked me pretty good. I'm still a little sore.\""; - menu - "Don't you have a key so I can go to the underground palace?", L_Naem_Palace_No, - "You should be more careful.", L_Naem_Duh; - -L_Naem_Duh: - mes "[Naem]"; - mes "\"I guess I should...\""; - goto L_Close; - -L_Naem_Palace_No: - set @state, 21; - callsub S_Update_Var; - mes "[Naem]"; - mes "\"Oh no! I lost the key! Don't worry though, talk to Lieutenant Dausen about getting the spare key.\""; - goto L_Close; - -L_Naem_Lt: - mes "[Naem]"; - mes "\"I hurt my head pretty bad. I also lost my key. If you want to get into the underground palace, you'll have to talk to Lieutenant Dausen about getting the spare.\""; - goto L_Close; - -L_Naem_Code: - mes "[Naem]"; - mes "\"Oh, you got the key. That is good! But my head still hurts... All I remember about the code is you have to put the key into the key hole buttons around the mine in a certain order and turn them in a certain order and it will unlock the underground palace. Sorry, that's all I have for you. Good luck!\""; - goto L_Close; - -L_Naem_Gloves: - getinventorylist; - if (@inventorylist_count == 100) - goto L_Nathan_TooMany; - set FLAGS, FLAGS | FLAG_GOT_NAEM_GLOVES; - getitem "MinerGloves", 1; - mes "[Naem]"; - mes "\"Hey, good job on getting that together! Take these gloves, they might prove useful in the underground palace.\""; - goto L_Close; - -L_Naem_TooMany: - mes "[Naem]"; - mes "\"You have too many items for me to give you a reward.\""; - goto L_Close; - -L_Naem_Complete: - mes "[Naem]"; - mes "\"Yo-ho-ho, a miner's life for me!\""; - goto L_Close; - -L_Close: - set @state, 0; - close; - -S_Update_Var: - set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(BYTE_2_MASK) | (@state << BYTE_2_SHIFT)); - return; -} diff --git a/world/map/npc/002-3/nathan.txt b/world/map/npc/002-3/nathan.txt index b668f7b7..675f01ea 100644 --- a/world/map/npc/002-3/nathan.txt +++ b/world/map/npc/002-3/nathan.txt @@ -1,6 +1,6 @@ // Variables used: nibble 4 and 5 of QUEST_SouthTulimshar -002-3.gat,35,35,6|script|Nathan|109,{ +002-3.gat,42,45,6|script|Nathan|109,{ // This NPC previously used the variable TMW_Quest callfunc "ClearVarTMW_Quest"; diff --git a/world/map/npc/002-3/underground_palace_barrier.txt b/world/map/npc/002-3/underground_palace_barrier.txt deleted file mode 100644 index a56fe801..00000000 --- a/world/map/npc/002-3/underground_palace_barrier.txt +++ /dev/null @@ -1,22 +0,0 @@ -//underground palace barrier - -002-3.gat,68,98,0|script|#UGP_Barrier|45,0,0,{ - - // This NPC previously used the variable TMW_Quest - callfunc "ClearVarTMW_Quest"; - - set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT); - - if (@state >= 25) goto L_Underground_Palace_Barrier_Open; - - message strcharinfo(0), "Some force seems to block your entrance."; - goto L_End; - -L_Underground_Palace_Barrier_Open: - warp "002-4.gat",34,98; - goto L_End; - -L_End: - set @state, 0; - end; -} diff --git a/world/map/npc/002-4/chest.txt b/world/map/npc/002-4/chest.txt deleted file mode 100644 index 61b59109..00000000 --- a/world/map/npc/002-4/chest.txt +++ /dev/null @@ -1,51 +0,0 @@ -// Variables used: nibble 4 and 5 of QUEST_SouthTulimshar - -002-4.gat,93,37,0|script|Treasure|111,{ - - // This NPC previously used the variable TMW_Quest - callfunc "ClearVarTMW_Quest"; - - set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT); - - if (@state >= 26) goto L_Finished; - - mes "There is a chest here."; - mes "Do you want to try to open it?"; - next; - menu - "Yes.", L_Yes, - "No.", L_Close; - -L_Yes: - if (countitem("TreasureKey") < 3) - goto L_Not_Enough; - getinventorylist; - if (@inventorylist_count == 100 && countitem("TreasureKey") > 3) - goto L_TooMany; - mes "You opened the chest and found a short bow!"; - delitem "TreasureKey", 3; - getitem "ShortBow", 1; - set @state, 26; - callsub S_Update_Var; - goto L_Close; - -L_Not_Enough: - mes "It seems that you do not have the right key for this chest yet..."; - goto L_Close; - -L_Finished: - mes "You have already opened this chest."; - goto L_Close; - -L_TooMany: - mes "You do not have enough room to loot this chest. Maybe you should try again later."; - goto L_Close; - -L_Close: - set @state, 0; - close; - -S_Update_Var: - set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(BYTE_2_MASK) | (@state << BYTE_2_SHIFT)); - return; -} diff --git a/world/map/npc/002-4/mine_triggerone.txt b/world/map/npc/002-4/mine_triggerone.txt new file mode 100644 index 00000000..df29393e --- /dev/null +++ b/world/map/npc/002-4/mine_triggerone.txt @@ -0,0 +1,67 @@ +//Sandstorm mine trigger 1 Trigger 002-4 35,43 (127) +// Variables used: nibble 4 and 5 of QUEST_SouthTulimshar + +002-4.gat,30,47,0|script|Button|400,0,0,{ + + // This NPC previously used the variable TMW_Quest + callfunc "ClearVarTMW_Quest"; + + set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT); + + if (@state == 24) goto L_Trigger_Wrong_1; + if (@state == 23) goto L_Trigger_Wrong_1; + if (@state == 22) goto L_Trigger_1; + + mes "There is a large button on the ground. A key hole appears on the button."; + goto L_Close; + +L_Trigger_Wrong_1: + mes "There is a large button on the ground. A key hole appears on the button."; + menu + "Put the key in, turn right.", L_Right_Wrong_1, + "Put the key in, turn left.", L_Left_Wrong_1, + "Do nothing.", L_Nothing_1; + +L_Right_Wrong_1: + set @state, 22; + callsub S_Update_Var; + mes "You turn the key right."; + goto L_Close; + +L_Left_Wrong_1: + set @state, 22; + callsub S_Update_Var; + mes "You turn the key left."; + goto L_Close; + +L_Trigger_1: + mes "There is a large button on the ground. A key hole appears on the button."; + menu + "Put the key in, turn right.", L_Right_1, + "Put the key in, turn left.", L_Left_1, + "Do nothing.", L_Nothing_1; + +L_Right_1: + set @state, 23; + callsub S_Update_Var; + mes "You turn the key right. A clicking sound echoes throughout the mine."; + goto L_Close; + +L_Left_1: + set @state, 22; + callsub S_Update_Var; + mes "You turn the key left."; + goto L_Close; + +L_Nothing_1: + mes "You leave the button alone."; + goto L_Close; + +L_Close: + set @state, 0; + close; + +S_Update_Var: + set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(BYTE_2_MASK) | (@state << BYTE_2_SHIFT)); + return; +} diff --git a/world/map/npc/002-4/mine_triggerthree.txt b/world/map/npc/002-4/mine_triggerthree.txt new file mode 100644 index 00000000..621da0b2 --- /dev/null +++ b/world/map/npc/002-4/mine_triggerthree.txt @@ -0,0 +1,67 @@ +//Sandstorm mine trigger 3 Trigger 002-4 98,42 (127) +// Variables used: nibble 4 and 5 of QUEST_SouthTulimshar + +002-4.gat,91,99,0|script|Button|400,0,0,{ + + // This NPC previously used the variable TMW_Quest + callfunc "ClearVarTMW_Quest"; + + set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT); + + if (@state == 24) goto L_Trigger_Wrong_3; + if (@state == 23) goto L_Trigger_3; + if (@state == 22) goto L_Trigger_Wrong_3; + + mes "There is a large button on the ground. A key hole appears on the button."; + goto L_Close; + +L_Trigger_Wrong_3: + mes "There is a large button on the ground. A key hole appears on the button."; + menu + "Put the key in, turn right.", L_Right_Wrong_3, + "Put the key in, turn left.", L_Left_Wrong_3, + "Do nothing.", L_Nothing_3; + +L_Right_Wrong_3: + set @state, 22; + callsub S_Update_Var; + mes "You turn the key right."; + goto L_Close; + +L_Left_Wrong_3: + set @state, 22; + callsub S_Update_Var; + mes "You turn the key left."; + goto L_Close; + +L_Trigger_3: + mes "There is a large button on the ground. A key hole appears on the button."; + menu + "Put the key in, turn right.", L_Right_3, + "Put the key in, turn left.", L_Left_3, + "Do nothing.", L_Nothing_3; + +L_Right_3: + set @state, 22; + callsub S_Update_Var; + mes "You turn the key right."; + goto L_Close; + +L_Left_3: + set @state, 24; + callsub S_Update_Var; + mes "You turn the key left. A clicking sound echoes throughout the mine."; + goto L_Close; + +L_Nothing_3: + mes "You leave the button alone."; + goto L_Close; + +L_Close: + set @state, 0; + close; + +S_Update_Var: + set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(BYTE_2_MASK) | (@state << BYTE_2_SHIFT)); + return; +} diff --git a/world/map/npc/002-4/mine_triggertwo.txt b/world/map/npc/002-4/mine_triggertwo.txt new file mode 100644 index 00000000..04e54462 --- /dev/null +++ b/world/map/npc/002-4/mine_triggertwo.txt @@ -0,0 +1,70 @@ +//Sandstorm mine trigger +// Variables used: +// - nibble 4 and 5 of QUEST_SouthTulimshar +// - in FLAGS, FLAG_OPENED_UNDERGROUND + +002-4.gat,100,37,0|script|Button|400,0,0,{ + + // This NPC previously used the variable TMW_Quest + callfunc "ClearVarTMW_Quest"; + + set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT); + + if (@state == 24) goto L_Trigger_2; + if (@state == 23) goto L_Trigger_Wrong_2; + if (@state == 22) goto L_Trigger_Wrong_2; + + mes "There is a large button on the ground. A key hole appears on the button."; + goto L_Close; + +L_Trigger_Wrong_2: + mes "There is a large button on the ground. A key hole appears on the button."; + menu + "Put the key in, turn right.", L_Right_Wrong_2, + "Put the key in, turn left.", L_Left_Wrong_2, + "Do nothing.", L_Nothing_2; + +L_Right_Wrong_2: + set @state, 22; + callsub S_Update_Var; + mes "You turn the key right."; + goto L_Close; + +L_Left_Wrong_2: + set @state, 22; + callsub S_Update_Var; + mes "You turn the key left."; + goto L_Close; + +L_Trigger_2: + mes "There is a large button on the ground. A key hole appears on the button."; + menu + "Put the key in, turn right.", L_Right_2, + "Put the key in, turn left.", L_Left_2, + "Do nothing.", L_Nothing_2; + +L_Right_2: + set @state, 22; + callsub S_Update_Var; + mes "You turn the key right."; + goto L_Close; + +L_Left_2: + set @state, 25; + callsub S_Update_Var; + set FLAGS, FLAGS | FLAG_OPENED_UNDERGROUND; + mes "You turn the key left. A clicking sound echoes throughout the mine, followed by a loud thump."; + goto L_Close; + +L_Nothing_2: + mes "You leave the button alone."; + goto L_Close; + +L_Close: + set @state, 0; + close; + +S_Update_Var: + set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(BYTE_2_MASK) | (@state << BYTE_2_SHIFT)); + return; +} diff --git a/world/map/npc/002-4/miners.txt b/world/map/npc/002-4/miners.txt deleted file mode 100644 index 3fa17e35..00000000 --- a/world/map/npc/002-4/miners.txt +++ /dev/null @@ -1,78 +0,0 @@ -// Variables used: nibble 4 and 5 of QUEST_SouthTulimshar - -002-4.gat,32,94,6|script|Sema|340,{ - - // This NPC previously used the variable TMW_Quest - callfunc "ClearVarTMW_Quest"; - - set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT); - - if (@state >= 28) goto L_Sema_Done; - if (@state == 27) goto L_Sema_Happy; - if (@state == 26) goto L_Sema_GCM; - - mes "[Sema the Miner]"; - mes "\"Hello adventurer. I do not know exactly where, but somewhere in this cave there is a chest. And wouldn't you know it! The archants have eaten all the spare keys for the chest. Go and do what you must do.\""; - goto L_Close; - -L_Sema_GCM: - mes "[Sema the Miner]"; - mes "\"I saw a giant cave maggot eat one of the other miners and it might eat me! Can you kill it?\""; - menu - "Yes.", L_Sema_Yes, - "No.", L_Sema_No; - -L_Sema_No: - mes "[Sema the Miner]"; - mes "\"Ahh! I am very scared now!\""; - goto L_Close; - -L_Sema_Yes: - set @state, 27; - callsub S_Update_Var; - monster "002-4.gat", 70, 90, "", 1059, 1; - mes "[Sema the Miner]"; - mes "\"Good luck. To prove you killed it, please bring the Iten it swallowed when it ate the miner. Be careful, there could be more than one.\""; - goto L_Close; - -L_Sema_Happy: - if (countitem("Iten") < 1) - goto L_Sema_Not_Happy; - getinventorylist; - if (@inventorylist_count - (countitem("Iten") == 1) > 99) - goto L_Sema_TooMany; - delitem "Iten", 1; - getitem "DesertShirt", 1; - set @state, 28; - callsub S_Update_Var; - set BOSS_POINTS, BOSS_POINTS + 10; - message strcharinfo(0), "You gain 10 Boss Points giving you a total of " + BOSS_POINTS + "."; - mes "[Sema the Miner]"; - mes "\"You killed it! What a relief! I wish I had more to give, but please accept this Desert Shirt as reward.\""; - goto L_Close; - -L_Sema_TooMany: - mes "[Sema the Miner]"; - mes "\"You have too many items for me to give you a reward. Please drop or sell something so I can give it to you. Oh and yes, you can also store items at the nearest bank.\""; - goto L_Close; - -L_Sema_Not_Happy: - set @state, 26; - callsub S_Update_Var; - itemheal -Hp, 0; - mes "A stone falls on your head."; - goto L_Close; - -L_Sema_Done: - mes "[Sema the Miner]"; - mes "\"You made this cave safer, you are kind beyond belief. Others may need you. Happy adventuring.\""; - goto L_Close; - -L_Close: - set @state, 0; - close; - -S_Update_Var: - set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(BYTE_2_MASK) | (@state << BYTE_2_SHIFT)); - return; -} diff --git a/world/map/npc/002-4/naem.txt b/world/map/npc/002-4/naem.txt new file mode 100644 index 00000000..95735b58 --- /dev/null +++ b/world/map/npc/002-4/naem.txt @@ -0,0 +1,152 @@ +// Variables used: +// - nibble 4 and 5 of QUEST_SouthTulimshar +// - in FLAGS, bits FLAG_GOT_NAEM_GLOVES and FLAG_OPENED_UNDERGROUND + +002-4.gat,91,96,6|script|Naem|109,{ + + // This NPC previously used the variable TMW_Quest + callfunc "ClearVarTMW_Quest"; + + set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT); + + if (FLAGS & FLAG_GOT_NAEM_GLOVES) goto L_Naem_Complete; + if (FLAGS & FLAG_OPENED_UNDERGROUND) goto L_Naem_Gloves; + if (@state == 22) goto L_Naem_Code; + if (@state == 21) goto L_Naem_Lt; + if (@state == 20) goto L_Naem_Memory; + if ((@state > 17) && (@state < 19)) + goto L_Naem_Great; + if (@state == 17) goto L_Naem_Waits_3; + if (@state == 16) goto L_Naem_Help_3; + if (@state == 15) goto L_Naem_Waits_2; + if (@state == 14) goto L_Naem_Help_2; + if (@state == 13) goto L_Naem_Waits_1; + if (@state == 12) goto L_Naem_Help_1; + if (@state == 10) goto L_Naem_Cool; + if (@state == 9) goto L_Naem_Okay; + + mes "[Naem]"; + mes "\"I'm just mining away here. Lots of work to do.\""; + goto L_Close; + +L_Naem_Okay: + set @state, 10; + callsub S_Update_Var; + mes "[Naem]"; + mes "\"Oh, hello there. Nickos wanted you to check on me? Yeah, you can tell him I'm okay.\""; + goto L_Close; + +L_Naem_Cool: + mes "[Naem]"; + mes "\"Yeah, I'm cool. Just mining away here.\""; + goto L_Close; + +L_Naem_Help_1: + set @state, 13; + callsub S_Update_Var; + mes "[Naem]"; + mes "\"Oh, you are here to help move my bags? Cool, I've got a few ready to go. Go ahead and take this one!\""; + next; + mes "Naem hands you a bag of ore."; + next; + mes "[Naem]"; + mes "\"After you deliver that one to Nathan, come on back, I've got a couple more ready to go.\""; + goto L_Close; + +L_Naem_Waits_1: + mes "[Naem]"; + mes "\"After you deliver that bag of ore to Nathan, come on back, I've got a couple more ready to go.\""; + goto L_Close; + +L_Naem_Help_2: + set @state, 15; + callsub S_Update_Var; + mes "Naem gives you a bag of ore."; + next; + mes "[Naem]"; + mes "\"Just one more after this one and we'll be all caught up!\""; + goto L_Close; + +L_Naem_Waits_2: + mes "[Naem]"; + mes "\"Just one more bag of ore after the one you got and we'll be all caught up!\""; + goto L_Close; + +L_Naem_Help_3: + set @state, 17; + callsub S_Update_Var; + mes "[Naem]"; + mes "Hands a bag of ore to you."; + next; + mes "\"Last one!\""; + goto L_Close; + +L_Naem_Waits_3: + mes "[Naem]"; + mes "\"You got my last sack already. Just give it to Nathan and we'll have caught up.\""; + goto L_Close; + +L_Naem_Great: + mes "[Naem]"; + mes "\"Hi ho! It's off to work I go! I work every day for meager pay, a miner's life for me...\""; + goto L_Close; + +L_Naem_Memory: + mes "You see Naem grimacing in pain as you approach."; + next; + mes "[Naem]"; + mes "\"Oh, my head! Some rocks fell on me and bonked me pretty good. I'm still a little sore.\""; + menu + "Don't you have a key so I can go to the underground palace?", L_Naem_Palace_No, + "You should be more careful.", L_Naem_Duh; + +L_Naem_Duh: + mes "[Naem]"; + mes "\"I guess I should...\""; + goto L_Close; + +L_Naem_Palace_No: + set @state, 21; + callsub S_Update_Var; + mes "[Naem]"; + mes "\"Oh no! I lost the key! Don't worry though, talk to Lieutenant Dausen about getting the spare key.\""; + goto L_Close; + +L_Naem_Lt: + mes "[Naem]"; + mes "\"I hurt my head pretty bad. I also lost my key. If you want to get into the underground palace, you'll have to talk to Lieutenant Dausen about getting the spare.\""; + goto L_Close; + +L_Naem_Code: + mes "[Naem]"; + mes "\"Oh, you got the key. That is good! But my head still hurts... All I remember about the code is you have to put the key into the key hole buttons around the mine in a certain order and turn them in a certain order and it will unlock the underground palace. Sorry, that's all I have for you. Good luck!\""; + goto L_Close; + +L_Naem_Gloves: + getinventorylist; + if (@inventorylist_count == 100) + goto L_Nathan_TooMany; + set FLAGS, FLAGS | FLAG_GOT_NAEM_GLOVES; + getitem "MinerGloves", 1; + mes "[Naem]"; + mes "\"Hey, good job on getting that together! Take these gloves, they might prove useful in the underground palace.\""; + goto L_Close; + +L_Naem_TooMany: + mes "[Naem]"; + mes "\"You have too many items for me to give you a reward.\""; + goto L_Close; + +L_Naem_Complete: + mes "[Naem]"; + mes "\"Yo-ho-ho, a miner's life for me!\""; + goto L_Close; + +L_Close: + set @state, 0; + close; + +S_Update_Var: + set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(BYTE_2_MASK) | (@state << BYTE_2_SHIFT)); + return; +} diff --git a/world/map/npc/002-4/underground_palace_barrier.txt b/world/map/npc/002-4/underground_palace_barrier.txt new file mode 100644 index 00000000..2e0dc60d --- /dev/null +++ b/world/map/npc/002-4/underground_palace_barrier.txt @@ -0,0 +1,22 @@ +//underground palace barrier + +002-4.gat,68,98,0|script|#UGP_Barrier|45,0,0,{ + + // This NPC previously used the variable TMW_Quest + callfunc "ClearVarTMW_Quest"; + + set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT); + + if (@state >= 25) goto L_Underground_Palace_Barrier_Open; + + message strcharinfo(0), "Some force seems to block your entrance."; + goto L_End; + +L_Underground_Palace_Barrier_Open: + warp "002-5.gat",37,96; + goto L_End; + +L_End: + set @state, 0; + end; +} diff --git a/world/map/npc/002-5/chest.txt b/world/map/npc/002-5/chest.txt new file mode 100644 index 00000000..50e3eed0 --- /dev/null +++ b/world/map/npc/002-5/chest.txt @@ -0,0 +1,51 @@ +// Variables used: nibble 4 and 5 of QUEST_SouthTulimshar + +002-5.gat,93,37,0|script|Supply Chest|377,{ + + // This NPC previously used the variable TMW_Quest + callfunc "ClearVarTMW_Quest"; + + set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT); + + if (@state >= 26) goto L_Finished; + + mes "Hrmm... A supply chest."; + mes "Do you want to try to open it?"; + next; + menu + "Yes.", L_Yes, + "No.", L_Close; + +L_Yes: + if (countitem("TreasureKey") < 3) + goto L_Not_Enough; + getinventorylist; + if (@inventorylist_count == 100 && countitem("TreasureKey") > 3) + goto L_TooMany; + mes "You opened the chest and found a short bow!"; + delitem "TreasureKey", 3; + getitem "ShortBow", 1; + set @state, 26; + callsub S_Update_Var; + goto L_Close; + +L_Not_Enough: + mes "It seems that you do not have the right key for this chest yet..."; + goto L_Close; + +L_Finished: + mes "You have already opened this chest."; + goto L_Close; + +L_TooMany: + mes "You do not have enough room to loot this chest. Maybe you should try again later."; + goto L_Close; + +L_Close: + set @state, 0; + close; + +S_Update_Var: + set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(BYTE_2_MASK) | (@state << BYTE_2_SHIFT)); + return; +} diff --git a/world/map/npc/002-5/sema.txt b/world/map/npc/002-5/sema.txt new file mode 100644 index 00000000..b1b2cbe7 --- /dev/null +++ b/world/map/npc/002-5/sema.txt @@ -0,0 +1,78 @@ +// Variables used: nibble 4 and 5 of QUEST_SouthTulimshar + +002-5.gat,43,91,6|script|Sema|340,{ + + // This NPC previously used the variable TMW_Quest + callfunc "ClearVarTMW_Quest"; + + set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT); + + if (@state >= 28) goto L_Sema_Done; + if (@state == 27) goto L_Sema_Happy; + if (@state == 26) goto L_Sema_GCM; + + mes "[Sema the Miner]"; + mes "\"Hello adventurer. I do not know exactly where, but somewhere in this cave there is a supply chest. And wouldn't you know it! The archants have eaten all the spare keys for the chest. Go and do what you must do.\""; + goto L_Close; + +L_Sema_GCM: + mes "[Sema the Miner]"; + mes "\"I saw a giant cave maggot eat one of the other miners and it might eat me! Can you kill it?\""; + menu + "Yes.", L_Sema_Yes, + "No.", L_Sema_No; + +L_Sema_No: + mes "[Sema the Miner]"; + mes "\"Ahh! I am very scared now!\""; + goto L_Close; + +L_Sema_Yes: + set @state, 27; + callsub S_Update_Var; + monster "002-5.gat", 70, 90, "", 1059, 1; + mes "[Sema the Miner]"; + mes "\"Good luck. To prove you killed it, please bring the Iten it swallowed when it ate the miner. Be careful, there could be more than one.\""; + goto L_Close; + +L_Sema_Happy: + if (countitem("Iten") < 1) + goto L_Sema_Not_Happy; + getinventorylist; + if (@inventorylist_count - (countitem("Iten") == 1) > 99) + goto L_Sema_TooMany; + delitem "Iten", 1; + getitem "DesertShirt", 1; + set @state, 28; + callsub S_Update_Var; + set BOSS_POINTS, BOSS_POINTS + 10; + message strcharinfo(0), "You gain 10 Boss Points giving you a total of " + BOSS_POINTS + "."; + mes "[Sema the Miner]"; + mes "\"You killed it! What a relief! I wish I had more to give, but please accept this Desert Shirt as reward.\""; + goto L_Close; + +L_Sema_TooMany: + mes "[Sema the Miner]"; + mes "\"You have too many items for me to give you a reward. Please drop or sell something so I can give it to you. Oh and yes, you can also store items at the nearest bank.\""; + goto L_Close; + +L_Sema_Not_Happy: + set @state, 26; + callsub S_Update_Var; + itemheal -Hp, 0; + mes "A stone falls on your head."; + goto L_Close; + +L_Sema_Done: + mes "[Sema the Miner]"; + mes "\"You made this cave safer, you are kind beyond belief. Others may need you. Happy adventuring.\""; + goto L_Close; + +L_Close: + set @state, 0; + close; + +S_Update_Var: + set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(BYTE_2_MASK) | (@state << BYTE_2_SHIFT)); + return; +} -- cgit v1.2.3-60-g2f50