diff options
Diffstat (limited to 'world/map/npc/002-1')
-rw-r--r-- | world/map/npc/002-1/_import.txt | 14 | ||||
-rw-r--r-- | world/map/npc/002-1/_mobs.txt | 40 | ||||
-rw-r--r-- | world/map/npc/002-1/_warps.txt | 25 | ||||
-rw-r--r-- | world/map/npc/002-1/anwar.txt | 204 | ||||
-rw-r--r-- | world/map/npc/002-1/bard.txt | 135 | ||||
-rw-r--r-- | world/map/npc/002-1/dock.txt | 5 | ||||
-rw-r--r-- | world/map/npc/002-1/elanore.txt | 619 | ||||
-rw-r--r-- | world/map/npc/002-1/gaurds.txt | 19 | ||||
-rw-r--r-- | world/map/npc/002-1/itka.txt | 21 | ||||
-rw-r--r-- | world/map/npc/002-1/lieutenant_dausen.txt | 22 | ||||
-rw-r--r-- | world/map/npc/002-1/luca.txt | 451 | ||||
-rw-r--r-- | world/map/npc/002-1/mapflags.txt | 2 | ||||
-rw-r--r-- | world/map/npc/002-1/mine_debug.txt | 81 | ||||
-rw-r--r-- | world/map/npc/002-1/nickos.txt | 2 | ||||
-rw-r--r-- | world/map/npc/002-1/nomads.txt | 4 | ||||
-rw-r--r-- | world/map/npc/002-1/npcs.txt | 24 | ||||
-rw-r--r-- | world/map/npc/002-1/sarah.txt | 88 | ||||
-rw-r--r-- | world/map/npc/002-1/soul-menhir.txt | 18 | ||||
-rw-r--r-- | world/map/npc/002-1/stewen.txt | 2 | ||||
-rw-r--r-- | world/map/npc/002-1/traveler.txt | 11 |
20 files changed, 1736 insertions, 51 deletions
diff --git a/world/map/npc/002-1/_import.txt b/world/map/npc/002-1/_import.txt index bb56994f..a3f95fc6 100644 --- a/world/map/npc/002-1/_import.txt +++ b/world/map/npc/002-1/_import.txt @@ -1,10 +1,22 @@ -// Map 002-1: Sandstorm Desert +// Map 002-1: Tulimshar South // This file is generated automatically. All manually changes will be removed when running the Converter. map: 002-1.gat npc: npc/002-1/_mobs.txt npc: npc/002-1/_warps.txt +npc: npc/002-1/anwar.txt +npc: npc/002-1/bard.txt +npc: npc/002-1/dock.txt +npc: npc/002-1/elanore.txt +npc: npc/002-1/gaurds.txt +npc: npc/002-1/itka.txt npc: npc/002-1/lieutenant_dausen.txt +npc: npc/002-1/luca.txt npc: npc/002-1/mapflags.txt +npc: npc/002-1/mine_debug.txt npc: npc/002-1/nickos.txt npc: npc/002-1/nomads.txt +npc: npc/002-1/npcs.txt +npc: npc/002-1/sarah.txt +npc: npc/002-1/soul-menhir.txt npc: npc/002-1/stewen.txt +npc: npc/002-1/traveler.txt diff --git a/world/map/npc/002-1/_mobs.txt b/world/map/npc/002-1/_mobs.txt index e795040e..02f897df 100644 --- a/world/map/npc/002-1/_mobs.txt +++ b/world/map/npc/002-1/_mobs.txt @@ -1,20 +1,19 @@ // This file is generated automatically. All manually changes will be removed when running the Converter. -// Sandstorm Desert mobs - -002-1.gat,0,0,0,0|monster|Maggot|1002,20,1000ms,500ms,Mob002-1::On1002 -002-1.gat,95,97,16,9|monster|Maggot|1002,10,100000ms,30000ms,Mob002-1::On1002 -002-1.gat,94,35,11,4|monster|Maggot|1002,3,100000ms,30000ms,Mob002-1::On1002 -002-1.gat,68,59,7,6|monster|Maggot|1002,3,100000ms,30000ms,Mob002-1::On1002 -002-1.gat,57,86,15,8|monster|Maggot|1002,3,100000ms,30000ms,Mob002-1::On1002 -002-1.gat,27,85,7,8|monster|Maggot|1002,3,100000ms,30000ms,Mob002-1::On1002 -002-1.gat,44,35,3,2|monster|Maggot|1002,3,100000ms,30000ms,Mob002-1::On1002 -002-1.gat,38,29,3,2|monster|Maggot|1002,3,100000ms,30000ms,Mob002-1::On1002 -002-1.gat,62,91,24,6|monster|Maggot|1002,3,100000ms,30000ms,Mob002-1::On1002 -002-1.gat,60,73,38,40|monster|FireGoblin|1011,15,100000ms,30000ms,Mob002-1::On1011 -002-1.gat,82,24,34,15|monster|Scorpion|1003,8,100000ms,30000ms,Mob002-1::On1003 -002-1.gat,32,35,34,33|monster|Scorpion|1003,8,100000ms,30000ms,Mob002-1::On1003 -002-1.gat,26,73,20,24|monster|Scorpion|1003,8,100000ms,30000ms,Mob002-1::On1003 -002-1.gat,95,75,15,17|monster|BlackScorpion|1009,1,100000ms,1800000ms,Mob002-1::On1009 +// Tulimshar South mobs + +002-1.gat,93,62,24,9|monster|Maggot|1002,11,100000ms,30000ms,Mob002-1::On1002 +002-1.gat,112,62,11,9|monster|Maggot|1002,11,100000ms,30000ms,Mob002-1::On1002 +002-1.gat,108,73,11,9|monster|Maggot|1002,11,100000ms,30000ms,Mob002-1::On1002 +002-1.gat,62,28,3,15|monster|Maggot|1002,6,100000ms,30000ms,Mob002-1::On1002 +002-1.gat,74,96,24,33|monster|Scorpion|1003,12,100000ms,30000ms,Mob002-1::On1003 +002-1.gat,113,114,10,7|monster|Maggot|1002,11,100000ms,30000ms,Mob002-1::On1002 +002-1.gat,43,61,10,70|monster|Scorpion|1003,6,100000ms,30000ms,Mob002-1::On1003 +002-1.gat,70,92,49,19|monster|Scorpion|1003,10,100000ms,30000ms,Mob002-1::On1003 +002-1.gat,40,93,19,20|monster|RedScorpion|1004,10,100000ms,30000ms,Mob002-1::On1004 +002-1.gat,42,40,8,29|monster|SeaSlime|1033,8,100000ms,30000ms,Mob002-1::On1033 +002-1.gat,33,75,9,40|monster|SeaSlime|1033,8,100000ms,30000ms,Mob002-1::On1033 +002-1.gat,99,62,37,9|monster|Scorpion|1003,6,100000ms,30000ms,Mob002-1::On1003 +002-1.gat,73,105,20,21|monster|FireGoblin|1011,6,100000ms,30000ms,Mob002-1::On1011 002-1.gat,0,0,0|script|Mob002-1|-1 @@ -31,8 +30,8 @@ On1003: callfunc "MobPoints"; end; -On1009: - set @mobID, 1009; +On1004: + set @mobID, 1004; callfunc "MobPoints"; end; @@ -40,4 +39,9 @@ On1011: set @mobID, 1011; callfunc "MobPoints"; end; + +On1033: + set @mobID, 1033; + callfunc "MobPoints"; + end; } diff --git a/world/map/npc/002-1/_warps.txt b/world/map/npc/002-1/_warps.txt index f201c926..de28087f 100644 --- a/world/map/npc/002-1/_warps.txt +++ b/world/map/npc/002-1/_warps.txt @@ -1,10 +1,19 @@ // This file is generated automatically. All manually changes will be removed when running the Converter. -// Sandstorm Desert warps +// Tulimshar South warps -002-1.gat,58,13|warp|To South Tulimshar|3,-1,001-1.gat,44,86 -002-1.gat,79,99|warp|To Desert Mine Camp|-1,-1,002-3.gat,85,49 -002-1.gat,20,94|warp|To Desert Mine Camp|-1,-1,002-3.gat,51,33 -002-1.gat,104,92|warp|To Mystics House|-1,-1,002-2.gat,28,29 -002-1.gat,108,79|warp|To Snake Desert|-1,1,005-1.gat,20,40 -002-1.gat,12,67|warp|To Beach|-1,3,003-1.gat,171,76 -002-1.gat,28,13|warp|To Beach|1,-1,004-1.gat,84,114 +002-1.gat,63,20|warp|North Tulimshar|3,-1,001-1.gat,63,118 +002-1.gat,103,20|warp|North Tulimshar|3,-1,001-1.gat,103,118 +002-1.gat,119,95|warp|To Snake Desert|-1,1,006-1.gat,21,47 +002-1.gat,92,114|warp|To Desert Mine Camp|-1,-1,002-3.gat,85,49 +002-1.gat,33,109|warp|To Desert Mine Camp|-1,-1,002-3.gat,51,35 +002-1.gat,109,45|warp|To Weavers Shop|-1,-1,002-2.gat,75,100 +002-1.gat,115,45|warp|To Weavers Shop|-1,-1,002-2.gat,83,100 +002-1.gat,99,43|warp|To Jeweler|-1,-1,002-2.gat,120,66 +002-1.gat,114,35|warp|To Trainer|-1,-1,002-2.gat,78,131 +002-1.gat,110,29|warp|To Trainer|-1,-1,002-2.gat,68,122 +002-1.gat,73,35|warp|To Tulimshar Indoor|-1,-1,002-2.gat,44,33 +002-1.gat,57,35|warp|To KPS|-1,-1,002-2.gat,120,94 +002-1.gat,67,29|warp|To Tulimshar Indoor|-1,-1,002-2.gat,23,109 +002-1.gat,113,107|warp|To Snake Cave|-1,-1,005-3.gat,52,35 +002-1.gat,49,20|warp|To Sea Cave|-1,-1,004-3.gat,24,94 +002-1.gat,57,26|warp|Omar's House|-1,-1,002-2.gat,119,131 diff --git a/world/map/npc/002-1/anwar.txt b/world/map/npc/002-1/anwar.txt new file mode 100644 index 00000000..707e577e --- /dev/null +++ b/world/map/npc/002-1/anwar.txt @@ -0,0 +1,204 @@ +// Anwar needs a magic fertilizer for his field +// Quest uses Nibble 3 of QUEST_NorthTulimshar +// Author: Jenalya +// state 1: Anwar sent to Tinris for help to get a magic fertilizer +// state 2: Tinris asked for chocolate cake as present for his girlfriend +// state 3: Tinris asked for ingredients for the fertilizer +// state 4: Tinris gave you the fertilizer +// state 5: Anwar tried it out and it doesn't work well, sent you back to Tinris +// state 6: Tinris asked for more ingredients for a new try +// state 7: Tinris says it's really hard, gives you the fertilizer and tells you to ask Eomie to cast a spell on it +// state 8: Eomie sends you to get some stuff so she can interrupt her spell on the spot of grass +// state 9: Eomie casted a spell on the fertilizer +// state 10: Anwar used it and it worked. he asks you to help him preparing a thank-you-gift for each Tinris and Eomis +// state 11: Anwar asked to bring present to Tinris +// state 12: gave present to Tinris +// state 13: Anwar asked to bring present to Eomie +// state 14: gave present to Eomie +// state 15: reported back to Anwar and done +002-1.gat,95,67,0|script|Anwar|156 +{ + set @state, ((QUEST_NorthTulimshar & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT); + + set @cloth_amount, 3; + set @silk_amount, 30; + + set @firstTry_exp, 400; + set @secondTry_exp, 700; + set @material_exp, 1000; + set @final_exp, 2000; + + if (@state >= 15) goto L_Done; + if (@state >= 13) goto L_GiveEomie; + if (@state >= 11) goto L_GiveTinris; + if (@state == 10) goto L_GiftMaterial; + if (@state >= 5) goto L_SecondTry; + if (@state >= 1) goto L_FirstTry; + + mes "[Anwar]"; + mes "\"Hello. You look like one of those young people who come here to go on an adventure."; + mes "Would you be interested in doing some small errand for me?\""; + menu + "Sure!",L_Sure, + "I'm busy, sorry.",L_Close; + +L_Sure: + mes "[Anwar]"; + mes "\"That's the spirit! Ok, I'm tired of spending most of my time working on this field. I heard the magicians at the magic school are researching ways to enhance the growth of plants with magic.\""; + next; + mes "\"I can't go there myself, since this area of the city is full of sneaky ragtags and they will rob my field if I leave here. Could you go to the magic school and ask for some magic enhancement for my field?\""; + next; + mes "\"To find the school just follow the street north back into town. The school is the castle at the north end of town.\""; + set @state, 1; + callsub S_Update_Mask; + goto L_Close; + +L_FirstTry: // @state >= 1 but below 5 + mes "[Anwar]"; + mes "\"I hope the wizards at the magic school can help me with the field. I'd really like to have more free time. I want to make clothing, but I'm not experienced enough to make a living out of that.\""; + if (@state != 4) + goto L_Close; + menu + "Tinris gave me a magic fertilizer for your field, but he isn't sure if it works.",L_Next; + +L_Next: + mes "[Anwar]"; + mes "\"Really? Well, let's try it out!\""; + mes "He takes the fertilizer and starts to bespatter the field."; + next; + mes "But it doesn't seem to be good for the plants, they start to shrivel and get brown."; + mes "[Anwar]"; + mes "\"Oh no! What is this? It's damaging my plants! Go back to Tinris and tell him it doesn't work!\""; + getexp @firstTry_exp, 0; + set @state, 5; + callsub S_Update_Mask; + goto L_Close; + +L_SecondTry: // @state >= 5 but below 10 + mes "[Anwar]"; + mes "\"I hope Tinris can come up with a better fertilizer. My plants are suffering from the first try.\""; + if (@state != 9) + goto L_Close; + menu + "Here is another one. Eomie cast a spell on it.",L_Continue; + +L_Continue: + mes "[Anwar]"; + mes "\"Eomie? I heard she's amazingly skilled with nature magic. I'll try if this works better.\""; + mes "He takes the fertilizer and puts it on only a few plants, then waits a moment to see the result."; + next; + mes "The plants recover a bit and become green again."; + mes "[Anwar]"; + mes "\"Ah, this one is better. I'll put it on the entire field.\""; + getexp @secondTry_exp, 0; + set @state, 10; + callsub S_Update_Mask; + next; + goto L_GiftMaterial; + +L_GiftMaterial: // @state == 10 + mes "[Anwar]"; + mes "\"I want to show my gratitude to Tinris and Eomie. Can you help me once again? I would like to make some clothes for them and need " + @cloth_amount + " pieces of Cotton Cloth and " + @silk_amount + " Silk Cocoons.\""; + menu + "I have it.",L_GiveGiftStuff, + "Where can I get that?",L_Hint, + "I'll see what I can do.",L_Close; + +L_GiveGiftStuff: + getinventorylist; + if (@inventorylist_count == 100) + goto L_Full_Inv; + if ((countitem("CottonCloth") < @cloth_amount) || (countitem("SilkCocoon") < @silk_amount)) + goto L_NoItem; + delitem "CottonCloth", @cloth_amount; + delitem "SilkCocoon", @silk_amount; + getexp @material_exp, 0; + + getitem "GreenVNeckSweater", 1; + set @state, 11; + callsub S_Update_Mask; + mes "[Anwar]"; + mes "\"Great! I'll start right away with the present for Tinris. That shouldn't take long.\""; + mes "After a short while of cutting and sewing he holds a V-Neck Sweater in his hands. Then he dyes it green."; + next; + mes "[Anwar]"; + mes "\"Wonderful! Could you please bring this to Tinris to show him my gratitude?\""; + goto L_Close; + +L_Hint: + mes "[Anwar]"; + mes "\"As far as I know Cotton Cloth is given out as reward for hunting monsters. You should talk to Aidan in Candor.\""; + next; + mes "\"Otherwise Cotton Cloth can be sheared from Mouboo and silk cocoons come from Silkworms."; + mes "They live in the woodland area around Hurnscald. You can get there by taking the ferry.\""; + goto L_Close; + +L_GiveTinris: // @state >= 11 but below 13 + mes "[Anwar]"; + mes "\"Did you already bring the Green V-Neck Sweater to Tinris?\""; + if (@state != 12) + menu + "Not yet.",L_Close; + menu + "Yes, he was very happy.",L_Happy; + +L_Happy: + getinventorylist; + if (@inventorylist_count == 100) + goto L_Full_Inv; + mes "[Anwar]"; + mes "\"Wonderful! I also finished the present for Eomie. Can you bring it to her?\""; + getitem "SilkHeadband", 1; + set @state, 13; + callsub S_Update_Mask; + goto L_Close; + +L_GiveEomie: // @state >= 13 but below 15 + getinventorylist; + if (@inventorylist_count == 100) + goto L_Full_Inv; + mes "[Anwar]"; + mes "\"Did you give the Silk Headband to Eomie?\""; + if (@state != 14) + menu + "Not yet.",L_Close; + menu + "Yes. She asked me to thank you.",L_ThankYou; + +L_ThankYou: + mes "Anwar smiles."; + mes "[Anwar]"; + mes "\"I'm so happy. Thank you so much for your help. I made this for you while you went to see Eomie.\""; + getexp @final_exp, 0; + getitem "DarkGreenCottonTrousers", 1; + set @state, 15; + callsub S_Update_Mask; + goto L_Close; + +L_Done: // @state == 15 + mes "[Anwar]"; + mes "\"Thank you so much for your help. The plants are growing much better now. I don't have to spend all my time working in the field any more."; + mes "Finally I can do what I'm really interested in and work on getting better at sewing clothes.\""; + goto L_Close; + +L_NoItem: + mes "[Anwar]"; + mes "\"You don't have it!\""; + goto L_Close; + +L_Full_Inv: + mes "[Anwar]"; + mes "\"You carry a lot of stuff. Come back when you have more room.\""; + goto L_Close; + +L_Close: + set @state, 0; + set @cloth_amount, 0; + set @silk_amount, 0; + set @inventorylist_count, 0; + close; + +S_Update_Mask: + set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(NIBBLE_3_MASK)) | (@state << NIBBLE_3_SHIFT); + return; +} diff --git a/world/map/npc/002-1/bard.txt b/world/map/npc/002-1/bard.txt new file mode 100644 index 00000000..c977b136 --- /dev/null +++ b/world/map/npc/002-1/bard.txt @@ -0,0 +1,135 @@ +// + +002-1.gat,91,33,0|script|Bard|152 +{ + setarray @songs$, "\"There once was a bard, who had it hard, because a man in dark green, was very mean.\"", + "\"At Hurnscald inn, there was a person of fairest skin, declining wedding bands from quite a many hands.\"", + "\"As the Sun sets down in the forest's brown, she whom the fragrance holds counts her gold.\""; + set @name$, "Bill Ballshaker the Bard"; + mes "[" + @name$ + "]"; + if (Sex) + mes "\"Greetings, traveler! Have you come to listen to my stories?\""; + if (!Sex) + mes "\"Greetings, fair lady! Well met, on such a lovely day! Might I entertain you with a tale or two?\""; + next; + goto L_Main; + +L_Main: + menu + "Sing me a song, lute man!", L_Song, + "Have you heard any news?", L_News, + "What do you know about...", L_Question, + "Farewell!", L_Close; + +L_News: +// mes "[" + @name$ + "]"; +// mes "\"Quite, quite! Rumour has it that Luca the Hunter, from this very town of Tulimshar, has returned from a long journey.\""; +// next; +// mes "[" + @name$ + "]"; +// mes "\"Many perilous battles he fought, or so his tales go... I am still working on a sonnet that I wish to dedicate to his exploits.\""; +// next; +// mes "[" + @name$ + "]"; +// mes "\"He says that he learned some new skills along the way and wishes to pass them on to others like him, who do not fear the fire of battle!\""; +// next; +// mes "[" + @name$ + "]"; +// mes "\"If you are experienced enough, perhaps he will teach you?\""; +// next; +// goto L_Main; + + mes "[" + @name$ + "]"; + mes "\"News I have for you indeed, lest you have already overheard (for then it would no longer be news to you!)\""; + next; + mes "[" + @name$ + "]"; + mes "\"Rumor has it that an ancient source of magic, a Mana Seed, has been sighted in the west, beyond the fair town of Hurnscald.\""; + next; + set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_MANASEED_RUMOUR; + mes "[" + @name$ + "]"; + mes "\"Whence it came, nobody knows... but they say that sometimes such Mana Seeds may choose a powerful individual to impart some of its mystic power to!\""; + next; + mes "[" + @name$ + "]"; + mes "\"I wonder who might be qualified?\""; + next; + goto L_Main; + +L_Question: + callfunc "MagicTalkOptionsSetup"; + set @ignore, @QQ_ASTRALSOUL; + callfunc "MagicTalkMenu"; + + if (@c == 0) goto L_Main; + if (@c == @QQ_ELANORE) goto L_Q_elanore; + if (@c == @QQ_MANASEED) goto L_Q_manaseed; + if (@c == @QQ_WYARA) goto L_Q_wyara; + if (@c == @QQ_SAGATHA) goto L_Q_sagatha; + if (@c == @QQ_AULDSBEL) goto L_Q_auldsbel; + if (@c == @QQ_OLDWIZ) goto L_Q_oldwiz; + + mes "[" + @name$ + "]"; + mes "\"Alas, I know very little about this matter.\""; + next; + goto L_Main; + +L_Q_oldwiz: + mes "[" + @name$ + "]"; + mes "\"The old wizard has been an old man for as long as I remember, living near the mountains in his magic hut – a hut that is bigger on the inside, just like in the old tales of Gyer Filla the Wise....\""; + next; + mes "[" + @name$ + "]"; + mes "\"I doubt that they are the same person, though. For one, I have never seen his hut fly. For another, Gyer never took apprentices.\""; + next; + goto L_Main; + +L_Q_elanore: + mes "[" + @name$ + "]"; + mes "\"Elanore is this town's healer. Rumor has it that she traveled far and wide when she was younger, to learn the deepest secrets of healing magic, after her brother caught a mysterious illness.\""; + next; + goto L_Main; + +L_Q_manaseed: + mes "[" + @name$ + "]"; + mes "\"The Mana Seed is said to be a source of great magic. Perhaps some witch or wizard might know more about it?\""; + next; + goto L_Main; + +L_Q_wyara: + mes "[" + @name$ + "]"; + mes "\"Wyara is not actually from Hurnscald. As a young witch, she decided to settle down there to help the people of Hurnscald. She is kind and gentle, except towards the Doctor, who seems to have little respect for her potions.\""; + next; + goto L_Main; + +L_Q_sagatha: + mes "[" + @name$ + "]"; + mes "\"Sagatha! Ah, such a wonderful and mysterious being; the center of many a tale...\""; + next; + mes "[" + @name$ + "]"; + mes "\"Some say that she is the most powerful witch in all of Argaes. I don't know whether that is true or not, but I am quite certain that she is the most beautiful witch of all! Alas, she will let no man touch her...\""; + mes "He sighs."; + next; + mes "[" + @name$ + "]"; + mes "\"I met her only twice, back in my traveling days, but there are two pieces of advice I can give you:\""; + next; + mes "[" + @name$ + "]"; + mes "\"First, she will suffer no fool easily, particularly no man.\""; + next; + mes "[" + @name$ + "]"; + mes "\"Second, the creatures of the forest mean everything to her. Harm them, and you may find her an enemy – and a powerful one at that...\""; + next; + goto L_Main; + +L_Q_auldsbel: + mes "[" + @name$ + "]"; + mes "\"Auldsbel is a wizard further north. From what I have gathered he bought a hut near Hurnscald some years back and often comes here to experiment on things. This is probably because he is not allowed to do these experiments where he comes from.\""; + next; + goto L_Main; + +L_Song: + mes "[" + @name$ + "]"; + set @id, rand(3); + mes @songs$[@id]; + goto L_Close; + +L_Close: + set @name$, ""; + set @id, 0; + cleararray @songs$[0], "", 2; + close; +} diff --git a/world/map/npc/002-1/dock.txt b/world/map/npc/002-1/dock.txt new file mode 100644 index 00000000..f902006d --- /dev/null +++ b/world/map/npc/002-1/dock.txt @@ -0,0 +1,5 @@ +002-1.gat,67,65,0|script|Ferry Schedule#3|396 +{ + callfunc "FerryManifest"; + end; +} diff --git a/world/map/npc/002-1/elanore.txt b/world/map/npc/002-1/elanore.txt new file mode 100644 index 00000000..fec70d44 --- /dev/null +++ b/world/map/npc/002-1/elanore.txt @@ -0,0 +1,619 @@ +// + +function|script|ElanoreFix +{ + set @Q_MASK, NIBBLE_1_MASK; + set @Q_SHIFT, NIBBLE_1_SHIFT; + + set @Q_STATUS_MAX, 3; // FIXME once level 3 magic was released + + set @Q_status, (QUEST_MAGIC2 & @Q_MASK) >> @Q_SHIFT; + if (@Q_status > @Q_STATUS_MAX) + set @Q_status, @STATUS_INITIAL; + if (@Q_status > 1 && (getskilllv(SKILL_MAGIC_LIFE) < 2)) + set @Q_status, @STATUS_INITIAL; + + set QUEST_MAGIC2, (QUEST_MAGIC2 & ~(@Q_MASK) | (@Q_status << @Q_SHIFT)); + return; +} + +002-1.gat,75,62,0|script|Elanore#_M|108 +{ + set @has_magic, getskilllv(SKILL_MAGIC); + + set @Q_MASK, NIBBLE_1_MASK; + set @Q_SHIFT, NIBBLE_1_SHIFT; + + set @Q_status, (QUEST_MAGIC2 & @Q_MASK) >> @Q_SHIFT; + set @Q_heal_exp, MAGIC_EXPERIENCE >> 24; + + // Set up SkillUp function + set @SUP_id, SKILL_MAGIC_LIFE; + set @SUP_name$, "Life Magic"; + + set @STATUS_INITIAL, 0; + set @STATUS_LEARNED_LIGHT_HEAL, 1; + set @STATUS_MASTERED_LIGHT_HEAL, 2; + set @STATUS_LEARNED_LAY_ON_HANDS, 3; + set @STATUS_WAITING_FOR_KADIYA, 4; + set @STATUS_READY_TO_LEARN_CURE_POISON, 5; + set @STATUS_LEARNED_CURE_POISON, 6; + + callfunc "ElanoreFix"; + + // This operation works around an earlier possible corruption of this state + if (@Q_status > @Q_STATUS_MAX) + set @Q_status, @STATUS_INITIAL; + callsub S_update_var; + if (sc_check(sc_poison)) goto L_CurePoison; + if (BaseLevel > 20) goto L_NoHeal; + set @TEMP,rand(4); + if(@TEMP == 1) goto L_Heal2; + if(@TEMP == 2) goto L_Heal3; + if(@TEMP == 3) goto L_Heal4; + goto L_Heal1; + +L_Heal1: + + mes "[Elanore the Healer]"; + mes "\"You don't look too well; let me treat your wounds.\""; + next; + goto L_Heal_L; + +L_Heal2: + + mes "[Elanore the Healer]"; + mes "\"I will make quick work of your wounds.\""; + next; + goto L_Heal_L; + +L_Heal3: + + mes "[Elanore the Healer]"; + mes "\"Need a healing?\""; + next; + goto L_Heal_L; + +L_Heal4: + + mes "[Elanore the Healer]"; + mes "\"Sometimes you just need to run from battle.\""; + next; + goto L_Heal_L; + +L_Heal_L: + set @TEMP,rand(3); + if(@TEMP == 1) goto L_Heal_2; + if(@TEMP == 2) goto L_Heal_3; + if(@TEMP == 3) goto L_Heal_4; + goto L_Heal_1; + +L_Heal_1: + + mes "[Elanore the Healer]"; + mes "\"Here you go!\""; + heal 10000,10000; + goto L_Close; + +L_Heal_2: + + mes "[Elanore the Healer]"; + mes "\"Painless, wasn't it?"; + heal 10000,10000; + goto L_Close; + +L_Heal_3: + + mes "[Elanore the Healer]"; + mes "\"You should be more careful.\""; + heal 10000,10000; + goto L_Close; + +L_Heal_4: + + mes "[Elanore the Healer]"; + mes "\"Much better, right?!\""; + heal 10000,10000; + goto L_Close; + +L_NoHeal: + if (MAGIC_FLAGS) + goto L_Chat; + goto L_NoHealMessage; + +L_NoHealMessage: + mes "[Elanore the Healer]"; + mes "\"I'm sorry but unless you are young and in need, I can't help you, and your level is already higher than twenty."; + mes "With so many gaurds still injured, I really have no time to help."; + mes "You can get some rest in the inn near here.\""; + goto L_Close; + +L_Chat: + mes "[Elanore the Healer]"; + mes "\"Hello! Can I help you?\""; + next; + goto L_Main; + +L_Main: + if (@has_magic && (@Q_status == @STATUS_INITIAL)) + menu + "Can you heal me?", L_NoHealMessage, + "Can you teach me magic?", L_Teach, + "What do you know about...", L_Question, + "Goodbye!", L_bye; + if (@has_magic && (@Q_status > @STATUS_INITIAL)) + menu + "Can you heal me?", L_NoHealMessage, + "Can you teach me more?", L_Teach, + "Where can I get more lifestones?", L_Lifestones, + "What do you know about...", L_Question, + "Goodbye!", L_bye; + if (!@has_magic) + menu + "Can you heal me?", L_NoHealMessage, + "What do you know about...", L_Question, + "Goodbye!", L_bye; + goto L_Close; + +OnPCKillEvent: + if (attachrid(@killerrid) == 0) + end; + set @Q_heal_exp, MAGIC_EXPERIENCE >> 24; + if (@Q_heal_exp < 8) goto L_OnPcKillWipe; + set @Q_heal_exp, @Q_heal_exp - 8; + goto L_OnPcKillFinish; + +L_OnPcKillWipe: + set @Q_heal_exp, 0; + goto L_OnPcKillFinish; + +L_OnPcKillFinish: + set MAGIC_EXPERIENCE, (MAGIC_EXPERIENCE & ~(255 << 24)) | (@Q_heal_exp << 24); + goto L_Close; + +L_Lifestones: + mes "[Elanore the Healer]"; + mes "\"I always need components for my own healing spells. If you bring me ten gamboge leaves, ten alizarin leaves, ten mauve leaves and ten cobalt leaves, I can make ten lifestones; I will give you half of them.\""; + next; + menu + "OK, I will get them.", L_Close, + "No way!", L_Close, + "Here you are!", L_Lifestones_Trade, + "Can I make them myself?", L_Lifestones_MakeSelf; + +L_Lifestones_Trade: + if (countitem("MauveHerb") < 10) goto L_Lifestones_Trade_Missing; + if (countitem("GambogeHerb") < 10) goto L_Lifestones_Trade_Missing; + if (countitem("AlizarinHerb") < 10) goto L_Lifestones_Trade_Missing; + if (countitem("CobaltHerb") < 10) goto L_Lifestones_Trade_Missing; + getinventorylist; + if (@inventorylist_count == 100 && countitem("Lifestone") == 0 + && countitem("MauveHerb") > 10 + && countitem("GambogeHerb") > 10 + && countitem("AlizarinHerb") > 10 + && countitem("CobaltHerb") > 10) goto L_Lifestones_NoRoom; + + delitem "MauveHerb", 10; + delitem "GambogeHerb", 10; + delitem "AlizarinHerb", 10; + delitem "CobaltHerb", 10; + getitem "Lifestone", 5; + getexp 200, 1; + mes "[Elanore the Healer]"; + mes "Elanore carefully goes over your leaves, then smiles."; + mes "\"These will do just fine.\""; + mes "She picks up all fourty and presses them together in her hands, then whispers something."; + next; + mes "[Elanore the Healer]"; + mes "As she opens her hands again, the leaves have turned into ten golden crystals."; + mes "\"Five for you and five for me.\""; + mes "She smiles."; + mes "[200 experience points]"; + goto L_Close; + +L_Lifestones_NoRoom: + mes "[Elanore the Healer]"; + mes "\"Oh... it seems that you have no room for the lifestones. But please do come back later when you have made a little space.\""; + goto L_Close; + +L_Lifestones_Trade_Missing: + mes "[Elanore the Healer]"; + mes "Elanore counts the leaves you show her."; + mes "\"No, I am sorry. Please bring me ten leaves each of gamboge, alizarin, mauve, and cobalt.\""; + goto L_Close; + +L_Lifestones_MakeSelf: + mes "[Elanore the Healer]"; + if (@has_magic < 2) goto L_Lifestones_MakeSelf_no; + goto L_Lifestones_MakeSelf_yes; + +L_Lifestones_MakeSelf_yes: + mes "\"Oh, but of course! You are powerful enough to make your own lifestones, using the enchantment '" + getspellinvocation("enchant-lifestone") + "'. This will consume a bug leg or a maggot slime or one of each of the four healing herbs, though.\""; + goto L_Close; + +L_Lifestones_MakeSelf_no: + mes "\"No, you are not powerful enough yet. Please come back and ask me again when you have learned to control more powerful magic, though!\""; + goto L_Close; + +L_Teach: + if (@Q_status == @STATUS_INITIAL) goto L_Teach_Initial; + if (@Q_status == @STATUS_LEARNED_LIGHT_HEAL) goto L_Teach_CheckAdvanceTo2; + if (@Q_status == @STATUS_MASTERED_LIGHT_HEAL) goto L_Teach_CheckAdvanceToLOH; + if (@Q_status == @STATUS_LEARNED_LAY_ON_HANDS) goto L_Teach_Explain3; + if (@Q_status == @STATUS_WAITING_FOR_KADIYA) goto L_Teach_CheckAdvanceTo3; + if (@Q_status == @STATUS_READY_TO_LEARN_CURE_POISON) goto L_Teach_CurePosion; + if (@Q_status == @STATUS_LEARNED_CURE_POISON) goto L_Teach_dunno; + + mes "[Elanore the Healer]"; + mes "\"You have made good progress, but you lack the magical power to advance further. Also, I would like to observe you some more to be certain that you will make a good healer.\""; + goto L_Close; + +L_Teach_Initial: + mes "[Elanore the Healer]"; + mes "\"I will only teach you magic of the school of Life, and that only if you prove yourself to be a good healer – that is, if you use your powers to help others.\""; + mes "She hesistates."; + next; + mes "[Elanore the Healer]"; + mes "\"I don't know you very well, but I don't think that there is any harm in teaching you a simple spell.\""; + mes "She reaches inside her satchel and pulls out a piece of crystal, glittering in the sun."; + mes "\"This here is a lifestone, life energy encased in a crystal shell. You will need it for most healing magic.\""; + next; + mes "[Elanore the Healer]"; + mes "\"To heal someone, first locate the injury. As a beginner, you have to touch the wound; with practice, it will be enough to think about it. Hold the lifestone in one hand, touching the wound with the other.\""; + mes "\"Then say, '" + getspellinvocation("lesser-heal") + "', followed by the name of the one you wish to heal.\""; + next; + mes "[Elanore the Healer]"; + mes "\"You might want to write that down, actually. In fact, you might want to make sure to keep notes of all spells you hear, for you never know if you will hear them again!\""; + mes "\"The invocation was '" + getspellinvocation("lesser-heal") + "'.\""; + next; + mes "[Elanore the Healer]"; + mes "\"This will only cure cuts and bruises, though, and it will take some time to take effect. It will be useless to mend broken bones or more severe injuries!\""; + mes "\"To heal yourself, it's enough to just say '" + getspellinvocation("lesser-heal") + "' by itself.\""; + next; + mes "[Elanore the Healer]"; + mes "\"Let me give you a lifestone to get started with.\""; + next; + getinventorylist; + if ((@inventorylist_count == 100) && (countitem("Lifestone") == 0)) goto L_Teach_Initial_Noroom; + getitem "Lifestone", 1; + set @Q_status, @STATUS_LEARNED_LIGHT_HEAL; + callsub S_update_var; + + mes "[Elanore the Healer]"; + mes "Elanore hands you the crystal."; + mes "\"Here you are. I hope that it will allow you to do good!\""; + goto L_Close; + +L_Teach_Initial_Noroom: + mes "[Elanore the Healer]"; + mes "\"Oh... you managed to put things into every little nook and pocket, haven't you? Well, come back later, I will give it to you then.\""; + goto L_Close; + +L_Teach_CheckAdvanceTo2: + mes "[Elanore the Healer]"; + if (@Q_heal_exp < 20) goto L_Teach_CheckAdvanceTo2_fail; + mes "Elanore smiles at you."; + mes "\"From what I have been hearing, you seem to be doing well on your way to becoming a healer. I have decided to accept you as a student of the School of Life Magic.\""; + next; + if (getskilllv(SKILL_MAGIC) < 2) goto L_Teach_AdvanceTo2_warn; + goto L_Teach_AdvanceTo2_skip; + +L_Teach_AdvanceTo2_warn: + mes "[Elanore the Healer]"; + mes "\"But be warned: you won't be able to use advanced healing magic until you are more capable in your regular magic usage.\""; + next; + goto L_Teach_AdvanceTo2_skip; + +L_Teach_AdvanceTo2_skip: + mes "[Elanore the Healer]"; + mes "\"Please stand still.\""; + mes "She walks up to you, holds your shoulders, and smiles at you."; + next; + mes "[Elanore the Healer]"; + mes "Then, she rises up on her tiptoes and kisses you on your forehead."; + next; + mes "[Elanore the Healer]"; + mes "You feel a strange, tingling kind of warmth spread through your body."; + set @Q_status, @STATUS_MASTERED_LIGHT_HEAL; + callsub S_update_var; + set @SUP_xp, 5000; + set @SUP_lvl, 2; + callfunc "SkillUp"; + goto L_Close; + +L_Teach_CheckAdvanceTo2_fail: + mes "\"I think I would like to observe you for a little longer to see if you would make a good healer.\""; + if (@Q_heal_exp < 5) + mes "\"You are still at the beginning of your path, but do keep practicing.\""; + if ((@Q_heal_exp >= 5) && (@Q_heal_exp < 15)) + mes "\"You are making progress, but you still need more practice.\""; + if (@Q_heal_exp >= 15) + mes "\"You have made good progress, but please do continue in your efforts.\""; + goto L_Close; + +L_Teach_CheckAdvanceToLOH: + if (getskilllv(SKILL_MAGIC) < 2) goto L_Teach_LOH_advance_abort0; + if (@Q_heal_exp < 30) goto L_Teach_LOH_advance_abort1; + + mes "[Elanore the Healer]"; + mes "\"I will now teach you how to heal by laying on your hands. The technique is similar to the spell I taught you at the beginning, but this time you transfer your own health instead of drawing health from a lifestone.\""; + next; + mes "[Elanore the Healer]"; + mes "\"First, lay your hand on the person you wish to heal. You needn't touch the injury itself, though you have to touch the skin until you are a little more experienced. Then, medidate on the word '" + getspellinvocation("lay-on-hands") + "'\""; + next; + mes "[Elanore the Healer]"; + mes "\"This will let your own life force flow into the person you are healing. If you are badly injured yourself, you will not be able to do this.\""; + mes "[1000 experience points]"; + getexp 1000, 0; + set @Q_status, @STATUS_LEARNED_LAY_ON_HANDS; + callsub S_update_var; + goto L_Close; + +L_Teach_LOH_advance_abort0: + mes "[Elanore the Healer]"; + mes "\"You don't have enough magical power to learn the next healing spell yet.\""; + goto L_Close; + +L_Teach_LOH_advance_abort1: + mes "[Elanore the Healer]"; + mes "\"I'm sorry, but I am not yet convinced that you are a good enough healer. Please continue in your endeavours.\""; + goto L_Close; + +L_Teach_Explain3: + if (getskilllv(SKILL_MAGIC) < 3) goto L_Teach_Explain3_abort; + if (@Q_heal_exp < 50) goto L_Teach_Explain3_fail; + + mes "[Elanore the Healer]"; + mes "Elanore smiles."; + mes "\"You seem to be ready to advance as a healer. There is one favour I must ask of you first, though.\""; + set QUEST_MAGIC2, (QUEST_MAGIC2 & ~(NIBBLE_3_MASK)); // Initialise Kadiya quest + set @Q_status, @STATUS_WAITING_FOR_KADIYA; + callsub S_update_var; + next; + + mes "[Elanore the Healer]"; + mes "\"There is a man here in Tulimshar with a beautiful young daughter; his name is Omar, and his daughter's name is Kadiya.\""; + mes "\"Once, when I was a young apprentice, I made a mistake treating Omar. Ever since, he no longer trusts me.\""; + next; + + mes "[Elanore the Healer]"; + mes "\"But his daugher has contracted Mopox, so she needs help. He doesn't trust me, but perhaps he will trust you; you have been helping quite a few people, after all.\""; + next; + goto L_3_menu; + +L_3_menu: + menu + "What should I do?", L_3_what_to_do, + "Where can I find the sick girl?", L_3_where, + "How did you mess up?", L_3_messup, + "I will get started right away.", L_Main, + "Maybe later.", L_Main; + +L_3_what_to_do: + mes "[Elanore the Healer]"; + mes "\"You will have to brew a Mopox cure potion and give it to her. You should ask Caul to help you, he knows the recipe.\""; + next; + mes "[Elanore the Healer]"; + mes "\"First, you will need a concentration potion and an iron potion – together, they will give her her strength back. You also need a lifestone, and a gamboge leaf against the toxins in her body.\""; + next; + mes "[Elanore the Healer]"; + mes "\"You then have to add in roots, water, mauve leaves and sulphur powder until the brew is gooey and neither light nor dark. Caul will explain the details to you.\""; + next; + mes "[Elanore the Healer]"; + mes "\"There is a transmutation spell to make sulphur powder. If you don't know the magic, perhaps you can ask a transmutation mage to help you with this part.\""; + next; + goto L_3_menu; + +L_3_messup: + mes "[Elanore the Healer]"; + mes "\"Ah... well, Omar is a trader, and a frequent traveler. One day he came back from a journey with fleas in his beard and asked me to get rid of them.\""; + next; + mes "[Elanore the Healer]"; + mes "\"Unfortunately I used the wrong lotion on the fleas, so instead of being scared away, they grew to enormous proportions and ate up all of his beard.\""; + next; + mes "[Elanore the Healer]"; + mes "Elanore blushes."; + mes "\"Ever since then he hasn't been very trusting towards my skills, and I suppose that I can't blame him. But I don't want poor Kadiya to suffer because of that.\""; + next; + goto L_3_menu; + +L_3_where: + mes "[Elanore the Healer]"; + mes "\"Kadiya and Omar live relatively close by. See this corner in the inner city wall east of here? Turn past it, then go north. It's the second house.\""; + next; + goto L_3_menu; + +L_Teach_Explain3_abort: + mes "[Elanore the Healer]"; + mes "\"I'm sorry, but you lack the magical power to advance.\""; + goto L_Close; + +L_Teach_Explain3_fail: + mes "[Elanore the Healer]"; + if (@Q_heal_exp < 30) + mes "\"You seem to have regressed as a healer. This is worrisome; please mend your ways or I will not teach you any further.\""; + if ((@Q_heal_exp >= 30) && (@Q_heal_exp < 40)) + mes "\"You still need more practice in the art of healing.\""; + if ((@Q_heal_exp >= 40)) + mes "\"You are doing well, but you need some more practice as a healer first.\""; + goto L_Close; + +L_Teach_CheckAdvanceTo3: + callfunc "KadiyaSubquestConsts"; + + if (@Q_kadiya_status >= @Q_STATUS_COMPLETED) goto L_Teach_AdvanceTo3Ready; + + mes "[Elanore the Healer]"; + mes "\"Please help Kadiya.\""; + next; + goto L_3_menu; + +L_Teach_AdvanceTo3Ready: + mes "[Elanore the Healer]"; + mes "\"I have heard of what you did. Hiding the potion in her favorite food – that was clever.\""; + mes "She smiles at you."; + mes "\"Omar let me have a look at her earlier, and she seems to be recovering. You did very well."; + next; + mes "[Elanore the Healer]"; + mes "Elanor turns towards you, rises up on her toes and kisses you on the forehead."; + next; + set @xp, 30000; + if (@Q_kadiya_status == @Q_STATUS_COMPLETED_ELANORE) + set @xp, 50000; + mes "[Elanore the Healer]"; + mes "You feel a strange, tingling kind of warmth spread through your body."; + mes "[" + @xp + " experience points]"; + mes "[Level 3 in Life Magic]"; + + set @Q_status, @STATUS_READY_TO_LEARN_CURE_POISON; + callsub S_update_var; + getexp @xp, 0; + if (getskilllv(SKILL_MAGIC_LIFE) < 3) + setskill SKILL_MAGIC_LIFE, 3; + next; + + if (@Q_kadiya_status != @Q_STATUS_COMPLETED_ELANORE) goto L_Main; + + mes "[Elanore the Healer]"; + mes "\"Overall I am impressed by your progress. If you continue as you are doing now, you might become a great healer.\""; + mes "She hands you a handful of lifestones."; + mes "\"Please come back soon; there is more that I would like to teach you.\""; + next; + set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_ELANORE_OMAR; + getitem "Lifestone", 20; + + goto L_Main; + +L_Teach_CurePosion: + mes "[Elanore the Healer]"; + mes "\"Thank you again for your help with Kadiya!\""; + mes "\"Curing sicknesses is often quite difficult; most of them require complicated potions to be brewed.\""; + next; + mes "[Elanore the Healer]"; + mes "\"Fortunately, things are much easier with most poisons. For those we have a simple spell that only requires a Gamboge leaf.\""; + mes "\"This is the next spell that I would like to teach you.\""; + next; + mes "[Elanore the Healer]"; + mes "\"If you would like to cure someone who is poisoned, first rub a Gamboge leaf between your hands. Your hands must be covered in Gamboge liquid for this to work.\""; + mes "\"Speak the invocation, `" + getspellinvocation("cure-poison") + "'.\""; + mes "\"Next, you either touch the poisoned person with your hands, or speak their name. You have to be close for this to work, though.\""; + next; + mes "[Elanore the Healer]"; + mes "\"Once again, the invocation is `" + getspellinvocation("cure-poison") + "'.\""; + mes "\"Come back again soon; there is another spell I would like to teach you.\""; + next; + set @Q_status, @STATUS_LEARNED_CURE_POISON; + callsub S_update_var; + goto L_Main; + +L_Teach_dunno: + mes "[Elanore the Healer]"; + mes "\"Hmm. I wanted to teach you something, but I've forgotten what it was... please come back later.\""; + next; + goto L_Main; + +L_Question: + callfunc "MagicTalkOptionsSetup"; + set @ignore, @QQ_ELANORE; + callfunc "MagicTalkMenu"; + + if (@c == 0) goto L_Main; + if (@c == @QQ_MANASEED) goto L_Q_manaseed; + if (@c == @QQ_MANAPOTION) goto L_Q_manapotion; + if (@c == @QQ_WYARA) goto L_Q_wyara; + if (@c == @QQ_SAGATHA) goto L_Q_sagatha; + if (@c == @QQ_AULDSBEL) goto L_Q_auldsbel; + if (@c == @QQ_OLDWIZ) goto L_Q_oldwiz; + if (@c == @QQ_ASTRALSOUL) goto L_Q_astralsoul; + + mes "[Elanore the Healer]"; + mes "Elanore shakes her head."; + mes "\"I am sorry, but I don't think that I know anything that would help you.\""; + next; + goto L_Main; + +L_Q_astralsoul: + mes "[Elanore the Healer]"; + mes "\"The astral soul skill is one of the most important skills for mages. I learned this focus long time ago. Without that skill your magic is quite useless, isn't it? If the rumors are really true, there is an experienced mage in the Woodlands around Hurnscald.\""; + next; + goto L_Main; + +L_Q_oldwiz: + mes "[Elanore the Healer]"; + mes "\"He is a kind old man. He stays mostly with his books and his apprentice, though we have chatted a few times.\""; + next; + goto L_Main; + +L_Q_manaseed: + mes "[Elanore the Healer]"; + mes "She smiles."; + mes "\"If the rumors are true and there really is a Mana Seed, then that would be wonderful news – perhaps we will have a few more healers soon!\""; + next; + goto L_Main; + +L_Q_manapotion: + mes "[Elanore the Healer]"; + mes "\"I'm sorry, but I can't help you with that.\""; + next; + goto L_Main; + +L_Q_wyara: + mes "[Elanore the Healer]"; + mes "\"Wyara is the Hurnscald town witch. She was also the town healer before the Doctor moved there.\""; + next; + goto L_Main; + +L_Q_sagatha: + mes "[Elanore the Healer]"; + mes "\"Oh, I have only met Sagatha once or twice, while collecting herbs. She is a warm and gentle person, but she tries to hide it.\""; + next; + goto L_Main; + +L_Q_auldsbel: + mes "[Elanore the Healer]"; + mes "\"Oh, sorry – I don't really know him very well.\""; + next; + goto L_Main; + +L_CurePoison: + mes "[Elanore the Healer]"; + mes "\"Oh dear! That looks like poison; hang on...\""; + mes "She performs a complicated gesture."; + sc_end(sc_poison); + sc_end(sc_slowpoison); + misceffect sfx_magic_life, strcharinfo(0); + misceffect sfx_magic_life; + next; + mes "[Elanore the Healer]"; + mes "\"There you are, right as rain! Now you take care, all right?\""; + goto L_Close; + +L_bye: + mes "[Elanore the Healer]"; + mes "\"Goodbye!\""; + goto L_Close; + +L_Close: + set @Q_MASK, 0; + set @Q_SHIFT, 0; + set @has_magic, 0; + set @Q_STATUS_MAX, 0; + set @Q_heal_exp, 0; + set @Q_status, 0; + set @SUP_id, 0; + set @SUP_name$, ""; + set @ignore, 0; + set @STATUS_LEARNED_LIGHT_HEAL, 0; + set @STATUS_MASTERED_LIGHT_HEAL, 0; + set @STATUS_LEARNED_LAY_ON_HANDS, 0; + set @STATUS_WAITING_FOR_KADIYA, 0; + set @STATUS_READY_TO_LEARN_CURE_POISON, 0; + set @STATUS_LEARNED_CURE_POISON, 0; + set @TEMP,0; + set @xp, 0; + close; + +S_update_var: + set QUEST_MAGIC2, (QUEST_MAGIC2 & ~(@Q_MASK) | (@Q_status << @Q_SHIFT)); + return; +} diff --git a/world/map/npc/002-1/gaurds.txt b/world/map/npc/002-1/gaurds.txt new file mode 100644 index 00000000..d7fb023f --- /dev/null +++ b/world/map/npc/002-1/gaurds.txt @@ -0,0 +1,19 @@ +// Guards by the gates to the port +002-1.gat,100,21,0|script|Guard#port1|104 +{ + mes "[Guard]"; + mes "\"Lots of stuff happens in the port district. Those sailors can get quite rowdy.\""; + close; +} +002-1.gat,61,27,0|script|Guard#port2|104 +{ + mes "[Guard]"; + mes "\"You wouldn't believe the refuse that comes in from the docks.\""; + close; +} +002-1.gat,83,48,0|script|Guard#east1|104 +{ + mes "[Guard]"; + mes "\"I make sure less desirables don't bother the Nobles.\""; + close; +} diff --git a/world/map/npc/002-1/itka.txt b/world/map/npc/002-1/itka.txt new file mode 100644 index 00000000..fec553d8 --- /dev/null +++ b/world/map/npc/002-1/itka.txt @@ -0,0 +1,21 @@ +// Outside the Hotel +002-1.gat,66,39,0|script|Itka|114 +{ + mes "[Itka]"; + mes "\"This hotel is the best!\""; + next; + mes "\"It has a Baker, a Barber, a Casino and a Theatre.\""; + next; + mes "\"Come on inside now!\""; + close; + +OnTimer300000: + npctalk "Come to The Wizard's Rest!"; + setnpctimer 0; + end; + +OnInit: + if (debug >= 2) end; + initnpctimer; + end; +} diff --git a/world/map/npc/002-1/lieutenant_dausen.txt b/world/map/npc/002-1/lieutenant_dausen.txt index f8a6cf66..c945a296 100644 --- a/world/map/npc/002-1/lieutenant_dausen.txt +++ b/world/map/npc/002-1/lieutenant_dausen.txt @@ -1,7 +1,7 @@ // Lieutenant in charge of monitoring the monster threat surrounding the city. // Variables used: nibble 4 and 5 of QUEST_SouthTulimshar -002-1.gat,54,27,0|script|Lieutenant Dausen|122 +002-1.gat,63,67,0|script|Lieutenant Dausen|122 { // This NPC previously used the variable TMW_Quest callfunc "ClearVarTMW_Quest"; @@ -17,28 +17,16 @@ if (@state == 2) goto L_LD_Woe_Is_Me; if (@state == 1) goto L_LD_Drinks; - set @bermik, ((QUEST_SouthTulimshar & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT); - set @sarah, ((QUEST_SouthTulimshar & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT); - set @vincent, ((QUEST_SouthTulimshar & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT); - set @sandra, ((QUEST_SouthTulimshar & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT); - - if ((@state == 0) && (@bermik >= 6) && (@sarah >= 2) && (@vincent >= 2) && (@sandra >= 2)) - goto L_LD_Start; - mes "[Lieutenant Dausen]"; mes "\"Hello. I am Lieutenant Dausen. I monitor the monster threat around the city to ensure the safety of its citizens.\""; - next; - if (@state) goto L_Close; - mes "[Lieutenant Dausen]"; - mes "\"I may have a job for you, stranger, but first I would like to learn more about you. Go walk among the citizens of Tulimshar, see if any of them could use some help. Once you have established a good reputation, word will get to me.\""; - goto L_Close; + goto L_LD_Start; L_LD_Start: set @state, 1; callsub S_Update_Var; - mes "[Lieutenant Dausen]"; + next; mes "\"Out here in the desert, it sure does get hot! My men and I get thirsty rather quickly. Cactus Drinks are our favourite; if you can get some for us, we'd surely appreciate your effort. About 10 would do.\""; goto L_Close; @@ -134,10 +122,6 @@ L_LD_Key: L_Close: set @state, 0; - set @bermik, 0; - set @sarah, 0; - set @vincent, 0; - set @sandra, 0; close; S_Update_Var: diff --git a/world/map/npc/002-1/luca.txt b/world/map/npc/002-1/luca.txt new file mode 100644 index 00000000..c6c47647 --- /dev/null +++ b/world/map/npc/002-1/luca.txt @@ -0,0 +1,451 @@ +// + +002-1.gat,112,26,0|script|Luca|102 +{ + set @EXP_BRAWLING, 2000; + + if (BaseLevel >= 35) goto L_teach; + + if (BaseLevel >= 25) goto L_teach_soon; + + mes "[Luca the Hunter]"; + mes "\"Ouch! It hurts, this wound I got from battle.\""; + next; + menu "Tell me about it",L_Exp,"Nevermind",L_Nev; + +L_Exp: + mes "[Luca the Hunter]"; + mes "\"I was just coming back from a long journey. I ran into a group of scorpions and started fighting them for experience.\""; + next; + mes "[Luca the Hunter]"; + mes "\"Then, out of a cave came a BLACK one! I had NEVER seen it before!\""; + next; + mes "[Luca the Hunter]"; + mes "\"Luckily I had a camera with me! Here's a picture of it... Let me find it, I put it in my pocket somewhere...\""; + next; + mes "[Luca the Hunter]"; + mes "\"Oh man! My pockets have been ripped clean off!\""; + goto L_Close; + +L_Nev: + mes "[Luca the Hunter]"; + mes "\"Hmpf!\""; + goto L_Close; + +L_teach_soon: + mes "[Luca the Hunter]"; + mes "\"You've grown quite a bit stronger since I first saw you, strolling around town like that! You know, if you train a little more, maybe we can help each other out a little?\""; + goto L_Close; + +L_teach: + if (getskilllv(SKILL_POOL)) goto L_teachmore; + + mes "[Luca the Hunter]"; + mes "\"Hey there! You've become quite the adventurer, haven't you? I think it's time that someone taught you some basic skills.\""; + next; + mes "[Luca the Hunter]"; + mes "\"If you want, I can help with that!\""; + next; + menu + "Sure, that sounds fun!", L_Next, + "I'm not interested.", L_Nev; + +L_Next: + mes "[Luca the Hunter]"; + mes "\"All right! It's not all that easy, though. First you have to learn how to focus. That's because you can learn many skills, but you can't focus on all of them all the time.\""; + next; + mes "[Luca the Hunter]"; + mes "\"When you can do that, you can learn some real skills, and when you know them, you can come back to me to tell me which ones you want to focus on. Deal?\""; + next; + menu + "Yeah!", L_teach0_follow, + "Certainly!", L_teach0_follow, + "Wait... what do you mean?", L_Explain, + "Please explain some more.", L_Explain, + "No.", L_Nev; + +L_teach0_follow: + if (getskilllv(SKILL_POOL)) goto L_teachmore; + + mes "[Luca the Hunter]"; + mes "\"Great! Now, before I can give you that skill, I have to make sure that those stories about you are all true and that you really are experienced enough.\""; + next; + mes "[Luca the Hunter]"; + mes "\"So I'm going to ask you some easy questions.\""; + next; + mes "[Luca the Hunter]"; + mes "\"First, who is the man who guards the entrance to the old Tulimshar underground arena?\""; + next; + input @answer$; + if (@answer$ != "Phaet" && @answer$ != "phaet") goto L_wronganswer; + mes "[Luca the Hunter]"; + mes "\"Good. Next, what's the name of the pipe-smoker who lives on top of Lore Mountain and makes leathery goods there?\""; + next; + input @answer$; + if (@answer$ != "Pachua" && @answer$ != "pachua") goto L_wronganswer; + mes "[Luca the Hunter]"; + mes "\"Great! One more: Who was the adventurer who built Dimond's Cove for Dimond?\""; + next; + input @answer$; + if (@answer$ != "Merlin" && @answer$ != "merlin") goto L_wronganswer; + mes "[Luca the Hunter]"; + mes "Luca laughs in excitement."; + mes "\"All right! You're the real thing, my friend!\""; + next; + mes "[Luca the Hunter]"; + mes "\"Now stand over there. This should only take a second...\""; + mes "He takes off a pendant he is wearing and holds it up."; + next; + mes "[Luca the Hunter]"; + mes "\"See that fang at the end of the chain? Keep staring at it.\""; + next; + mes "[Luca the Hunter]"; + mes "He starts swinging the pendant back and forth."; + mes "\"And whatever you do, don't blink. Don't look away, and don't blink.\""; + next; + mes "[Luca the Hunter]"; + mes "The world slows down around you as you focus on the pendant going back..."; + next; + mes "and forth..."; + next; + mes "and back..."; + next; + mes "and forth..."; + next; + mes "and back..."; + next; + mes "and..."; + next; + mes "You feel relaxed."; + next; + mes "[Luca the Hunter]"; + mes "\"... still there?\""; + mes "You hear the sound of fingers snapping. Why would someone do that on such a calm day?"; + next; + mes "[Luca the Hunter]"; + mes "\"Oh, good... I think it worked. Nice job!\""; + mes "He grins."; + mes "[You gain 10,000 experience points]"; + mes "[You learned Skill Focus]"; + setskill SKILL_POOL, 1; + getexp 10000, 0; + next; + goto L_teachmore2; + +L_wronganswer: + mes "[Luca the Hunter]"; + mes "\"No, that was wrong. I suppose you're not as experienced as I thought you'd be.\""; + goto L_Close; + +L_Explain: + mes "[Luca the Hunter]"; + mes "\"Alright, what do you want to know?\""; + next; + goto L_Explain_loop; + +L_Explain_loop: + menu + "What's skill focus?", L_explain_focus, + "What skills are there?", L_explain_skills, + "How do skills work?", L_explain_work, + "Thanks, I think I got it!", L_Next; + +L_explain_focus: + mes "[Luca the Hunter]"; + mes "\"Well, you can learn many, many skills. But you can't really use all of them at once, not even old Auldsbels' head is big enough for that! So you have to focus.\""; + next; + mes "[Luca the Hunter]"; + mes "\"But you can change that focus whenever you want. It works like this: You come to me, you tell me what you want to focus on, and we do exercises until it's stuck in your head.\""; + next; + mes "[Luca the Hunter]"; + mes "\"If there's not enough space in your head, you'll first have to stop thinking about some other thing. There's an exercise I learned to do that, so when you talk to me you can just let me know what you want to forget.\""; + next; + mes "[Luca the Hunter]"; + if (getskilllv(SKILL_POOL) == 0) + mes "\"Right now you can't focus on anything yet, so I'll first have to teach you a simple skill to keep your focus.\""; + if (getskilllv(SKILL_POOL) == 1) + mes "\"Right now you can only focus on one thing at a time. So if you want to change what your focus is, you have to forget whatever else you've focused on.\""; + if (getskilllv(SKILL_POOL) > 1) + mes "\"You can focus on " + getskilllv(SKILL_POOL) + " skills right now.\""; + next; + mes "[Luca the Hunter]"; + mes "\"You can come back to me to focus or unfocus a skill whenever you want, I'm here all day.\""; + next; + mes "\"For unfocusing you need to bring a potion; a special potion. That potion is not the easiest to get, but I am sure you are able to.\""; + next; + goto L_Explain_loop; + +L_explain_skills: + mes "[Luca the Hunter]"; + mes "\"Well, I don't really know... lots, I think. I can teach you brawling, which is good when you've run out of arrows or don't have a weapon around.\""; + next; + mes "[Luca the Hunter]"; + mes "\"But there's other skills around. Some mages need special skills to concentrate, so ask around in that crowd, if that's your thing.\""; + next; + mes "[Luca the Hunter]"; + mes "\"I've also heard that there is someone in Hurnscald who can help you make your body more resistant against some things. But body and mind belong together, so you probably have to focus for that, too.\""; + next; + mes "[Luca the Hunter]"; + mes "\"Other than that, just ask around! There have to be some people who can teach you something...\""; + next; + goto L_Explain_loop; + +L_explain_work: + mes "[Luca the Hunter]"; + mes "\"Well, skills allow you to be better in some things, or allow to do what you couldn't do without them. When you've learned a skill and are focusing on it, then it affects what you do.\""; + next; + mes "[Luca the Hunter]"; + mes "\"Now, when you start out with a skill, you won't be very good at it yet. But if you keep practicing you'll learn how to get better.\""; + next; + mes "[Luca the Hunter]"; + mes "\"My old teacher always called that getting `skill points' and that you can see them with [F5], whoever that is.\""; + next; + //TODO: + //mes "[Luca the Hunter]"; + //mes "\"She also said that with this [F5] thing you can get better at those skills, and that it costs you as many skill points as the level you want to go to.\""; + //next; + mes "[Luca the Hunter]"; + mes "\"She always would have one cactus potion too many... but she was an amazing teacher.\""; + mes "He nods emphatically."; + next; + goto L_Explain_loop; + +L_teachmore: + mes "[Luca the Hunter]"; + mes "\"Good to see you again!\""; + next; + goto L_teachmore2; + +L_teachmore2: + setarray @choices, 0,0,0,0,0; + setarray @choice$, "", "", "", "", ""; + set @choice_nr, 0; + + set @C_focus, 1; + set @C_unfocus, 2; + set @C_teachbrawling, 3; + set @C_teachnothing, 4; + set @C_explainagain, 5; + set @C_nvm, 6; + set @C_focusoverview, 7; + + getactivatedpoolskilllist; + if (!((getskilllv(SKILL_POOL) - @skilllist_count) > 0)) goto L_teachmore2_nof; + getunactivatedpoolskilllist; + if (@skilllist_count == 0) goto L_teachmore2_nof; + set @choices[@choice_nr], @C_focus; + set @choice$[@choice_nr], "I would like to focus."; + set @choice_nr, @choice_nr + 1; + goto L_teachmore2_nof; + +L_teachmore2_nof: + getactivatedpoolskilllist; + if (@skilllist_count == 0) goto L_teachmore2_nounf; + set @choices[@choice_nr], @C_unfocus; + set @choice$[@choice_nr], "I would like to unfocus."; + set @choice_nr, @choice_nr + 1; + goto L_teachmore2_nounf; + +L_teachmore2_nounf: + if (!(getskilllv(SKILL_BRAWLING))) + set @choices[@choice_nr], @C_teachbrawling; + if (getskilllv(SKILL_BRAWLING)) + set @choices[@choice_nr], @C_teachnothing; + set @choice$[@choice_nr], "Can you teach me a skill?"; + set @choice_nr, @choice_nr + 1; + + set @choices[@choice_nr], @C_explainagain; + set @choice$[@choice_nr], "Can you explain skills again?"; + set @choice_nr, @choice_nr + 1; + + if (!(getskilllv(SKILL_POOL))) goto L_teachmore2_noovv; + set @choices[@choice_nr], @C_focusoverview; + set @choice$[@choice_nr], "Can you tell me what skills I'm currently focused on?"; + set @choice_nr, @choice_nr + 1; + goto L_teachmore2_noovv; + +L_teachmore2_noovv: + set @choices[@choice_nr], @C_nvm; + set @choice$[@choice_nr], "I'm done for now, thanks!"; + set @choice_nr, @choice_nr + 1; + + menu + @choice$[0],L_MenuItems, + @choice$[1],L_MenuItems, + @choice$[2],L_MenuItems, + @choice$[3],L_MenuItems, + @choice$[4],L_MenuItems; + +L_MenuItems: + set @menu, @menu - 1; + if (@choices[@menu] == 0) goto L_Close; + if (@choices[@menu] == @C_focus) goto L_focus; + if (@choices[@menu] == @C_unfocus) goto L_unfocus; + if (@choices[@menu] == @C_teachbrawling) goto L_teach_brawling; + if (@choices[@menu] == @C_teachnothing) goto L_teach_nothing; + if (@choices[@menu] == @C_explainagain) goto L_teachmore_explain; + if (@choices[@menu] == @C_focusoverview) goto L_focus_overview; + if (@choices[@menu] == @C_nvm) goto L_Close; + goto L_Close; + +L_teachmore_explain: + goto L_Explain; + +L_focus: + getunactivatedpoolskilllist; + set @skilllist_id[@skilllist_count], 0; + set @skilllist_name$[@skilllist_count], "Nevermind"; + set @skilllist_name$[@skilllist_count + 1], ""; + menu + @skilllist_name$[0], L_MenuItems1, + @skilllist_name$[1], L_MenuItems1, + @skilllist_name$[2], L_MenuItems1, + @skilllist_name$[3], L_MenuItems1, + @skilllist_name$[4], L_MenuItems1, + @skilllist_name$[5], L_MenuItems1, + @skilllist_name$[6], L_MenuItems1, + @skilllist_name$[7], L_MenuItems1; + +L_MenuItems1: + set @menu, @menu - 1; + if (@skilllist_id[@menu] == 0) goto L_teachmore2; + + poolskill @skilllist_id[@menu]; + goto L_teachmore2; + +L_unfocus: + if (countitem("GrimaceOfDementia") > 0) goto L_unfocus_menu; + + if (MAGIG_FLAGS & MFLAG_KNOWS_UNFOCUS_RECIPE) goto L_nopotion; + + mes "[Luca the Hunter]"; + mes "\"Unfocusing is one of the harder parts though, because it is sunk in. You see?\""; + next; + mes "\"So to remove that mental focus we will need a special potion.\""; + next; + mes "\"Maybe you should consult some very skilled alchemists.\""; + next; + mes "\"Ah yes, of course you will need a recipe. Although the alchemist usually knows it.\""; + next; + mes "\"The potion is called Grimace of Dementia. So the alchemist will know for sure.\""; + set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_KNOWS_UNFOCUS_RECIPE; + menu + "Ok, I will get a Grimace of Dementia potion", L_Close, + "Alright, be right back!", L_Close; + +L_nopotion: + mes "[Luca the Hunter]"; + mes "\"Hey, you really need that dementia potion for unfocusing.\""; + next; + mes "\"Come back when you've found a suitable alchemist who can mix such a potion.\""; + next; + goto L_teachmore2; + +L_unfocus_menu: + mes "[Luca the Hunter]"; + mes "\"Ahh, I see you have a dementia potion.\""; + next; + mes "\"What skill would you like to unfocus?\""; + + getactivatedpoolskilllist; + + set @skilllist_id[@skilllist_count], 0; + set @skilllist_name$[@skilllist_count], "Nevermind"; + set @skilllist_name$[@skilllist_count + 1], ""; + menu + @skilllist_name$[0], L_MenuItems2, + @skilllist_name$[1], L_MenuItems2, + @skilllist_name$[2], L_MenuItems2, + @skilllist_name$[3], L_MenuItems2, + @skilllist_name$[4], L_MenuItems2, + @skilllist_name$[5], L_MenuItems2, + @skilllist_name$[6], L_MenuItems2, + @skilllist_name$[7], L_MenuItems2; + +L_MenuItems2: + set @menu, @menu - 1; + if (@skilllist_id[@menu] == 0) goto L_teachmore2; + + if (countitem("GrimaceOfDementia") == 0) goto L_nopotion; + delitem "GrimaceOfDementia", 1; + + unpoolskill @skilllist_id[@menu]; + goto L_Close; + +L_focus_overview: + getactivatedpoolskilllist; + + if (@skilllist_count != 0) goto L_focus_overview1; + mes "[Luca the Hunter]"; + mes "\"You aren't focused on a skill at the moment.\""; + next; + goto L_teachmore2; + +L_focus_overview1: + mes "[Luca the Hunter]"; + set @message$, "\"At the moment you are focused on "; + goto L_focus_overview2; + +L_focus_overview2: + set @skilllist_count, @skilllist_count-1; + set @message$, @message$ + @skilllist_name$[@skilllist_count]; + if (@skilllist_count == 0) goto L_focus_overview3; + set @message$, @message$ + ", "; + goto L_focus_overview2; + +L_focus_overview3: + set @message$, @message$ + ".\""; + mes @message$; + next; + goto L_teachmore2; + +L_teach_brawling: + mes "[Luca the Hunter]"; + mes "\"Well, yes, I can teach you brawling. It's a nice thing, if you have nothing left but your hands to defend yourself.\""; + next; + mes "He is laughing."; + mes "\"And is handy, if some sapling starts getting naughty.\""; + next; + mes "He raises his hands in front of his face and clenches his fists."; + mes "\"Ok, let's go! Hold your hands like this.\""; + next; + mes "......."; + next; + mes "Some bruises later."; + mes "\"Great! I think, you got it.\""; + next; + set @SUP_id, SKILL_BRAWLING; + set @SUP_lvl, 1; + set @SUP_name$, "Brawling"; + set @SUP_xp, @EXP_BRAWLING; + callfunc "SkillUp"; + goto L_Close; + +L_teach_nothing: + mes "[Luca the Hunter]"; + mes "\"I was able to teach you brawling. For other professions you should visit someone else.\""; + next; + mes "\"You see, I am an adventurer. Everybody has his tricks. But you really should visit someone who is a teacher, not an adventurer, now.\""; + next; + goto L_teachmore2; + +L_Close: + set @SUP_id, 0; + set @SUP_lvl, 0; + set @SUP_name$, ""; + set @SUP_xp, 0; + set @EXP_BRAWLING, 0; + set @answer$, ""; + set @message$, ""; + cleararray @choices[0], 0, 4; + cleararray @choice$[0], "", 4; + set @choice_nr, 0; + set @C_focus, 0; + set @C_unfocus, 0; + set @C_teachbrawling, 0; + set @C_teachnothing, 0; + set @C_explainagain, 0; + set @C_nvm, 0; + set @C_focusoverview, 0; + close; +} diff --git a/world/map/npc/002-1/mapflags.txt b/world/map/npc/002-1/mapflags.txt index 2fabcfb8..91b323a1 100644 --- a/world/map/npc/002-1/mapflags.txt +++ b/world/map/npc/002-1/mapflags.txt @@ -1 +1 @@ -002-1.gat|mapflag|resave|001-1,57,71 +002-1.gat|mapflag|resave|001-1,60,105 diff --git a/world/map/npc/002-1/mine_debug.txt b/world/map/npc/002-1/mine_debug.txt new file mode 100644 index 00000000..d9ee55dc --- /dev/null +++ b/world/map/npc/002-1/mine_debug.txt @@ -0,0 +1,81 @@ +// Mine Debug +// Author: Wushin + +function|script|DesertMineDebug +{ + mes "[Mine Debug]"; + mes "What would you like to do?"; + menu + "Reset", L_Reset, + "Set", L_Set, + "Show", L_Show, + "nothing.", L_Close; + +L_Reset: + set @state, 0; + callsub S_Update_Var; + goto L_Close; + +L_Set: + mes "Values are between 0 and 28"; + mes "8 is Mine Start"; + mes "18 is Angry Scorpions Start"; + mes "20 is Underground Palace Start"; + mes "26 is Giant Cave Maggot Start"; + input @state; + callsub S_Update_Var; + goto L_Close; + +L_Show: + set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT); + mes "Current State: " + @state; + 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; +} +002-1.gat,61,69,0|script|Mine Debug#1|122 +{ + callfunc "DesertMineDebug"; + end; + +OnInit: + if (!debug) + disablenpc "Mine Debug#1"; + end; +} +002-3.gat,45,49,6|script|Mine Debug#2|109 +{ + callfunc "DesertMineDebug"; + end; + +OnInit: + if (!debug) + disablenpc "Mine Debug#2"; + end; +} +002-4.gat,88,99,6|script|Mine Debug#3|109 +{ + callfunc "DesertMineDebug"; + end; + +OnInit: + if (!debug) + disablenpc "Mine Debug#3"; + end; +} +002-5.gat,43,96,6|script|Mine Debug#4|340 +{ + callfunc "DesertMineDebug"; + end; + +OnInit: + if (!debug) + disablenpc "Mine Debug#4"; + end; +} diff --git a/world/map/npc/002-1/nickos.txt b/world/map/npc/002-1/nickos.txt index 39c1cc66..2377bbaf 100644 --- a/world/map/npc/002-1/nickos.txt +++ b/world/map/npc/002-1/nickos.txt @@ -1,7 +1,7 @@ // Sandstorm mine guard // Variables used: nibble 4 and 5 of QUEST_SouthTulimshar -002-1.gat,28,94,0|script|Nickos|123 +002-1.gat,46,108,0|script|Nickos|123 { // This NPC previously used the variable TMW_Quest callfunc "ClearVarTMW_Quest"; diff --git a/world/map/npc/002-1/nomads.txt b/world/map/npc/002-1/nomads.txt index 456bc2b6..987d10ce 100644 --- a/world/map/npc/002-1/nomads.txt +++ b/world/map/npc/002-1/nomads.txt @@ -1,6 +1,6 @@ // -002-1.gat,92,100,0|script|Samuel|132 +002-1.gat,101,114,0|script|Samuel|132 { mes "[Samuel the Nomad]"; mes "\"This is really a nice place.\""; @@ -8,7 +8,7 @@ close; } -002-1.gat,102,100,0|script|Elijah|128 +002-1.gat,105,114,0|script|Elijah|128 { mes "[Elijah the Nomad]"; mes "\"It's nice to find a respite like this...\""; diff --git a/world/map/npc/002-1/npcs.txt b/world/map/npc/002-1/npcs.txt new file mode 100644 index 00000000..a2ae00ac --- /dev/null +++ b/world/map/npc/002-1/npcs.txt @@ -0,0 +1,24 @@ +002-1.gat,96,23,0|script|Jeric|214 +{ + set @npcname$, "Jeric"; + + mes "[" + @npcname$ + "]"; + mes "\"My father is an adventurer.\""; + next; + mes "\"After he proved himself around town, the guards let him fight monsters in the Sandstorm mine.\""; + set @npcname$, ""; + close; +} +002-1.gat,112,48,0|script|Silvia|207 +{ + set @npcname$, "Silvia"; + + mes "[" + @npcname$ + "]"; + mes "\"If you follow the road west, then north, you will arrive at the Bazaar in Northern Tulimshar.\""; + next; + mes "\"If you go west, then north, you'll see the Wizard Academy my parents just sent me to.\""; + next; + mes "\"The Academy is good, but I wish I had more free time. It takes a lot of intelligence to get what the teachers are talking about.\""; + set @npcname$, ""; + close; +} diff --git a/world/map/npc/002-1/sarah.txt b/world/map/npc/002-1/sarah.txt new file mode 100644 index 00000000..15eeb83b --- /dev/null +++ b/world/map/npc/002-1/sarah.txt @@ -0,0 +1,88 @@ +// Variables used: nibble 1 of QUEST_SouthTulimshar + +002-1.gat,93,43,0|script|Sarah|106 +{ + // This NPC previously used the variable TMW_Quest + callfunc "ClearVarTMW_Quest"; + + set @state, ((QUEST_SouthTulimshar & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT); + + if (@state >= 2) goto L_Done; + if (@state == 1) goto L_Progress; + + mes "[Sarah]"; + mes "\"Boy, am I hungry or what!\""; + next; + + set @TEMP, rand(2); + if(@TEMP == 1) goto L_Opening1; + goto L_Opening0; + +L_Opening0: + mes "\"Cherry Cake is the best!\""; + next; + goto L_Ask; + +L_Opening1: + mes "\"Mmm, Cherry Cake... I love it!\""; + next; + goto L_Ask; + +L_Ask: + mes "\"Can you bring me a piece of Cherry Cake? Pretty please?\""; + menu + "Yes.", L_Req0, + "No.", L_Close; + +L_Req0: + mes "[Sarah]"; + mes "\"Yippee! Bring me a piece of Cherry Cake, and I'll give you a nice hat!\""; + next; + set @state, 1; + callsub S_Update_Var; + mes "[Sarah]"; + mes "\"Please bring it to me!\""; + goto L_Close; + +L_Progress: + if (countitem("CherryCake") < 1) + goto L_NotEnough; + mes "[Sarah]"; + mes "\"Whee!\""; + next; + mes "You brought me Cherry Cake! Here is your new hat, as promised.\""; + emotion EMOTE_TONGUE; + getinventorylist; + if ((@inventorylist_count - (countitem("CherryCake") == 1)) > 99) goto L_TooMany; + delitem "CherryCake", 1; + getitem "SerfHat", 1; + set @state, 2; + callsub S_Update_Var; + goto L_Close; + +L_NotEnough: + mes "[Sarah]"; + mes "\"Oh, I'm starving! Please bring me Cherry Cake!\""; + goto L_Close; + +L_Done: + mes "[Sarah]"; + mes "\"It was so tasty, I can't eat anything more... Thank you!\""; + emotion EMOTE_TONGUE; + goto L_Close; + +L_Close: + set @TEMP, 0; + set @state, 0; + close; + +L_TooMany: + next; + mes "[Sarah]"; + mes "\"You don't have room for my reward. I'll wait until you do.\""; + goto L_Close; + +S_Update_Var: + set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(NIBBLE_1_MASK) | (@state << NIBBLE_1_SHIFT)); + return; +} diff --git a/world/map/npc/002-1/soul-menhir.txt b/world/map/npc/002-1/soul-menhir.txt new file mode 100644 index 00000000..9fe0c06a --- /dev/null +++ b/world/map/npc/002-1/soul-menhir.txt @@ -0,0 +1,18 @@ +// + +002-1.gat,58,60,0|script|Soul Menhir#tulimshar|345 +{ + callfunc "ClearVariables"; + set @map$, "001-1.gat"; + setarray @Xs, 57, 58, 59, 57, 59, 57, 59; + setarray @Ys, 59, 59, 59, 60, 60, 61, 61; + set @x, 0; + set @y, 0; + callfunc "SoulMenhir"; + set @map$, ""; + cleararray @Xs[0], 0, 7; + cleararray @Ys[0], 0, 7; + set @x, 0; + set @y, 0; + close; +} diff --git a/world/map/npc/002-1/stewen.txt b/world/map/npc/002-1/stewen.txt index 727c0ee3..461451fe 100644 --- a/world/map/npc/002-1/stewen.txt +++ b/world/map/npc/002-1/stewen.txt @@ -1,7 +1,7 @@ // East sandstorm guard // Variables used: nibble 4 and 5 of QUEST_SouthTulimshar -002-1.gat,106,76,0|script|Stewen|123 +002-1.gat,116,93,0|script|Stewen|123 { // This NPC previously used the variable TMW_Quest callfunc "ClearVarTMW_Quest"; diff --git a/world/map/npc/002-1/traveler.txt b/world/map/npc/002-1/traveler.txt new file mode 100644 index 00000000..567d8667 --- /dev/null +++ b/world/map/npc/002-1/traveler.txt @@ -0,0 +1,11 @@ +// This is a teleportation (warp) NPC. Its purpose is to offer expensive, fast trips throughout the world. +// Author: Wombat, wushin +// cost depending on level and adapted to new scripting guidelines: Jenalya + +002-1.gat,60,41,0|script|Nina the Traveler|103 +{ + set @NpcName$, "Nina"; + set @NpcTravelBit, $@tulimshar_bit; + callfunc "Traveler"; + end; +} |