summaryrefslogtreecommitdiff
path: root/npc/002-1
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-10-23 21:44:22 -0300
committerJesusaves <cpntb1@ymail.com>2022-10-23 21:44:22 -0300
commita7c45a192268da2601cef47a4cdba987ae2327ca (patch)
treec5fb5b97db109fe7106496dd96498c475881046b /npc/002-1
downloadserverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.gz
serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.bz2
serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.xz
serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.zip
Initial commit (Moubootaur Legends fork)
Diffstat (limited to 'npc/002-1')
-rw-r--r--npc/002-1/_import.txt15
-rw-r--r--npc/002-1/_mobs.txt3
-rw-r--r--npc/002-1/alige.txt204
-rw-r--r--npc/002-1/arpan.txt184
-rw-r--r--npc/002-1/billybons.txt108
-rw-r--r--npc/002-1/chefgado.txt109
-rw-r--r--npc/002-1/dan.txt169
-rw-r--r--npc/002-1/devis.txt17
-rw-r--r--npc/002-1/doors.txt17
-rw-r--r--npc/002-1/hammock.txt73
-rw-r--r--npc/002-1/juliet.txt171
-rw-r--r--npc/002-1/knife.txt49
-rw-r--r--npc/002-1/mapflags.txt1
-rw-r--r--npc/002-1/peter.txt307
14 files changed, 1427 insertions, 0 deletions
diff --git a/npc/002-1/_import.txt b/npc/002-1/_import.txt
new file mode 100644
index 0000000..d9d804f
--- /dev/null
+++ b/npc/002-1/_import.txt
@@ -0,0 +1,15 @@
+// Map 002-1: Second Deck
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/002-1/_mobs.txt",
+"npc/002-1/alige.txt",
+"npc/002-1/arpan.txt",
+"npc/002-1/billybons.txt",
+"npc/002-1/chefgado.txt",
+"npc/002-1/dan.txt",
+"npc/002-1/devis.txt",
+"npc/002-1/doors.txt",
+"npc/002-1/hammock.txt",
+"npc/002-1/juliet.txt",
+"npc/002-1/knife.txt",
+"npc/002-1/mapflags.txt",
+"npc/002-1/peter.txt",
diff --git a/npc/002-1/_mobs.txt b/npc/002-1/_mobs.txt
new file mode 100644
index 0000000..0cc92c0
--- /dev/null
+++ b/npc/002-1/_mobs.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 002-1: Second Deck mobs
+002-1,49,30,25,12 monster Piou 1002,2,30000,20000,PiouSpwn::OnFakeKill
diff --git a/npc/002-1/alige.txt b/npc/002-1/alige.txt
new file mode 100644
index 0000000..e23bfae
--- /dev/null
+++ b/npc/002-1/alige.txt
@@ -0,0 +1,204 @@
+// TMW2 Scripts.
+//
+// TMW-BR Original Authors:
+// Programmer: Adson Renato
+// Texts: Arkanjo
+// Review: Jesusalva
+//
+// Authors:
+// Jesusalva
+// Description:
+// 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,{
+ 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;
+ mesn strcharinfo(0);
+ menu
+ 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.");
+ if (@seenalige)
+ goto L_Noob;
+ @seenalige=true;
+ close;
+
+L_Noob:
+ mes "";
+ mesc l("Protip: You need level %d or higher to do this quest.", 42), 1;
+ close;
+
+L_Revolt:
+ mes "";
+ 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_GoGo:
+ mes "";
+ mesn;
+ mesq l("Yes, I need to get out of here the earliest possible.");
+ next;
+ mesn strcharinfo(0);
+ mesq l("So tell me already what you need, and what is the reward!");
+ next;
+// 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("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_Accept:
+ mes "";
+ mesn;
+ mesq l("\"Many thanks! I'll be waiting for you, hiding on the ship's hold!\"");
+ next;
+ mesn strcharinfo(0);
+ mesq l("Could you first explain me why so many items?");
+ next;
+ mesn;
+ mesq l("Very well, listen to my plan!");
+ next;
+ mesn;
+ 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;
+ mesn;
+ mesq l("Water, Bread, Cheese and Cherry Cake are to eat, and money is always useful, you know.");
+ next;
+ mesn strcharinfo(0);
+ mesq l("You planned neatly. I'll be back.");
+ setq ShipQuests_Alige, 1;
+ close;
+
+L_Return:
+ mesn;
+ mesq l("Hey, psst! Have you brought me what I asked for?");
+ next;
+ 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;
+
+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("In exchange for your help, I'll give you a @@!", getitemlink(CrozeniteFourLeafAmulet));
+ close;
+
+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_Missing;
+
+ 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 32625, 50;
+ setq ShipQuests_Alige, 2;
+ mes "";
+ mesn;
+ mesq l("Good job... Here is your reward...");
+ next;
+ mesn;
+ mesq l("I have to get going now. Thanks for the help!");
+ close;
+
+L_Missing:
+ mes "";
+ mesn;
+ mes l("There's not everything I've asked for...");
+ next;
+ goto L_Remember;
+
+L_End:
+ mesn;
+ mes l("I am still here, but I already did amends for my acts and don't need to flee anymore...");
+ next;
+ mesn strcharinfo(0);
+ mes l("Why am I having a hard time to believe on you...");
+ close;
+
+L_Close:
+ close;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 2;
+
+ /*
+ // 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$;
+ }
+ */
+
+ end;
+}
diff --git a/npc/002-1/arpan.txt b/npc/002-1/arpan.txt
new file mode 100644
index 0000000..11de798
--- /dev/null
+++ b/npc/002-1/arpan.txt
@@ -0,0 +1,184 @@
+// TMW-2 Script.
+// Editor: Jesusalva
+//
+// Evol scripts.
+// Authors:
+// Ablu
+// Qwerty Dragon
+// Description:
+// Introduction NPC
+
+002-1,49,36,0 script LeftDoorCheck NPC_HIDDEN,0,0,{
+ .@q = getq(ShipQuests_Arpan);
+ if (.@q == 5) doevent instance_npcname("Magic Arpan")+"::OnTalk";
+
+ close;
+}
+
+002-1,54,36,0 script RightDoorCheck NPC_HIDDEN,0,0,{
+ .@q = getq(ShipQuests_Arpan);
+ if (.@q == 5) doevent instance_npcname("Magic Arpan")+"::OnTalk";
+
+ close;
+}
+
+
+002-1,49,33,0 script Magic Arpan NPC_MAGIC_ARPAN,{
+ showavatar NPC_MAGIC_ARPAN;
+
+ .@q = getq(ShipQuests_Arpan);
+ .@s = getq2(ShipQuests_Arpan);
+ .@n = getq(General_Narrator);
+ .@q_julia = getq(ShipQuests_Julia);
+
+OnTalk:
+ showavatar NPC_MAGIC_ARPAN;
+ mesn;
+
+ if (.@q > 5) goto L_Menu;
+ setq ShipQuests_Arpan, 6;
+ deltimer("Magic Arpan::OnSlow");
+
+ mesq lg("Yeye, are you finally ready to go?");
+ if (!TUTORIAL)
+ mesc l("Protip: You skipped tutorial. A lot of tutorial-ish dialogs and quests will be skipped. You can change this anytime on %s > Game Settings.", b("@ucp"));
+ next;
+
+ select
+ l("Yes, I want to find out who I am."),
+ l("No, but what option do I have? I'm railroaded!");
+ mes "";
+
+ if (@menu == 2) {
+ mesn;
+ mesq l("Yeye is not paying for your food and is not a sailor like us! You should start standing on your own feet.");
+ next;
+ mesn strcharinfo(0);
+ mesq l("Thanks for the honestity, I guess.");
+ next;
+ }
+
+ mes "";
+ mesn;
+ mesq l("Anyway, our shipkeeper, Juliet, helped to heal your injuries way back.");
+ next;
+ mesn;
+ if (.@q_julia == 0)
+ setq ShipQuests_Julia, 1;
+ mesq lg("Yaya, you should go see her! She'll be happy to help you again.");
+ next;
+ mesc b(l(".:: Main Quest 1-1 ::.")), 3;
+ msObjective(false, l("Talk to @@", l("Juliet")));
+ tutmes l("Juliet is east (right) of %s.", .name$), l("Protip"), false;
+ next;
+ goto L_Menu;
+
+
+L_Menu:
+ mesq l("What yeye could I do for you today?");
+ next;
+
+ menu
+ rif(.@q_julia < 2, lg("Where can I find Juliet?")), L_Julia,
+ rif(!.@n, lg("Could you tell me where I am?")), L_Where,
+ rif(!.@n, l("Who are you?")), L_Who,
+ rif(!.@n, l("I need a tutorial, where can I find help?")), L_Trainer,
+ rif(!getq(ShipQuests_ArpanMoney), lg("Do you know what happened to the gold I had when you guys saved me?")), L_WhereMoney,
+ l("Nothing, sorry."), -;
+
+ closedialog;
+ close;
+
+L_Trainer:
+ mes "";
+ mesn;
+ mesq l("There is a NPC called Trainer, just outside this ship.");
+ next;
+ mesn;
+ mesq l("Just use the arrow key--, err, I mean, just walk to the door on the right. The one which is not guarded by Peter.");
+ next;
+ mesn;
+ mesq lg("You must be dressed, and talk to our captain first. He'll give you a mission and unlock the ship main door.");
+ next;
+ mesn;
+ mesq l("All you need to do then is walk outside, enter on the biggest house, and talk to the Trainer. He'll teach you everything.");
+ next;
+ goto L_Menu;
+
+L_Where:
+ mes "";
+ mesn;
+ mesq lg("You're on our ship, we made port to a little island and we're actually yeyending our long merchant travelling adventure at the city of Tulimshar.");
+ next;
+ mesq l("We will be yaying there in a few days, so we will drop you off there.");
+ next;
+ mesq l("You will see, citizens are polite and you can still ask around for help. They can help find a job for you or maybe help you find out what happened to you out at sea!");
+ next;
+
+ goto L_Menu;
+
+L_Julia:
+ mes "";
+ mesn;
+ mesq lg("Just go right, yeye can't miss her. She's the only girl in this crew, oh well, except for you now yeyeye!", "Just go right, yeye can't miss her. She's the only girl in this crew.");
+ next;
+
+ mesn "Narrator";
+ mesc l("Use the arrow keys to walk right and meet Juliet.");
+ next;
+
+ goto L_Menu;
+
+L_Who:
+ mes "";
+ mesn;
+ mesq l("Sorry! I forgot to introduce myself. My name is Arpan, but other sailors call me Magic Arpan because I know one or two yaing magic tricks.");
+ next;
+ mesn;
+ mesq l("They're not magic, but yayaya, people like to say it is! Yeyeye.");
+ next;
+
+ goto L_Menu;
+
+L_WhereMoney:
+ mes "";
+ mesn;
+ mesq l("Oh right, I totally forgot about that, here you go.");
+ next;
+
+ if (BaseLevel < 4) goto L_Apana;
+ setq ShipQuests_ArpanMoney, 1;
+ Zeny = Zeny + 35;
+ message strcharinfo(0), l("You receive @@ GP!", 35);
+
+ goto L_BeforeMenu;
+
+L_Apana:
+ mesn;
+ mesq l("On hindsight, I'll wait you get a few levels. Can't have cheaters, ya know!");
+ next;
+ goto L_Menu;
+
+L_BeforeMenu:
+ mesn;
+ goto L_Menu;
+
+OnSlow:
+ npctalk3 l("@@, do you need help? Are you lost? Click me!", strcharinfo(0));
+ /*
+ setcamnpc;
+ showavatar NPC_MAGIC_ARPAN;
+ mesn;
+ mesq l("Yayaya, @@ is surely slow. Do you remember how to walk? You can use arrow keys for that!", strcharinfo(0));
+ next;
+ mesn;
+ mesc l("Here, come talk to me, the Magic Arpan! I'll help you get dressed."), 1;
+ */
+ addtimer(90000,"Magic Arpan::OnSlow");
+ close;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 6;
+ end;
+}
diff --git a/npc/002-1/billybons.txt b/npc/002-1/billybons.txt
new file mode 100644
index 0000000..89683ed
--- /dev/null
+++ b/npc/002-1/billybons.txt
@@ -0,0 +1,108 @@
+// TMW2 Script
+// Evol scripts.
+// Author:
+// Reid
+// Description:
+// Drunk easteregg telling about the player's past.
+// For TMW2 it is just to provide a bottle
+
+002-1,29,33,0 script Billy Bons#TMW2 NPC_BILLY_BONS,{
+ if (rand(5) == 2) goto L_Hic;
+ .@q = getq(ShipQuests_Bottle);
+ if (.@q == 1) goto L_Hic;
+
+ mesn;
+ mesq l("You? Here?");
+ mesq l("How is *hic* it possible?");
+ next;
+
+ mesn "Narrator";
+ mesc l("The sailor chugs his beer.");
+ next;
+
+ select
+ lg("Excuse me? Do you know who I am?");
+
+ mes "";
+ mesn;
+ mesq l("Don't do theee... *hic* with me eh!");
+ next;
+
+ menu
+ l("Are you ok?"), L_Quit,
+ l("Take the bottle?"), L_Give,
+ l("Alright... Bye."), -;
+
+ mes "";
+ mesn;
+ mesq lg("No and *hic*... No, you and you and your... *burp* stup*hic* guild!");
+ next;
+ mesq l("You tried to get rid of me, eeh? But surprise! I'm still here... *hic* Or there...");
+ next;
+ mesq l("But you won't *hic* me this time...");
+ next;
+
+ menu
+ l("What are you talking about? What guild?"), L_Quit,
+ l("You are full of wine, my friend..."), -,
+ l("You should go and get some sleep."), L_Quit;
+
+ mes "";
+ mesn;
+ mesq l("If I saw *hic* who you were... *hic* Would not have helped you! ");
+ next;
+
+ menu
+ l("But who am I?"), -,
+ l("What am I supposed to say?"), L_Quit,
+ l("You should go and get some sleep."), L_Secret;
+
+ mes "";
+ mesn;
+ mesq l("The giant boogeyman!");
+
+ close;
+
+L_Secret:
+ mes "";
+ mesn;
+ mesq l("Hear me *hic* well, what ever, whatididever you will *hic* said ab... uhm... out what?! You saw there, the Guild won't let it get public.");
+ next;
+ mesq l("Nobody can know! *burp*");
+ next;
+
+ close;
+
+L_Hic:
+ npctalk3 l("*Hic*");
+
+ close;
+
+L_Quit:
+ mes "";
+ mesn;
+ mesq l("Yeah you're all like *hic* that, but you won't get me! *burp*");
+ next;
+ mesq l("I'm not that numb eeh *hic* what did ever yous disco... ...vered there, the Guild won't get me!");
+ mesq l("*burp*");
+ next;
+
+ mesn "Narrator";
+ mesc l("The sailor turns his back to you.");
+
+ close;
+
+L_Give:
+ mes "";
+ inventoryplace EmptyBottle, 1;
+
+ setq ShipQuests_Bottle, 1;
+ getitem EmptyBottle, 1;
+
+ close;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 3;
+ end;
+}
diff --git a/npc/002-1/chefgado.txt b/npc/002-1/chefgado.txt
new file mode 100644
index 0000000..6eb08d9
--- /dev/null
+++ b/npc/002-1/chefgado.txt
@@ -0,0 +1,109 @@
+// TMW-2 scripts.
+// Original Authors: Hal9000 & Qwerty Dragon
+// TMW-2 Authors:
+// Ayruss
+// Jesusalva
+// Description:
+// La Johanne Chef.
+// The cook may need help with something.
+// Variable:
+// ShipQuests_ChefGado
+// ShipQuests_Knife
+// Translation
+// FR Translated
+
+002-1,27,28,0 script Chef Gado NPC_CHEF_GADO,{
+ .@q = getq(ShipQuests_Knife);
+ .@p = getq(ShipQuests_ChefGado);
+
+ // Player should have the rusty knife already
+ if (!.@q) goto L_Knife;
+
+ // Piou quest
+ if (.@q == 1 && .@p == 0) goto L_PiouLegs;
+ if (.@p == 1) goto L_Continue;
+ if (.@p == 2) goto L_Complete;
+
+ // An error happened!
+ close;
+
+L_Knife:
+ mesn;
+ mesq l("I hate the sea, the salty air always lets my knives rust. I already have a stockpile of rusty knives, don't even know what to do with them.");
+ if (TUTORIAL) mesc l("That indeed is true, you can see a pile of rusty knives on the nearby table.");
+ if (TUTORIAL) dnext;
+ tutmes l("Unlike talking, when trying to pick objects or read signs, you should be at an arms distance of them."), l("NOTE"), false;
+ tutmes l("This is often 1, 2 or 3 tiles. For talking, usually 4 or 5 tiles. Shouting can be done from 12 up to 18 tiles; But as shouting is rude, most NPCs won't react to it."), l("TUTORIAL"), false;
+ close;
+
+L_PiouLegs:
+ mesn;
+ mesq l("I'm trying to make good food for all the sailors here, could you help me?");
+ mes "";
+ menu
+ l("Yes."), L_Start,
+ l("Is there a reward?"), L_Ask,
+ l("No."), -;
+ close;
+
+
+L_Ask:
+ mes "";
+ mesn;
+ mesq l("I have a spare pair of gloves laying somewhere, you can have those if you finish the task.");
+ mes "";
+ menu
+ l("Sounds good."), L_Start,
+ l("No thanks."), -;
+ close;
+
+L_Start:
+ mes "";
+ mesn;
+ mesq l("Great, I need 11 @@. Only good food makes a good crew.",getitemlink("PiouLegs"));
+ setq ShipQuests_ChefGado, 1;
+ mes "";
+ menu
+ l("I'll get to work."), -;
+ close;
+
+
+L_Continue:
+ setq ShipQuests_ChefGado, 1;
+ mesn;
+ mesq l("Do you have the @@/11 @@ I requested? The sailors are starving because of you!",countitem("PiouLegs"),getitemlink("PiouLegs"));
+ mes "";
+ menu
+ rif(countitem("PiouLegs") >= 11, l("Yes, take them.")), L_Reward,
+ l("Not yet."), -;
+ close;
+
+
+L_Reward:
+ inventoryplace CreasedGloves, 1;
+ delitem PiouLegs, 11;
+ getitem CreasedGloves, 1;
+ setq ShipQuests_ChefGado,2;
+ Zeny = Zeny + 100;
+ getexp 25, 5;
+ mes "";
+ mesn;
+ mesq l("Thanks. Take this spare pair of gloves and some change.");
+ next;
+ mesq l("I'm sure the crew will like to be spared from having to eat @@ again!", getitemlink(Piberries));
+ close;
+ end;
+
+L_Complete:
+ .@r = rand2(3);
+ if (.@r == 0) npctalk3 l("What are you doing in my kitchen?! Get out, it's not a place for kids!");
+ if (.@r == 1) npctalk3 l("Where is the salt?! This is sugar! Proper sailors need salt, not sugar!");
+ if (.@r == 2) npctalk3 l("Are you going to stand here all day long? Go wash the dishes or go away.");
+ closedialog;
+ close;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 4;
+ end;
+}
diff --git a/npc/002-1/dan.txt b/npc/002-1/dan.txt
new file mode 100644
index 0000000..be0af19
--- /dev/null
+++ b/npc/002-1/dan.txt
@@ -0,0 +1,169 @@
+// TMW-2 Script
+// Authors:
+// Qwerty Dragon and Reid (originals)
+// Jesusalva
+// Description:
+// Dan is a sailor from Nard ship (TODO another Redy? Seriously?) who is afraid
+// of Pious.
+// Variables:
+// ShipQuests_Dan
+// Translation:
+// FR Translated
+
+002-1,32,31,0 script Dan#002-1 NPC_REDY_MAN,{
+ .@q=getq(ShipQuests_Dan);
+ if (.@q == 1) goto L_Report;
+ if (.@q == 2) goto L_Reward;
+ if (.@q >= 3) goto L_Finished;
+
+ mesn;
+ mesq l("You see these pious around us?");
+ next;
+ mesq l("They're scary, don't you think so?");
+ next;
+ menu
+ rif(getq(ShipQuests_Julia) < 3, l("Do you know where I can find Nard?")), L_Nard,
+ l("Yeah, they are."), -,
+ l("I am not afraid of Pious."), L_Quest;
+
+ mes "";
+ mesn;
+ mesq l("I knew someone would agree with me!");
+ close;
+
+L_Quest:
+ if (BaseLevel < 2) {
+ mesn;
+ mesq l("Well, you clearly never fought before, so remember to add stats.");
+ mesc l("That can be done pressing F2 and opening char screen.");
+ next;
+ }
+ mes "";
+ mesn;
+ mesq l("Then could you perhaps kill 12 @@ for me?!", getmonsterlink(Piou));
+ next;
+ menu
+ l("They're too strong for me!"), -,
+ l("Yes, of course. Without a sweat."), L_Continue;
+ mes "";
+ mesn;
+ mesq l("Oh, please. They're weaker than Maggots. They will only pose a threat if you're unarmed.");
+ close;
+
+L_Continue:
+ mes "";
+ mesn;
+ mesq l("I am counting on you!");
+ setq ShipQuests_Dan, 1, 0;
+ close;
+
+L_Report:
+ mesn;
+ mesq l("You've killed @@/12 @@. Get rid of them!", getq2(ShipQuests_Dan),getmonsterlink(Piou));
+ close;
+
+L_Reward:
+ mesn;
+ mesq l("Woohoo, thank you! Maybe now they'll leave me alone!");
+ next;
+ mesn;
+ mesq l("Here, take this pair of boots as a reward!");
+ inventoryplace CreasedBoots, 1;
+ getitem CreasedBoots, 1;
+ getexp 25, 5;
+ setq ShipQuests_Dan, 3, 0;
+ next;
+ mesn;
+ mesq l("Peter was also looking for strong people to help him to kill other monsters.");
+ if (BaseLevel < 8) {
+ next;
+ mesn;
+ mesq l("You still have a low level but I'm sure he will ask for your help once you grow up a little more.");
+ }
+ close;
+
+L_Finished:
+ mesn;
+ mesq l("It is no use... We are too close to a island, they will keep invading the ship...");
+ next;
+ mesn;
+ mes l("(shivering) \"Ah, how I am afraid of pious!\"");
+ close;
+
+L_Nard:
+ mesn;
+ mesq l("Oh? Just go east of here. Keep going ##Bright##b, go down the stairs, and you'll be at his office already.");
+ next;
+ mesn;
+ mesq l("And to leave this cramped ship, just go past his office! But beware...");
+ next;
+ mesn;
+ mesq l("There are Pious on the island as well! %%i");
+ close;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}
+
+// TODO this code below is bad and should be entirely rewritten
+002-1,0,0,0 script PiouSpwn NPC_HIDDEN,{
+ function DanCheck {
+ if (playerattached()) {
+ // Quest not in progress - nothing to do
+ if (getq(ShipQuests_Dan) != 1)
+ return;
+
+ // If you complete, finish it. Otherwise, sum it up.
+ .@t=getq2(ShipQuests_Dan);
+ if (.@t+1 >= 12)
+ setq ShipQuests_Dan, 2, 0;
+ else
+ setq2 ShipQuests_Dan, .@t+1;
+
+ // Report progress
+ dispbottom l("@@/@@", .@t+1, 12);
+ }
+ return;
+ }
+
+OnFakeKill:
+ DanCheck();
+ end;
+
+OnRespawnPiou1:
+ DanCheck();
+ sleep 39000;
+ areamonster(instance_mapname("002-1"), 52, 32, 73, 41, "Piou", Piou, 1, instance_npcname("PiouSpwn")+"::OnRespawnPiou1");
+ end;
+OnRespawnPiou2:
+ DanCheck();
+ sleep 41000;
+ areamonster(instance_mapname("002-1"), 52, 32, 73, 41, "Piou", Piou, 1, instance_npcname("PiouSpwn")+"::OnRespawnPiou2");
+ end;
+OnRespawnPiou3:
+ DanCheck();
+ sleep 39500;
+ areamonster(instance_mapname("002-1"), 52, 32, 73, 41, "Piou", Piou, 1, instance_npcname("PiouSpwn")+"::OnRespawnPiou3");
+ end;
+OnRespawnPiou4:
+ DanCheck();
+ sleep 41500;
+ areamonster(instance_mapname("002-1"), 52, 32, 73, 41, "Piou", Piou, 1, instance_npcname("PiouSpwn")+"::OnRespawnPiou4");
+ end;
+OnRespawnPiou5:
+ DanCheck();
+ sleep 40000;
+ areamonster(instance_mapname("002-3"), 31, 26, 40, 31, "Piou", Piou, 1, instance_npcname("PiouSpwn")+"::OnRespawnPiou5");
+ end;
+
+OnInstanceInit:
+ areamonster(instance_mapname("002-1"), 52, 32, 73, 41, "Piou", Piou, 1, instance_npcname("PiouSpwn")+"::OnRespawnPiou1");
+ areamonster(instance_mapname("002-1"), 52, 32, 73, 41, "Piou", Piou, 1, instance_npcname("PiouSpwn")+"::OnRespawnPiou2");
+ areamonster(instance_mapname("002-1"), 52, 32, 73, 41, "Piou", Piou, 1, instance_npcname("PiouSpwn")+"::OnRespawnPiou3");
+ areamonster(instance_mapname("002-1"), 52, 32, 73, 41, "Piou", Piou, 1, instance_npcname("PiouSpwn")+"::OnRespawnPiou4");
+ areamonster(instance_mapname("002-3"), 31, 26, 40, 31, "Piou", Piou, 1, instance_npcname("PiouSpwn")+"::OnRespawnPiou5");
+ end;
+
+}
diff --git a/npc/002-1/devis.txt b/npc/002-1/devis.txt
new file mode 100644
index 0000000..47fc9a9
--- /dev/null
+++ b/npc/002-1/devis.txt
@@ -0,0 +1,17 @@
+// Evol scripts.
+// Authors:
+// Alige
+// Reid
+// Vasily_Makarov
+// Description:
+// Sleeping and grumbling NPC.
+
+002-1,32,38,0 script Devis NPC_HAMMOC,{
+ asleep;
+ close;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 2;
+ end;
+}
diff --git a/npc/002-1/doors.txt b/npc/002-1/doors.txt
new file mode 100644
index 0000000..03a2c0e
--- /dev/null
+++ b/npc/002-1/doors.txt
@@ -0,0 +1,17 @@
+// TMW2 Scripts.
+// Author:
+// Jesusalva
+// Description:
+// Doors NPCs.
+
+002-1,72,30,0 script AreaNPC#002-1d NPC_HIDDEN,0,0,{
+
+OnTouch:
+ if (LOCATION$ == "")
+ warp "002-3", 42, 26;
+ else if (LOCATION$ == "Tulim" || LOCATION$ == "Candor" || LOCATION$ == "Artis")
+ warp "002-3@"+LOCATION$, 42, 26;
+ else
+ LOCATION$=any("Candor", "Tulim");
+ end;
+}
diff --git a/npc/002-1/hammock.txt b/npc/002-1/hammock.txt
new file mode 100644
index 0000000..97bea91
--- /dev/null
+++ b/npc/002-1/hammock.txt
@@ -0,0 +1,73 @@
+// TMW2 Script
+// Notes:
+// Hammocks 1~5 were deleted during 002-1 ship hold remapping
+// Evol scripts.
+// Author:
+// Reid
+// Description:
+// Animated hammock at the mid level of the ship.
+
+002-1,37,34,0 script #hammock6 NPC_RIGHT_HAMMOCK,1,0,{
+
+OnTouch:
+ hamTouchLeft;
+
+OnUnTouch:
+ hamUnTouch;
+
+OnTimer5440:
+ hamTimerLeft;
+}
+
+002-1,37,36,0 script #hammock7 NPC_RIGHT_HAMMOCK,1,0,{
+
+OnTouch:
+ hamTouchLeft;
+
+OnUnTouch:
+ hamUnTouch;
+
+OnTimer5440:
+ hamTimerLeft;
+}
+
+002-1,37,38,0 script #hammock8 NPC_RIGHT_HAMMOCK,1,0,{
+
+OnTouch:
+ hamTouchLeft;
+
+OnUnTouch:
+ hamUnTouch;
+
+OnTimer5440:
+ hamTimerLeft;
+}
+
+002-1,32,40,0 script #hammock9 NPC_LEFT_HAMMOCK,1,0,{
+
+OnTouch:
+ hamTouchLeft;
+
+OnUnTouch:
+ hamUnTouch;
+
+OnTimer5440:
+ hamTimerLeft;
+}
+
+002-1,37,40,0 script #hammock10 NPC_RIGHT_HAMMOCK,1,0,{
+
+OnTouch:
+ hamTouchLeft;
+
+OnUnTouch:
+ hamUnTouch;
+
+OnTimer5440:
+ hamTimerLeft;
+}
+
+002-1,58,25,0 duplicate(#hammock9) #hammock1 NPC_LEFT_HAMMOCK,1,0
+002-1,58,27,0 duplicate(#hammock9) #hammock2 NPC_LEFT_HAMMOCK,1,0
+002-1,58,29,0 duplicate(#hammock9) #hammock3 NPC_LEFT_HAMMOCK,1,0
+
diff --git a/npc/002-1/juliet.txt b/npc/002-1/juliet.txt
new file mode 100644
index 0000000..3ddc8dc
--- /dev/null
+++ b/npc/002-1/juliet.txt
@@ -0,0 +1,171 @@
+// TMW2 scripts.
+// Authors:
+// 4144
+// Qwerty Dragon
+// Vasily_Makarov
+// Jesusalva
+// Description:
+// Allows to change language and talks about what happened to him.
+// Modified by Jesusalva for TMW2. She is the nurse and also does other minor tasks.
+// Variables:
+// 0 ShipQuests_Julia
+// Values:
+// Julia:
+// 0 Default, haven't started the game yet.
+// 1 Need to see Julia.
+// 2 Has been registered by Julia.
+// 3 Has talked with Nard
+
+002-1,67,26,0 script Juliet NPC_JULIA,2,10,{
+
+
+ function sellFood {
+ closeclientdialog;
+ openshop;
+ close;
+ return;
+ }
+
+
+
+ function basicSkill {
+ mes "";
+ mesn;
+ mesq l("Let me check into it...");
+ next;
+ adddefaultskills;
+ mesq l("Here you go, everything is fixed.");
+ emotion E_HAPPY;
+ next;
+ return;
+ }
+
+ function chooseLang {
+ mes "";
+ mesn;
+ mesq l("Of course! But beware that %s are always in demand!", "[@@https://www.transifex.com/arctic-games/moubootaur-legends/|"+l("Translators")+"@@]");
+ next;
+ mesq l("Tell me which language you speak and I will change the note on the ship passenger list.");
+ next;
+
+ asklanguage(LANG_IN_SHIP);
+
+ mes "";
+ mesn;
+ mesq l("Ok, done.");
+ next;
+ return;
+ }
+
+ function whereAmI {
+ mes "";
+ mesn;
+ mesq l("You're on a ship, we're on our way to the oldest human city, Tulishmar.");
+ next;
+ mesq l("We should be there in a few days. For now, you can relax on the ship, or visit the island we're docked at! Its a small island, but a good place to get some exercise and stretch your legs.");
+ next;
+ return;
+ }
+
+ function whatHappened {
+ mes "";
+ mesn;
+ mesq l("We thought that you could help us understand this, all we know is that we found you cast in the sea, in a sand bank.");
+ next;
+ mesq lg("You were in bad shape, you should be happy we found you before the sea killed you.");
+ next;
+ return;
+ }
+
+ function readRules {
+ mes "";
+ mesn;
+ mesq l("Of course, they are on the left wall, go have a look at them.");
+ next;
+ return;
+ }
+
+ function mainMenu {
+ do
+ {
+ .@q4 = getq(General_Narrator);
+
+ select
+ l("I am hungry. Can I buy some food here?"),
+ rif(getskilllv(NV_BASIC) < 6, l("Something is wrong with me, I can't smile nor sit.")),
+ lg("I made a mistake, I would like to change my language."),
+ rif(!.@q4, l("Could you explain to me where I am?")),
+ rif(!.@q4, l("What happened to me?")),
+ l("Can I read these rules again?"),
+ l("Nothing, sorry.");
+
+ switch (@menu) {
+ case 1: sellFood; break;
+ case 2: basicSkill; break;
+ case 3: chooseLang .@s$; break;
+ case 4: whereAmI; break;
+ case 5: whatHappened; break;
+ case 6: readRules; break;
+ case 7: closedialog; end;
+ }
+ } while (1);
+ }
+
+ mesn;
+ mesq lg("Hello dear!");
+ next;
+ if (getq(ShipQuests_Julia) < 3)
+ mesq l("Have you already talked to our captain? He should be downstairs waiting for you!");
+ mesq l("What do you want today?");
+ next;
+
+ mainMenu;
+
+OnTouch:
+ .@q = getq(ShipQuests_Julia);
+ if (.@q > 1) end;
+
+ checkclientversion;
+
+ mesn;
+ mesq l("Hi, nice to see you!");
+ next;
+ mesq l("My name is Juliet, it is me who took care of you after we found you in the sea. I'm glad to see you're okay.");
+ next;
+ if (getq(ShipQuests_Julia) < 2) {
+ mesq l("I'm sure that you've got some questions for me, feel free to ask them, but first I need to tell you the rules all adventurers must respect on this world.");
+ next;
+
+ GameRules 8 | 4;
+
+ mesn;
+ mesq l("Oh, and I almost forgot! Do not share passwords or pincodes, not even with staff! And do not use the same password somewhere else, they can be stolen!");
+ next;
+ mesn;
+ mesq l("If you want to read this page again, there is a copy up on the wall.");
+ next;
+ mesn;
+ mesq l("Also, take this book so you don't forget the rules. You can always read it, or type ##B@rules##b on the chat.");
+ // No inventoryplace here.
+ getitem BookOfLaws, 1;
+ setq ShipQuests_Julia, 2;
+ next;
+ mesq l("I think I'm done with that now. You should now look for captain Nard downstairs. He'll be waiting for you.");
+ mesq l("Do you have any questions?");
+ next;
+ mesc b(l(".:: Main Quest 1-2 ::.")), 3;
+ msObjective(false, l("Talk to @@", l("Captain Nard")));
+ next;
+ }
+ mainMenu;
+ end;
+
+OnInit:
+ .sex = G_FEMALE;
+ .distance = 10;
+ sellitem Cheese;
+ sellitem Aquada;
+ sellitem Piberries;
+ sellitem Bread;
+ end;
+}
diff --git a/npc/002-1/knife.txt b/npc/002-1/knife.txt
new file mode 100644
index 0000000..de0e90b
--- /dev/null
+++ b/npc/002-1/knife.txt
@@ -0,0 +1,49 @@
+// Evol scripts.
+// Authors:
+// Ablu
+// Saulc
+// Qwerty Dragon
+// Description:
+// Knife on the table.
+// Variable:
+// ShipQuests_Knife
+// Values:
+// 0 Default, not taken.
+// 1 Knife taken.
+
+002-1,31,28,0 script #knife NPC_KNIVES,{
+ .@q = getq(ShipQuests_Knife);
+ if (.@q) end;
+
+ mesn l("Narrator");
+ mesc l("There are some old rusty knives on the table. Would you like to take one?");
+ next;
+
+ menu
+ l("Yeah!"), L_Give,
+ l("Nah."), -;
+
+ closedialog;
+ close;
+
+L_Give:
+ mes "";
+ inventoryplace RustyKnife, 1;
+
+ setq ShipQuests_Knife, 1;
+ getitem RustyKnife, 1;
+
+ // TODO: replace keys with variables since the player may have remapped them, possibly replace the messages below with tutorial messages?
+ mesn l("Narrator");
+ mesc l("To open your inventory, use the F3 key or use your mouse to select it in the above menu in your client.");
+ next;
+ mesc l("When your inventory is open, you can equip an item by selecting it and clicking 'Equip'. You can do the same to unequip an item by clicking on 'Unequip'.");
+ next;
+ mesc l("Items have different effects. Some will heal you, some can be used as weapons or armor, and some can be sold for gold.");
+
+ close;
+
+OnInit:
+ .distance = 2;
+ end;
+}
diff --git a/npc/002-1/mapflags.txt b/npc/002-1/mapflags.txt
new file mode 100644
index 0000000..c9d8f8d
--- /dev/null
+++ b/npc/002-1/mapflags.txt
@@ -0,0 +1 @@
+002-1 mapflag town
diff --git a/npc/002-1/peter.txt b/npc/002-1/peter.txt
new file mode 100644
index 0000000..a5058de
--- /dev/null
+++ b/npc/002-1/peter.txt
@@ -0,0 +1,307 @@
+// TMW2 script
+// Author:
+// Jesusalva
+// Original evol script authors: 4144, Ablu, Alastrim, Qwerty Dragon, Reid, Vasily_Makarov
+// Description:
+// Rat hunter.
+// Variable:
+// ShipQuests_Peter
+// Values:
+// 0 Doesn't know the quest.
+// & 1 Task given.
+// & 2 Task completed (easy level).
+// & 4 Task completed (medium level).
+// & 8 Task completed (hard level).
+// Setq2:
+// Number of killed Rattos:
+// & 1 - Ratto 1
+// & 2 - Ratto 2
+// & 4 - Ratto 3
+// & 8 - Ratto 4
+// = 15: All rattos killed
+// Setq3:
+// Instance ID (so we can destroy it later)
+//
+// Others:
+// @peter = Accepted Task ID
+// @pt_mob = ID of the monster you were tasked with killing
+
+// FIXME: ugly workaround, causes lots of bugs (specially instancing)
+002-1,35,24,0 script AreaNPC#Peter NPC_HIDDEN,0,1,{
+ end;
+OnTouch:
+ doevent "Peter::OnPeterMain";
+ close;
+}
+
+002-1,33,25,0 script Peter NPC_RATTO_SAILOR,{
+ goto L_Main;
+
+OnPeterMain:
+L_Main:
+ .@q = getq(ShipQuests_Peter);
+ .@q2 = getq2(ShipQuests_Peter);
+ .@q3 = getq3(ShipQuests_Peter);
+ if (BaseLevel < 8) goto OnTooWeak;
+
+ if (!.@q || !isinstance(.@q3) || .@q3 <= 0) goto L_Task;
+ if (instanceowner(.@q3) != getcharid(3)) goto L_Task;
+ if (.@q2 < 15) goto L_ReturnFail;
+ dispbottom l("I am broken?! Please report! Debug data: @@ (@@)", .@q, .@q2);
+ close;
+
+OnGiveTask:
+L_Task:
+ if (!.@q)
+ setq ShipQuests_Peter, 1, 0, 0;
+ mesn;
+ mesq lg("Hey, girl!", "Hey, man!");
+ next;
+ mesq l("I need somebody who can rid the hold of the ship of these creatures. Can you help me?");
+ next;
+
+ menu
+ l("Yeah, but what reward will I get?"), L_BonusTask,
+ l("No, they are way too dangerous for me!"), -;
+
+ mes "";
+ mesn;
+ mesq l("Hehe, hehe. Well, come back if you change your mind.");
+
+ close;
+
+OnLowTime:
+ if ((compare(getmap(), "002-2")) || (compare(getmap(), "nard")))
+ dispbottom l("Time is running out... Hurry up!");
+ end;
+
+OnTooWeak:
+ mesn;
+ mesq lg("I need someone to help me clean the edge of the ship, but you aren't strong enough for now.");
+ close;
+
+OnStop:
+ slide 35, 26;
+
+ mesn;
+ mesq l("You can't go there!");
+
+ close;
+
+OnReturnFail:
+L_ReturnFail:
+ .@q3 = getq3(ShipQuests_Peter);
+ //instance_destroy(.@q3);
+ setq2 ShipQuests_Peter, 0;
+ setq3 ShipQuests_Peter, 0;
+ deltimer("RattosControl::OnRatto1Respawn");
+ deltimer("RattosControl::OnRatto2Respawn");
+ deltimer("RattosControl::OnRatto3Respawn");
+ deltimer("RattosControl::OnRatto4Respawn");
+ mesn;
+ mesq l("I see it's not so easy to get rid of the monsters. Do you want to try again?");
+ next;
+
+ menu
+ l("Yeah, but I would like to make sure I get a reward."), L_BonusTask,
+ l("No, they are way too dangerous for me!"), -;
+
+ mes "";
+ mesn;
+ mesq l("Hehe, hehe. Well, come back if you change your mind.");
+
+ close;
+
+L_BonusTask:
+ mes "";
+ mesn;
+ mesq l("There are three kind of monsters which frequently attacks our fair vessel.");
+ mesc l("You need to kill all the %d monsters to complete a bounty.", 4);
+ next;
+ mesn;
+ .@q = getq(ShipQuests_Peter);
+ if (!(.@q & 2)) {
+ mes l("- I currently need your help with @@.", getmonsterlink(Squirrel)); // 750 HP, don't attack, 110 ms
+ mes l("I'll give you @@ GP for this job.", 350);
+ mes "";
+ }
+ if (!(.@q & 4)) {
+ mes l("- I currently need your help with @@.", getmonsterlink(Ratto)); // 500 HP, 80 DMG, 1572 dps, 120 ms
+ mes l("I'll give you @@ GP for this job.", 550);
+ mes "";
+ }
+ if (!(.@q & 8)) {
+ mes l("- I currently need your help with @@.", getmonsterlink(Croc)); // 1900 HP, 145 DMG, 1872 dps, 600 ms
+ mes l("I'll give you @@ GP for this job.", 1000);
+ mes "";
+ }
+ // TODO: This could be done a daily quest
+ if (.@q == 15) {
+ mes l("- I currently need your help with @@, but there's no reward.", getmonsterlink(Ratto));
+ }
+ next;
+
+ select
+ l("I'm not feeling like it today... Sorry."),
+ rif(!(.@q & 2), l("I will take the @@ Bounty.", "Squirrel")),
+ rif(!(.@q & 4), l("I will take the @@ Bounty.", "Ratto")),
+ rif(!(.@q & 8), l("I will take the @@ Bounty.", "Croc")),
+ rif(.@q == 15, l("Why not, I need to train anyway."));
+
+ if (@menu == 1)
+ close;
+
+ @peter=@menu;
+
+ goto L_Start;
+
+
+L_Start:
+ mes "";
+ mesc l("Some of them are pretty strong. Do you need an explanation about hit'n'run and the monster you're about to face?");
+ if (askyesno() == ASK_YES) {
+ mes "";
+ mesc l(".:: Hit'n'Run Tactic ::.");
+ mesc l("Sometimes, you just cannot afford to be hit. But even with a melee weapon, you don't need to be hit.");
+ next;
+ mesc l("The strategy is simple. When you hit the enemy, walk one or two tiles backwards.");
+ mesc l("If you miss, walk two or three tiles backwards. This way, you avoid being hit.");
+ next;
+ if (@peter == 2)
+ mesc l("Squirrels are healthy, but they never attack. They run away from you, so good luck catching it!");
+ else if (@peter == 4)
+ mesc l("Crocs are dangerous and very healthy, but very slow. Use that on your advantage.");
+ else
+ mesc l("Rattos are very fast. They walk fast and attack fast. I advise bringing some healing items!");
+ next;
+ } else {
+ mes "";
+ }
+
+// Init Instance
+OnStartOutside:
+ .@ID=getcharid(0);
+ @MAP_NAME$="nard@"+str(.@ID); // Max 4 chars for map name
+ .@INSTID = instance_create("002-2@a"+(.@ID), getcharid(3), IOT_CHAR);
+ if (.@INSTID < 0)
+ .@instanceMapName$ = "";
+ else
+ .@instanceMapName$ = instance_attachmap("002-2", .@INSTID, 0, @MAP_NAME$);
+
+ // Instance already exists, or something went wrong
+ if (.@instanceMapName$ == "") {
+ mesn;
+ mesq l("Actually, you just took a bounty, right?");
+ next;
+ mesn;
+ mesq l("Why don't you take a break? Breath in some fresh air. The basement is pretty damp.");
+ close;
+ }
+
+ setq2 ShipQuests_Peter, 0;
+ setq3 ShipQuests_Peter, .@INSTID;
+
+ // It'll be self-destroyed when time runs out (3 minutes)
+ instance_set_timeout(180, 180, .@INSTID);
+ instance_init(.@INSTID);
+
+ // Save in a less reliable way the challenge you took
+ if (@peter == 2) {
+ @peter=2;
+ @pt_mob=Squirrel;
+ } else if (@peter == 3) {
+ @peter=4;
+ @pt_mob=Ratto;
+ } else if (@peter == 4) {
+ @peter=8;
+ @pt_mob=Croc;
+ } else {
+ @peter=0;
+ @pt_mob=Ratto;
+ }
+
+ warp @MAP_NAME$, 33, 24;
+ addtimer(120000, "Peter::OnLowTime");
+ addtimer(140000, "Peter::OnTimeout");
+
+ // Spawn the Monsters
+ areamonster @MAP_NAME$, 23, 19, 57, 40, strmobinfo(1, @pt_mob), @pt_mob, 1, "RattosControl::OnRatto1Death";
+ areamonster @MAP_NAME$, 23, 19, 57, 40, strmobinfo(1, @pt_mob), @pt_mob, 1, "RattosControl::OnRatto2Death";
+ areamonster @MAP_NAME$, 23, 19, 57, 40, strmobinfo(1, @pt_mob), @pt_mob, 1, "RattosControl::OnRatto3Death";
+ areamonster @MAP_NAME$, 23, 19, 57, 40, strmobinfo(1, @pt_mob), @pt_mob, 1, "RattosControl::OnRatto4Death";
+
+ dispbottom l("Okay, you can start!");
+ closeclientdialog;
+ close;
+
+OnTimeout:
+ if (!(compare(getmap(), "002-2")) && !(compare(getmap(), "nard")))
+ end;
+ warp "002-1@"+LOCATION$, 35, 26;
+ .@q3 = getq3(ShipQuests_Peter);
+ //instance_destroy(.@q3);
+ setq2 ShipQuests_Peter, 0;
+ setq3 ShipQuests_Peter, 0;
+ deltimer("RattosControl::OnRatto1Respawn");
+ deltimer("RattosControl::OnRatto2Respawn");
+ deltimer("RattosControl::OnRatto3Respawn");
+ deltimer("RattosControl::OnRatto4Respawn");
+ mesn;
+ mesq l("Hey! Be careful. You can't stay in this basement for so long, you're going to get sick. Come outside and take a break, maybe you can try again later.");
+ close;
+
+OnDone:
+ .@q3 = getq3(ShipQuests_Peter);
+ //instance_destroy(.@q3);
+ setq ShipQuests_Peter, getq(ShipQuests_Peter)|@peter, 0, 0;
+
+ .@q = getq(ShipQuests_Peter);
+ if (@peter) {
+ mesn;
+ mesq l("Good job!") + " " + l("Here's your reward!");
+ getexp @peter*52, @peter;
+ switch (@peter) {
+ case 2: @peter=350; break;
+ case 4: @peter=550; break;
+ case 8: @peter=1000; break;
+ }
+
+ Zeny = Zeny + @peter;
+ message strcharinfo(0), l("You receive @@ GP!", @peter);
+ } else {
+ mesn;
+ mesq l("Good job!") + " " + l("Thanks for helping!");
+ getexp 0, (JobLevel > 6 ? (15+JobLevel) : 4);
+ PETER_REPEAT += 1;
+
+ // Every 3 repeats (10 minutes) gives you 50 GP
+ if (PETER_REPEAT % 3 == 0) {
+ Zeny += 50;
+ mesq l("It is not much, but here is %d GP. Should buy you a snack!", 50);
+ }
+
+ // Special bonus (but unlike Kreist, this one is decorative only)
+ // (Takes about 6 hours non-stop to obtain)
+ if (PETER_REPEAT == 100) {
+ mesq l("I'm moved to tears by your dedication to help us. Unrewarded, even. Here, have this rare %s. For free!", getitemlink(Cap));
+ getitem Cap, 1;
+ }
+ }
+ deltimer("Peter::OnLowTime");
+ deltimer("Peter::OnTimeout");
+ @peter=0;
+ if (!getq(ShipQuests_Dan)) {
+ next;
+ mesn;
+ mesq l("You're strong, maybe you could help Dan. He is a good sailor but he is too afraid from harmless Pious.");
+ next;
+ mesn;
+ mesq l("Look at that pathetic scene, he just put his chair over the desk... Chef Gado won't like it.");
+ }
+ close;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}