diff options
author | Jessica Tölke <jtoelke@mail.upb.de> | 2013-01-27 16:11:32 +0100 |
---|---|---|
committer | Jessica Tölke <jtoelke@mail.upb.de> | 2013-02-12 23:05:14 +0100 |
commit | f704b8a7812c96ad3c5fee52f0bbc90111b6e4ba (patch) | |
tree | 5c4984d2ca01abeb28d973fc172d77fb7527d405 /world/map/npc/002-1/nickos.txt | |
parent | 2e9e7c5f603baf4e5ae1773f17ac9294014159db (diff) | |
download | serverdata-f704b8a7812c96ad3c5fee52f0bbc90111b6e4ba.tar.gz serverdata-f704b8a7812c96ad3c5fee52f0bbc90111b6e4ba.tar.bz2 serverdata-f704b8a7812c96ad3c5fee52f0bbc90111b6e4ba.tar.xz serverdata-f704b8a7812c96ad3c5fee52f0bbc90111b6e4ba.zip |
Restructuring the quests saved in TMW_Quest: Convert NPCs on 002-1 to new variables.
Diffstat (limited to 'world/map/npc/002-1/nickos.txt')
-rw-r--r-- | world/map/npc/002-1/nickos.txt | 83 |
1 files changed, 51 insertions, 32 deletions
diff --git a/world/map/npc/002-1/nickos.txt b/world/map/npc/002-1/nickos.txt index 011fc5ad..67ac2d63 100644 --- a/world/map/npc/002-1/nickos.txt +++ b/world/map/npc/002-1/nickos.txt @@ -1,21 +1,27 @@ // Sandstorm mine guard +// Variables used: nibble 4 and 5 of QUEST_SouthTulimshar 002-1.gat,28,94,0|script|Nickos|123,{ - if (TMW_Quest == 32) goto L_Nickos_UGQ; - if (TMW_Quest == 31) goto L_Nickos_AS_Done; - if (TMW_Quest == 30) goto L_Nickos_AS_Start; - if (TMW_Quest >= 23) && (TMW_Quest < 30) goto L_Nickos_Guards; - if (TMW_Quest == 22) goto L_Nickos_Check_Happy; - if (TMW_Quest > 19) && (TMW_Quest < 22) goto L_Nickos_Waits; - if (TMW_Quest == 19) goto L_Nickos_Mine; - if (TMW_Quest == 18) goto L_Nickos_Orders_Received; - if (TMW_Quest == 17) goto L_Nickos_Orders; - if (TMW_Quest < 17) goto L_Nickos_See_Dausen_First; + // This NPC previously used the variable TMW_Quest + callfunc "ClearVarTMW_Quest"; + + set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT); + + if (@state == 20) goto L_Nickos_UGQ; + if (@state == 19) goto L_Nickos_AS_Done; + if (@state == 18) goto L_Nickos_AS_Start; + if (@state >= 11) && (@state < 18) goto L_Nickos_Guards; + if (@state == 10) goto L_Nickos_Check_Happy; + if (@state > 7) && (@state < 10) goto L_Nickos_Waits; + if (@state == 7) goto L_Nickos_Mine; + if (@state == 6) goto L_Nickos_Orders_Received; + if (@state == 5) goto L_Nickos_Orders; + if (@state < 5) goto L_Nickos_See_Dausen_First; mes "[Nickos]"; mes "\"I'm watching this mine to make sure the monsters don't harm the miners.\""; - close; + goto L_Close; L_Nickos_See_Dausen_First: mes "[Nickos]"; @@ -23,19 +29,19 @@ L_Nickos_See_Dausen_First: next; mes "[Nickos]"; mes "\"The mines are closed from tourists due to the monster threat. If you want to get in you will need to prove yourself first. Talk to Lieutenant Dausen, my superior, if you want to make a formal complaint.\""; - close; - + goto L_Close; L_Nickos_Orders: - set TMW_Quest, 18; + set @state, 6; + callsub S_Update_Var; mes "[Nickos]"; mes "\"I have to hold my post longer? Argh! I was looking forward to my break. Oh well, thanks for letting me know.\""; - close; + goto L_Close; L_Nickos_Orders_Received: mes "[Nickos]"; mes "\"Thanks for letting me know Lieutenant Dausen wants me to stick it out for a while longer. Even though I would've liked my break, I'm sure these miners could use my watchful eye.\""; - close; + goto L_Close; L_Nickos_Mine: mes "[Nickos]"; @@ -46,68 +52,81 @@ L_Nickos_Mine: menu "Yes.", L_Nickos_Mine_Open, "No.", L_Nickos_Disappoint; - close; L_Nickos_Disappoint: mes "Nickos looks disappointed."; - close; + goto L_Close; L_Nickos_Mine_Open: - set TMW_Quest, 20; + set @state, 8; + callsub S_Update_Var; mes "[Nickos]"; mes "\"Excellent! You now have my permission to enter the mine. Your assistance helps ease my worries.\""; - close; + goto L_Close; L_Nickos_Waits: mes "[Nickos]"; mes "\"Please be sure to get word from Nathan and Naem to make sure everthing is okay down there. Your assistance helps ease my worries.\""; - close; + goto L_Close; L_Nickos_Check_Happy: - set TMW_Quest, 23; + set @state, 11; + callsub S_Update_Var; set Zeny, Zeny + 500; mes "[Nickos]"; mes "\"Oh, everything is okay? That's great! I think they are pretty busy and could use some help. Feel free to give them a hand. Here's some gold for your troubles.\""; - close; + goto L_Close; L_Nickos_Guards: mes "[Nickos]"; mes "\"I'm watching this mine to make sure the monsters don't harm the miners.\""; next; mes "\"Talk to Nathan the miner, I'm sure the miners could use some help down there.\""; - close; + goto L_Close; L_Nickos_AS_Start: - set TMW_Quest, 31; + set @state, 19; + callsub S_Update_Var; mes "[Nickos]"; mes "\"Oh, the angry scorpions are becoming a problem? We could thin down their numbers a bit. I can make it worth your time, but of course, I'll need something to show your work. Bring me 10 Angry Scorpion Stingers to demonstrate your effectiveness, and you will be rewarded for your efforts.\""; - close; + goto L_Close; L_Nickos_AS_Done: - if (countitem ("AngryScorpionStinger") < 10) goto L_Nickos_AS_NotDone; + if (countitem ("AngryScorpionStinger") < 10) + goto L_Nickos_AS_NotDone; getinventorylist; - if (@inventorylist_count - (countitem("AngryScorpionStinger") == 10) > 99) goto L_Nickos_TooMany; - set TMW_Quest, 32; + if (@inventorylist_count - (countitem("AngryScorpionStinger") == 10) > 99) + goto L_Nickos_TooMany; + set @state, 20; + callsub S_Update_Var; delitem "AngryScorpionStinger", 10; getitem "LeatherShield", 1; mes "[Nickos]"; mes "\"Ah, you are a fine combatant! Take this Leather Shield, it might be useful for your future battles.\""; next; mes "\"You might be ready to take on the underground palace. If you are interested, go talk to Naem about unlocking the barrier, he's got the key and the code to open it.\""; - close; + goto L_Close; L_Nickos_AS_NotDone: mes "[Nickos]"; mes "\"Bring me 10 Angry Scorpion Stingers and I'll know their numbers are down. You will be rewarded for your efforts.\""; - close; + goto L_Close; L_Nickos_TooMany: mes "[Nickos]"; mes "\"Oh, it seems you have too many items. Please get rid some some and I'll give you a reward.\""; - close; + goto L_Close; L_Nickos_UGQ: mes "[Nickos]"; mes "\"You might be ready to take on the underground palace. If you are interested, talk to the miners about unlocking the barrier, they've got the key to open it.\""; + 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; } |