diff options
Diffstat (limited to 'npc/002-1/alige.txt')
-rw-r--r-- | npc/002-1/alige.txt | 415 |
1 files changed, 154 insertions, 261 deletions
diff --git a/npc/002-1/alige.txt b/npc/002-1/alige.txt index 665f1ef9e..a0d94442b 100644 --- a/npc/002-1/alige.txt +++ b/npc/002-1/alige.txt @@ -1,322 +1,215 @@ // TMW2 Scripts. -// Evol scripts. +// +// TMW-BR Original Authors: +// Programmer: Adson Renato +// Texts: Arkanjo +// Review: Jesusalva +// // Authors: -// Ablu -// Alige -// Qwerty Dragon -// Reid -// Vasily_Makarov // Jesusalva // Description: -// Stowaway hidden in a ship's hole. -// 2 bits array: -// ShipQuests -// Variable: -// ShipQuests_Alige -// Values: -// 0 Never talk. -// 1 First talk. -// 2 Accept the task. -// 3 Bring first food. - -002-1,45,27,0 script AligeTrigger NPC_HIDDEN,1,1,{ - -OnTouch: - if (getareausers() <= 1) - { - setnpcdir "Alige", 2; - stopnpctimer; - initnpctimer; - } - - if (getq(ShipQuests_Alige) > 0) close; - doevent "Alige::OnFirstEncounter"; - - close; - -OnUnTouch: - if (getareausers() == 0) - { - setnpcdir "Alige", 4; - stopnpctimer; - initnpctimer; - } - close; - -OnTimer190: - stopnpctimer; - - if (getnpcdir("Alige") == 2) setnpcdir "Alige", 6; - if (getnpcdir("Alige") == 4) setnpcdir "Alige", 8; - - end; -} +// Stowaway hidden in a ship's hole. Contrabandist. Trade potions, dyes, +// food, water, and money for an item. +// In BR originals requested a four leaf clover to do luck magic, in order to not be caught. +// That would imply teaching a new skill, and I'm not felling like it, so I removed. 002-1,45,26,0 script Alige NPC_ALIGE,{ - .@q = getq(ShipQuests_Alige); - if (.@q > 1) goto L_AskForFood; - - goto OnFirstEncounter; - -OnFirstEncounter: - setq ShipQuests_Alige, 1; - - setcamnpc; - mesn "Hidden Person"; - mesq l("Hey, psst! You're not a sailor, right?"); + if (BaseLevel < 42) goto L_Weak; + .@q=getq(ShipQuests_Alige); + if (.@q == 1) goto L_Return; + if (.@q == 2) goto L_End; + mesn; + mesq lg("Hey, dude! The guards are after me. I need your help, and I can reward you."); next; - restorecam; - + mesn strcharinfo(0); menu - lg("I am, who are you?"), -, - lg("Indeed, I am not."), L_NeedHelp; - - mes ""; - mesn "Narrator"; - mes col(l("The stowaway doesn't answer."), 9); + l("Guaaaards! Sailors! Help! We have a stowaway!"), L_Revolt, + l("Not right now, I'm busy."), L_Close, + l("Did you said reward?!"), L_GoGo; +L_Weak: + mesc l("You thought there was someone here. It must have been your imagination."); close; -L_NeedHelp: - setcamnpc; +L_Revolt: mes ""; - mesn "Hidden Person"; - mesq l("Good, good... Hey, could you help me please? I beg you, please, pleeeease..."); - next; - restorecam; - - menu - l("Why not, but who are you, and what kind of help do you need?"), L_CanHelp; - l("Sorry but I have no time for this."), -; - - closedialog; + message strcharinfo(0), l("Guaaaards! Sailors! Help! We have a stowaway!"); + mesn; + mesq l("No, please don't! I have 3 kids to feed. They are looking for me for contraband. Please, let me go!"); close; -L_CanHelp: - setcamnpc; +L_GoGo: mes ""; mesn; - mesq l("My name is Alige, I've been hiding here for weeks. All I have to eat are these berries... berries... berries..."); - next; - mesq l("I'm losing my mind here, I need something else to eat!"); + mesq l("Yes, I need to get out of here the earliest possible."); next; - mesq l("Could you please bring me something which isn't a berry, and I'm not big on vegetables either. I need proteins!"); + mesn strcharinfo(0); + mesq l("So tell me already what you need, and what is the reward!"); next; - restorecam; - +// Stowaway hidden in a ship's hole. Contrabandist. Trade potions, dyes, +// food, water, and money for a hat. + mesn; + mesc l("Alige hands you an old paper patch."); + next; + mesn l("Old Paper Patch"); + mes l("* @@/30 @@", countitem(CactusPotion), getitemlink(CactusPotion)); + mes l("* @@/12 @@", countitem(Bread), getitemlink(Bread)); + mes l("* @@/12 @@", countitem(Cheese), getitemlink(Cheese)); + mes l("* @@/12 @@", countitem(CherryCake), getitemlink(CherryCake)); + mes l("* @@/8 @@", countitem(BottleOfTonoriWater), getitemlink(BottleOfTonoriWater)); + mes l("* @@/6 @@", countitem(HastePotion), getitemlink(HastePotion)); + mes l("* @@/6 @@", countitem(StrengthPotion), getitemlink(StrengthPotion)); + mes l("* @@/2 @@", countitem(YellowDye), getitemlink(YellowDye)); + mes l("* @@/2 @@", countitem(BlueDye), getitemlink(BlueDye)); + mes l("* @@/7.500 GP", Zeny); + next; + // Temporary item. This four leaf amulet can be evolved: Bromenal < Iron < Golden < Crozenite + mesn; + mesq l("In exchange for your help, I'll give you a @@!", getitemlink(CrozeniteFourLeafAmulet)); menu - l("Sure, but what will you give me in exchange?"), L_AboutReward, - l("Why don't you come out?"), -; + l("Of course I'll help you!"), L_Accept, + l("Have you got mad? That's too much, it's like you are trying to be perfect! No way I'll help you!"), L_Close; -L_ExplainHiding: - setcamnpc; +L_Accept: mes ""; mesn; - mesq l("No, I can't. I won't! All I wanted was to travel across the seas for fun, growl... sniff. And in this hole in the floor, as you can see, I have lots of fun."); + mesq l("\"Many thanks! I'll be waiting for you, hiding on the ship's hold!\""); next; - mesq l("Oh... um... actually... all I wanted was to get to Artis. Err... but I didn't, uhm... have enough money to pay for the ferry!"); + mesn strcharinfo(0); + mesq l("Could you first explain me why so many items?"); next; - mesq l("Please don't tell people you saw me. I don't want to be decapitated or get thrown into the sea as food for sharks, or get my hair mussed!"); + mesn; + mesq l("Very well, listen to my plan!"); next; - restorecam; - - if (getq(ShipQuests_Alige) == 2) goto L_SoAskForFood; - goto L_Accept; - -L_AboutReward: - setcamnpc; - mes ""; mesn; - mesq l("I'll share my berries with you if you help me."); + mesq l("The dyes are to disguise myself, I don't want to get caught. The potions are for safety, who knows what I'll face?"); next; - restorecam; - -L_Accept: - menu - l("Understood, I will help you."), L_FirstAccepted, - l("What is Artis?"), L_Artis, - l("I think I should report you to the crew members."), -; - - setcamnpc; - mesq lg("Growl, sniff, grr! You'd better not tell anyone you saw me!"); - - close; - -L_Artis: - setcamnpc; - mes ""; mesn; - mesq l("It's a commercial port town, far far away from Tulimshar and the Great Continent. But hey, back to me. Remember me telling you that I'm hun...grrr...eee!"); + mesq l("Water, Bread, Cheese and Cherry Cake are to eat, and money is always useful, you know."); next; - restorecam; - - if (.@q == 2) goto L_SoAskForFood; - goto L_Accept; - -L_FirstAccepted: - if (getq(ShipQuests_Alige) >= 2) goto L_Accepted; - setq ShipQuests_Alige, 2; - - goto L_Accepted; + mesn strcharinfo(0); + mesq l("You planned neatly. I'll be back."); + setq ShipQuests_Alige, 1; + close; -L_Accepted: - setcamnpc; - mes ""; +L_Return: mesn; - mesq lg("Great, what food do you have for me today?"); + mesq l("Hey, psst! Have you brought me what I asked for?"); next; - restorecam; - -L_GiveFood: - mes ""; - menuint - rif(countitem(Acorn), l(getitemname(Acorn))), 0, - rif(countitem(Bread), l(getitemname(Bread))), 502, - rif(countitem(Fungus), l(getitemname(Fungus))), 503, - rif(countitem(Cheese), l(getitemname(Cheese))), 504, - rif(countitem(PiouLegs), l(getitemname(PiouLegs))), 505, - rif(countitem(LettuceLeaf), l(getitemname(LettuceLeaf))), 0, - rif(countitem(Piberries), l(getitemname(Piberries))), 2, - rif(countitem(SeaDrops), l(getitemname(SeaDrops))), 1, - rif(countitem(Aquada), l(getitemname(Aquada))), 509, - rif(countitem(PinkBlobime), l(getitemname(PinkBlobime))), 1, - rif(countitem(HalfCroconut), l(getitemname(HalfCroconut))), 512, - rif(countitem(Croconut), l(getitemname(Croconut))), 0, - rif(countitem(Plushroom), l(getitemname(Plushroom))), 515, - //rif(countitem(PumpkinSeeds), l(getitemname(PumpkinSeeds))), 1, // ITEM MOVED TO ART - rif(countitem(UrchinMeat), l(getitemname(UrchinMeat))), 1, - rif(countitem(EasterEgg), l(getitemname(EasterEgg))), 1, - rif(countitem(PumpkishJuice), l(getitemname(PumpkishJuice))), 527, - rif(countitem(Manana), l(getitemname(Manana))), 528, - rif(countitem(Curshroom), l(getitemname(Curshroom))), 529, - rif(countitem(Carrot), l(getitemname(Carrot))), 530, - rif(countitem(RedPlushWine), l(getitemname(RedPlushWine))), 3, - l("I don't have anything good for you today."), -1; - - .@id = @menuret; - if (.@id == -1) goto L_Quit; // Quit message. - if (.@id == 0) goto L_NoReward; // In case of wrong food. - if (.@id == 1) goto L_Poison; // In case of poisoned food. - if (.@id == 2) goto L_NoMore; // In case of Piberries. - if (.@id == 3) goto L_Drunk; // In case of Alcohol. - if (countitem(.@id) == 0) goto L_Quit; -// if (.@id == item's ID) then food is correct. -// Do not put any other number than -1, 0, 1, 2 or the item's ID, that'll avoid confusion. - - inventoryplace Piberries, 3; - delitem .@id, 1; + mesn strcharinfo(0); + menu + l("What I had to bring, again?"), L_Remember, + l("Yes, you can count it."), L_Check, + l("No... Not yet, sorry."), L_Close; - setcamnpc; +L_Remember: mes ""; + mesc l("Alige hands you an old paper patch."); + next; + mesn l("Old Paper Patch"); + mes l("* @@/30 @@", countitem(CactusPotion), getitemlink(CactusPotion)); + mes l("* @@/12 @@", countitem(Bread), getitemlink(Bread)); + mes l("* @@/12 @@", countitem(Cheese), getitemlink(Cheese)); + mes l("* @@/12 @@", countitem(CherryCake), getitemlink(CherryCake)); + mes l("* @@/8 @@", countitem(BottleOfTonoriWater), getitemlink(BottleOfTonoriWater)); + mes l("* @@/6 @@", countitem(HastePotion), getitemlink(HastePotion)); + mes l("* @@/6 @@", countitem(StrengthPotion), getitemlink(StrengthPotion)); + mes l("* @@/2 @@", countitem(YellowDye), getitemlink(YellowDye)); + mes l("* @@/2 @@", countitem(BlueDye), getitemlink(BlueDye)); + mes l("* @@/7.500 GP", Zeny); + next; + // Temporary item. This four leaf amulet can be evolved: Bromenal < Iron < Golden < Crozenite mesn; - mesq l("Thank you so much! Here, have some of my berries."); - - setq ShipQuests_Alige, 3; - getitem Piberries, rand(1, 3); - next; - - goto L_ReturnMenu; + mesq l("In exchange for your help, I'll give you a @@!", getitemlink(CrozeniteFourLeafAmulet)); + close; -L_NoReward: - setcamnpc; +L_Check: + if (countitem(CactusPotion) < 30 || + countitem(Bread) < 12 || + countitem(Cheese) < 12 || + countitem(CherryCake) < 12 || + countitem(BottleOfTonoriWater) < 8 || + countitem(HastePotion) < 6 || + countitem(StrengthPotion) < 6 || + countitem(YellowDye) < 2 || + countitem(BlueDye) < 2) + goto L_Missing; + if (Zeny < 7500) goto L_Poor; + + inventoryplace CrozeniteFourLeafAmulet, 1; + delitem CactusPotion, 30; + delitem Bread, 12; + delitem Cheese, 12; + delitem CherryCake, 12; + delitem BottleOfTonoriWater, 8; + delitem HastePotion, 6; + delitem StrengthPotion, 6; + delitem YellowDye, 2; + delitem BlueDye, 2; + Zeny = Zeny - 7500; + getitem CrozeniteFourLeafAmulet, 1; + getexp 2625, 50; + setq ShipQuests_Alige, 2; mes ""; mesn; - mesq l("You don't expect me to eat that, do you? Give me something else!"); + mesq l("Good job... Here is your reward..."); next; - restorecam; - - goto L_GiveFood; - -L_Drunk: - setcamnpc; - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I asked for food but... *hips* Ah, that'll do!"); - restorecam; - - goto L_GiveFood; - -L_ReturnMenu: - setcamnpc; - mesq l("Do you have anything else for me?"); - next; - restorecam; - - goto L_GiveFood; + mesn; + mesq l("I have to get going now. Thanks for the help!"); + close; -L_NoMore: - setcamnpc; +L_Poor: mes ""; mesn; - mesq l("Grr, don't give me more berries! I don't want them, stupid berries, stupid... Stupid... Stupid!"); + mes l("There's not everything I've asked for..."); next; + goto L_Remember; - goto L_ReturnMenu; - -L_Poison: - setcamnpc; +L_Missing: mes ""; mesn; - mesq l("Don't try to poison me! I know what that does!"); + mes l("There's not everything I've asked for..."); next; - restorecam; - goto L_ReturnMenu; + goto L_Remember; -L_SoAskForFood: - setcamnpc; +L_End: mesn; - mesq l("So, do you have anything for me today?"); + mes l("I am still here, but I already did amends for my acts and don't need to flee anymore..."); next; - restorecam; - goto L_IntroMenu; + mesn strcharinfo(0); + mes l("Why am I having a hard time to believe on you..."); + close; -L_AskForFood: - setcamnpc; - mesn; - mesq l("Do you have anything for me today?"); - next; - restorecam; +L_Close: + close; -L_IntroMenu: - menu - l("Yes."), L_GiveFood, - l("Where can I find some food?"), L_FindFood, - l("Why are you hiding?") + " " + l("Why don't you come out?"), L_ExplainHiding, - l("What is Artis?"), L_Artis, - l("I think I should report you to the crew members."), -; +OnInit: + .sex = G_MALE; + .distance = 2; - setcamnpc; - mesq lg("Growl, sniff, grr! You'd better not tell anyone you saw me!"); + /* + // Preventive check against faulty update. Must be removed afterwards. + // UPDATE `quest` SET `count1` = '0' WHERE `quest`.`quest_id` = 2; + .@nb = query_sql("select `char_id` from `quest` WHERE (`count1`>=1 and `quest_id`=2) LIMIT 2", .@name$); + if (getarraysize(.@name$) > 0) { + debugmes "FATAL ERROR: Quest log not updated."; + debugmes "disabling Alige to prevent weirder bugs."; + debugmes "UPDATE `quest` SET `count1` = '0' WHERE `quest`.`quest_id` = 2"; + disablenpc .name$; + } + */ - close; + end; -L_FindFood: - setcamnpc; - mes ""; - mesn; - mesq l("There are some flying yellow plushes around you. They're called pious. Getting a roasted leg of one of them would be perfect."); - next; - mesq l("I'd like to catch one of them, but they fly away when I try."); - next; - mesq l("Walking around a bit, it'll be easy for you to catch one, I bet. Impale one of them for me please."); - next; - restorecam; - mesn "Narrator"; - mes col(l("You can attack a monster by clicking on it, or from your keyboard you can press the 'A' key to select the monster followed by 'Ctrl' to attack it."), 9); - next; - mes col(l("Once the monster is dead, click on the dropped items to add them to your inventory. You can also use the 'Z' key to claim the drops."), 9); +OnTouch: + if (getareausers() <= 1) + setnpcdir "Alige", 2; // 6 close; -L_Quit: - setcamnpc; - mes ""; - mesn; - mesq l("Too bad... Come back when you'll have some nice food for me. Growl... grumble... grumble."); - +OnUnTouch: + if (getareausers() == 0) + setnpcdir "Alige", 4; // 8 close; -OnInit: - .sex = G_MALE; - .distance = 2; - end; } |