summaryrefslogtreecommitdiff
path: root/npc/001-2-22
diff options
context:
space:
mode:
Diffstat (limited to 'npc/001-2-22')
-rw-r--r--npc/001-2-22/_import.txt13
-rw-r--r--npc/001-2-22/_mobs.txt3
-rw-r--r--npc/001-2-22/_savepoints.txt67
-rw-r--r--npc/001-2-22/_warps.txt3
-rw-r--r--npc/001-2-22/alige.txt325
-rw-r--r--npc/001-2-22/chefgado.txt112
-rw-r--r--npc/001-2-22/chest.txt49
-rw-r--r--npc/001-2-22/hammock.txt137
-rw-r--r--npc/001-2-22/knife.txt47
-rw-r--r--npc/001-2-22/mapflags.txt1
-rw-r--r--npc/001-2-22/note.txt33
-rw-r--r--npc/001-2-22/peter.txt302
12 files changed, 1092 insertions, 0 deletions
diff --git a/npc/001-2-22/_import.txt b/npc/001-2-22/_import.txt
new file mode 100644
index 00000000..96490c74
--- /dev/null
+++ b/npc/001-2-22/_import.txt
@@ -0,0 +1,13 @@
+// Map 001-2-22: Second Deck
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/001-2-22/_mobs.txt",
+"npc/001-2-22/_savepoints.txt",
+"npc/001-2-22/_warps.txt",
+"npc/001-2-22/alige.txt",
+"npc/001-2-22/chefgado.txt",
+"npc/001-2-22/chest.txt",
+"npc/001-2-22/hammock.txt",
+"npc/001-2-22/knife.txt",
+"npc/001-2-22/mapflags.txt",
+"npc/001-2-22/note.txt",
+"npc/001-2-22/peter.txt",
diff --git a/npc/001-2-22/_mobs.txt b/npc/001-2-22/_mobs.txt
new file mode 100644
index 00000000..a2164e45
--- /dev/null
+++ b/npc/001-2-22/_mobs.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 001-2-22: Second Deck mobs
+001-2-22,52,32,21,9 monster Piou 1002,3,30000,20000
diff --git a/npc/001-2-22/_savepoints.txt b/npc/001-2-22/_savepoints.txt
new file mode 100644
index 00000000..b4a5c1ba
--- /dev/null
+++ b/npc/001-2-22/_savepoints.txt
@@ -0,0 +1,67 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 001-2-22: Second Deck saves
+001-2-22,40,37,0 script #save_001-2-22_40_37 NPC_SAVE_POINT,0,0,{
+ savepointparticle .map$, .x, .y, NO_INN;
+ close;
+
+OnInit:
+ .distance = 2;
+ .sex = G_OTHER;
+ end;
+
+OnTouch:
+ bedTouch();
+ end;
+}
+001-2-22,46,37,0 script #save_001-2-22_46_37 NPC_SAVE_POINT,0,0,{
+ savepointparticle .map$, .x, .y, NO_INN;
+ close;
+
+OnInit:
+ .distance = 2;
+ .sex = G_OTHER;
+ end;
+
+OnTouch:
+ bedTouch();
+ end;
+}
+001-2-22,55,40,0 script #save_001-2-22_55_40 NPC_SAVE_POINT,0,0,{
+ savepointparticle .map$, .x, .y, NO_INN;
+ close;
+
+OnInit:
+ .distance = 2;
+ .sex = G_OTHER;
+ end;
+
+OnTouch:
+ bedTouch();
+ end;
+}
+001-2-22,50,38,0 script #save_001-2-22_50_38 NPC_SAVE_POINT,0,0,{
+ savepointparticle .map$, .x, .y, NO_INN;
+ close;
+
+OnInit:
+ .distance = 2;
+ .sex = G_OTHER;
+ end;
+
+OnTouch:
+ bedTouch();
+ end;
+}
+001-2-22,53,38,0 script #save_001-2-22_53_38 NPC_SAVE_POINT,0,0,{
+ savepointparticle .map$, .x, .y, NO_INN;
+ close;
+
+OnInit:
+ .distance = 2;
+ .sex = G_OTHER;
+ end;
+
+OnTouch:
+ bedTouch();
+ end;
+}
diff --git a/npc/001-2-22/_warps.txt b/npc/001-2-22/_warps.txt
new file mode 100644
index 00000000..8fcdb2c3
--- /dev/null
+++ b/npc/001-2-22/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 001-2-22: Second Deck warps
+001-2-22,72,30,0 warp #001-2-22_72_30 0,0,001-2-21,31,26
diff --git a/npc/001-2-22/alige.txt b/npc/001-2-22/alige.txt
new file mode 100644
index 00000000..4f4fab9d
--- /dev/null
+++ b/npc/001-2-22/alige.txt
@@ -0,0 +1,325 @@
+// Evol scripts.
+// Authors:
+// Ablu
+// Alige
+// Qwerty Dragon
+// Reid
+// Vasily_Makarov
+// Description:
+// 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.
+
+001-2-22,43,32,0 script AligeTrigger#Artis NPC_HIDDEN,1,1,{
+
+OnTouch:
+ if (getareausers() <= 1)
+ {
+ setnpcdir "Alige#Artis", 2;
+ stopnpctimer;
+ initnpctimer;
+ }
+
+ if (getq(ShipQuests_Alige) > 0) close;
+ doevent "Alige#Artis::OnFirstEncounter";
+
+ close;
+
+OnUnTouch:
+ if (getareausers() == 0)
+ {
+ setnpcdir "Alige#Artis", 4;
+ stopnpctimer;
+ initnpctimer;
+ }
+ close;
+
+OnTimer190:
+ stopnpctimer;
+
+ if (getnpcdir("Alige#Artis") == 2) setnpcdir "Alige#Artis", 6;
+ if (getnpcdir("Alige#Artis") == 4) setnpcdir "Alige#Artis", 8;
+
+ end;
+}
+
+001-2-22,43,31,0 script Alige#Artis 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?");
+ next;
+ restorecam;
+
+ menu
+ l("I am, who are you?"), -,
+ l("Indeed, I am not."), L_NeedHelp;
+
+ mes "";
+ mesn "Narrator";
+ mesc(l("The stowaway doesn't answer."), 9);
+
+ close;
+
+L_NeedHelp:
+ setcamnpc;
+ 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."), -;
+
+ closeclientdialog;
+ close;
+
+L_CanHelp:
+ setcamnpc;
+ 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!");
+ 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!");
+ next;
+ restorecam;
+
+ menu
+ l("Sure, but what will you give me in exchange?"), L_AboutReward,
+ l("Why don't you come out?"), -;
+
+L_ExplainHiding:
+ setcamnpc;
+ 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.");
+ 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!");
+ 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!");
+ 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.");
+ next;
+ restorecam;
+
+L_Accept:
+ menu
+ l("Understood, I will help you."), L_FirstAccepted,
+ l("We arrived in Artis today."), L_Artis,
+ l("I think I should report you to the crew members."), -;
+
+ setcamnpc;
+ mesq l("Growl, sniff, grr! You'd better not tell anyone you saw me!");
+
+ close;
+
+L_Artis:
+ setcamnpc;
+ mes "";
+ mesn;
+ mesq l("Of course, so why do I still see open sea from the porthole?");
+ next;
+ mesq l("I wonder who is in delarium now...");
+ next;
+ mesq l("But hey, back to me. Remember my mentioning that I'm hun...grrr...eee!");
+ 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;
+
+L_Accepted:
+ setcamnpc;
+ mes "";
+ mesn;
+ mesq l("Great, what food do you have for me today?");
+ next;
+ restorecam;
+
+L_GiveFood:
+ mes "";
+
+ mes "##B" + l("Drag and drop an item from your inventory.") + "##b";
+ .@id = requestitem();
+ if (.@id <= 0) goto L_Quit; // Quit message.
+ if (countitem(.@id) == 0) goto L_Quit; // If don't have the food
+
+ if (array_find(.vegetables, .@id) >= 0) goto L_NoReward; // In case of wrong food.
+ if (array_find(.poisonable, .@id) >= 0) goto L_Poison; // In case of poisoned food (or food with effects).
+ if (.@id == Piberries) goto L_NoMore; // In case of Piberries.
+ if (.@id == RedPlushWine) goto L_Drunk; // In case of Alcohol.
+
+ // Default message for non food
+ if (array_find(.commonfood, .@id) == -1) goto L_NoFood;
+
+ inventoryplace Piberries, 3;
+ delitem .@id, 1;
+
+ setcamnpc;
+ mes "";
+ 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;
+
+L_NoReward:
+ setcamnpc;
+ mes "";
+ mesn;
+ mesq l("You don't expect me to eat that, do you? Give me something else!");
+ 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_NoFood:
+ setcamnpc;
+ // We must first determine if it is at least edible (IT_HEALING)
+ if (getiteminfo(.@id, ITEMINFO_TYPE) == IT_HEALING)
+ {
+ speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("That looks too exotic for me to eat!");
+ }
+ else
+ {
+ speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("That doesn't looks edible to me!");
+ }
+ restorecam;
+
+ goto L_GiveFood;
+
+L_ReturnMenu:
+ setcamnpc;
+ mesq l("Do you have anything else for me?");
+ next;
+ restorecam;
+
+ goto L_GiveFood;
+
+L_NoMore:
+ setcamnpc;
+ mes "";
+ mesn;
+ mesq l("Grr, don't give me more berries! I don't want them, stupid berries, stupid... Stupid... Stupid!");
+ next;
+
+ goto L_ReturnMenu;
+
+L_Poison:
+ setcamnpc;
+ mes "";
+ mesn;
+ mesq l("Don't try to poison me! I know what that does!");
+ next;
+ restorecam;
+ goto L_ReturnMenu;
+
+L_SoAskForFood:
+ setcamnpc;
+ mesn;
+ mesq l("So, do you have anything for me today?");
+ next;
+ restorecam;
+ goto L_IntroMenu;
+
+L_AskForFood:
+ setcamnpc;
+ mesn;
+ mesq l("Do you have anything for me today?");
+ next;
+ restorecam;
+
+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("We arrived in Artis today."), L_Artis,
+ l("I think I should report you to the crew members."), -;
+
+ setcamnpc;
+ mesq l("Growl, sniff, grr! You'd better not tell anyone you saw me!");
+
+ close;
+
+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";
+ mesc(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;
+ mesc(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);
+
+ close;
+
+L_Quit:
+ setcamnpc;
+ mes "";
+ mesn;
+ mesq l("Too bad... Come back when you'll have some nice food for me. Growl... grumble... grumble.");
+
+ close;
+
+OnInit:
+ .distance = 2;
+
+ // Array of foods (remember to update in 000-2-1 as well)
+ setarray .commonfood, Bread, Fungus, Cheese, PiouLegs, Aquada, HalfCroconut, Plushroom, PumpkinJuice, Manana, Curshroom, Carrot, CarpSandwich, PioulegSandwich;
+ setarray .vegetables, Acorn, LettuceLeaf, Croconut, MananaSandwich;
+ setarray .poisonable, SeaDrops, PinkBlobime, PumpkinSeeds, UrchinMeat, EasterEgg;
+ end;
+}
diff --git a/npc/001-2-22/chefgado.txt b/npc/001-2-22/chefgado.txt
new file mode 100644
index 00000000..ae95d408
--- /dev/null
+++ b/npc/001-2-22/chefgado.txt
@@ -0,0 +1,112 @@
+// Evol scripts.
+// Authors:
+// Hal9000
+// Qwerty Dragon
+// Reid
+// Description:
+// La Johanne Chef.
+
+001-2-22,27,28,0 script Chef Gado#Artis NPC_CHEF_GADO,{
+ function foodQuest;
+
+ .@r = rand(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 damn salt?! Give me the salt, I know you have it!");
+ if (.@r == 2) npctalk3 l("Are you going to stand here all day long? Do the dishes or go away.");
+
+ if (getq(General_SmearedHands) < 3)
+ foodQuest();
+ close;
+
+function foodQuest {
+ .@q=getq(General_SmearedHands);
+ mesc l("%s seems busy as usual.", l("Chef Gado"));
+ select
+ l("I'll get moving, sorry!"),
+ //rif(.@r == 1 && countitem(Salt), l("Offer him the salt")),
+ l("Can you teach me cooking?");
+ mes "";
+ if (@menu == 1)
+ return;
+ // FOOD QUEST: BEGIN
+ .@ally=(getq(ShipQuests_ChefGado) == 4); // TRUE if you helped Gado
+ mesn;
+ mesq (.@ally ? l("I suppose I could. You helped me, after all.") : l("Why should I help you, traitor?"));
+ next;
+ // Empty Bowl needed
+ if (!countitem(EmptyBowl)) {
+ mesn;
+ mesq l("Anyway: First, you'll need an %s. %s", getitemlink(EmptyBowl),
+ (.@ally ? l("Cannot get one here in Artis, though. Well, if you travel far enough...") : l("Stop wasting my time!")));
+ return;
+ }
+ // Recipe Book needed
+ if (!countitem(RecipeBook)) {
+ mesn;
+ mesq l("Anyway: First, you'll need a %s. You cannot cook without that. So go find one!", getitemlink(RecipeBook));
+ next;
+ mesn;
+ mesq l("These books are annoyingly expensive, but maybe you have luck elsewhere. I'm sure some housewife could give you one for helping her husband...");
+ next;
+ mesn;
+ mesq l("That's how I got mine, anyway.");
+ next;
+ mesn;
+ mesq l("Some nice lady called Ya... Micksha? No, it was not Yamicksha... For the life of me, I can't remember...");
+ // FIXME: I'm ignoring that unpractical plot in favor of clarity
+ return;
+ }
+
+ // Quest Loop
+ if (.@q == 0) {
+ mesn;
+ mesq l("You got a bowl, I see. You won't be finding another one, so be careful with that.");
+ next;
+ // Will only learn Sailor Stew Recipe if helped Gado instead Julia
+ if (.@ally) {
+ mesn;
+ mesq l("Now, watch and learn: The Sailor Stew Recipe!");
+ mesc l("Learned %s recipe!", getitemlink(SailorStew)), 2;
+ RECIPES[CraftSailorStew]=true;
+ next;
+ } else if (!RECIPES[CraftSailorStew]) {
+ // They requested for a neutral approach because Julia
+ mesn;
+ mesq l("I will teach you %s... But for you, it will be %s E.",
+ getitemlink(SailorStew), format_number(5000));
+ if (Zeny < 5000)
+ return;
+ next;
+ mesc l("Pay Chef Gado the gold?");
+ if (askyesno() == ASK_NO || Zeny < 5000)
+ return;
+ mesn;
+ mesq l("Now, watch and learn: The Sailor Stew Recipe!");
+ mesc l("Learned %s recipe!", getitemlink(SailorStew)), 2;
+ RECIPES[CraftSailorStew]=true;
+ Zeny-=5000;
+ next;
+ }
+ setq General_SmearedHands, 1;
+ .@q = 1;
+ mesn;
+ mesq l("Anyway, for the recipe, just add a few carps, carrots, manana, and roasted acorn in this order.");
+ next;
+ }
+ if (.@q == 1 || .@q == 2) {
+ mesn;
+ mesq l("Now, your next task is: I've heard rumors... About some delicious food, like %s...", getitemlink(any(BarbecuePlate, VeggiePlate)));
+ next;
+ mesn;
+ mesq l("They're related to Mouboos, but Artis cuisine is the worst. Go find the recipes!!");
+ next;
+ }
+ mesn;
+ mesq l("Get moving!");
+ return;
+}
+
+OnInit:
+ .distance = 4;
+ end;
+}
diff --git a/npc/001-2-22/chest.txt b/npc/001-2-22/chest.txt
new file mode 100644
index 00000000..69e8a8af
--- /dev/null
+++ b/npc/001-2-22/chest.txt
@@ -0,0 +1,49 @@
+// Evol scripts.
+// Authors:
+// 4144
+// gumi
+// Reid
+// Description:
+// A box with clothes for new players.
+
+001-2-22,51,37,0 script Chest#Artis NPC_CHEST_BIG,2,4,{
+
+ if (.busy == false)
+ {
+ specialeffect(.dir == 0 ? 24 : 25, AREA, getnpcid()); // closed ? opening : closing
+ .dir = .dir == 0 ? 2 : 6; // closed ? opening : closing
+ .busy = true; // lock until available again
+ initnpctimer;
+ }
+ end;
+
+OnTimer220:
+ .dir = .dir == 6 ? 0 : 4; // closing ? closed : open
+ end;
+
+OnTimer500:
+ .busy = false; // unlock
+
+ if (.dir == 0)
+ {
+ stopnpctimer; // stop here if the chest is closed
+ }
+ end;
+
+OnUnTouch:
+ if (getareausers(.x - 2, .y - 4, .x + 2, .y + 6) > 0 || .dir == 0)
+ {
+ end;
+ }
+OnTimer30000:
+ .busy = true;
+ .dir = 6; // closing
+ specialeffect(25, AREA, getnpcid()); // closing
+ setnpctimer 0;
+OnTouch:
+ end;
+
+OnInit:
+ .distance = 2;
+ end;
+}
diff --git a/npc/001-2-22/hammock.txt b/npc/001-2-22/hammock.txt
new file mode 100644
index 00000000..f6f70044
--- /dev/null
+++ b/npc/001-2-22/hammock.txt
@@ -0,0 +1,137 @@
+// Evol scripts.
+// Author:
+// Reid
+// Description:
+// Animated hammock at the mid level of the ship.
+
+001-2-22,32,27,0 script #hammockArtis1 NPC_LEFT_HAMMOCK,1,0,{
+
+OnTouch:
+ hamTouchLeft;
+
+OnUnTouch:
+ hamUnTouch;
+
+OnTimer5440:
+ hamTimerLeft;
+}
+
+001-2-22,32,25,0 script #hammockArtis2 NPC_LEFT_HAMMOCK,1,0,{
+
+OnTouch:
+ hamTouchLeft;
+
+OnUnTouch:
+ hamUnTouch;
+
+OnTimer5440:
+ hamTimerLeft;
+}
+
+001-2-22,37,25,0 script #hammockArtis3 NPC_RIGHT_HAMMOCK,1,0,{
+
+OnTouch:
+ hamTouchLeft;
+
+OnUnTouch:
+ hamUnTouch;
+
+OnTimer5440:
+ hamTimerLeft;
+}
+
+001-2-22,37,27,0 script #hammockArtis4 NPC_RIGHT_HAMMOCK,1,0,{
+
+OnTouch:
+ hamTouchLeft;
+
+OnUnTouch:
+ hamUnTouch;
+
+OnTimer5440:
+ hamTimerLeft;
+}
+
+001-2-22,37,29,0 script #hammockArtis5 NPC_RIGHT_HAMMOCK,1,0,{
+
+OnTouch:
+ hamTouchLeft;
+
+OnUnTouch:
+ hamUnTouch;
+
+OnTimer5440:
+ hamTimerLeft;
+}
+
+001-2-22,37,34,0 script #hammockArtis6 NPC_RIGHT_HAMMOCK,1,0,{
+
+OnTouch:
+ hamTouchLeft;
+
+OnUnTouch:
+ hamUnTouch;
+
+OnTimer5440:
+ hamTimerLeft;
+}
+
+001-2-22,37,36,0 script #hammockArtis7 NPC_RIGHT_HAMMOCK,1,0,{
+
+OnTouch:
+ hamTouchLeft;
+
+OnUnTouch:
+ hamUnTouch;
+
+OnTimer5440:
+ hamTimerLeft;
+}
+
+001-2-22,37,38,0 script #hammockArtis8 NPC_RIGHT_HAMMOCK,1,0,{
+
+OnTouch:
+ hamTouchLeft;
+
+OnUnTouch:
+ hamUnTouch;
+
+OnTimer5440:
+ hamTimerLeft;
+}
+
+001-2-22,37,40,0 script #hammockArtis9 NPC_RIGHT_HAMMOCK,1,0,{
+
+OnTouch:
+ hamTouchLeft;
+
+OnUnTouch:
+ hamUnTouch;
+
+OnTimer5440:
+ hamTimerLeft;
+}
+
+001-2-22,32,38,0 script #hammockArtis10 NPC_LEFT_HAMMOCK,1,0,{
+
+OnTouch:
+ hamTouchLeft;
+
+OnUnTouch:
+ hamUnTouch;
+
+OnTimer5440:
+ hamTimerLeft;
+}
+
+001-2-22,32,40,0 script #hammockArtis11 NPC_LEFT_HAMMOCK,1,0,{
+
+OnTouch:
+ hamTouchLeft;
+
+OnUnTouch:
+ hamUnTouch;
+
+OnTimer5440:
+ hamTimerLeft;
+}
diff --git a/npc/001-2-22/knife.txt b/npc/001-2-22/knife.txt
new file mode 100644
index 00000000..25d03b88
--- /dev/null
+++ b/npc/001-2-22/knife.txt
@@ -0,0 +1,47 @@
+// Evol scripts.
+// Authors:
+// Ablu
+// Qwerty Dragon
+// Description:
+// Knife on the table.
+// Variable:
+// ShipQuests_Knife
+// Values:
+// 0 Default, not taken.
+// 1 Knife taken.
+
+000-2-1,50,24,0 script #Artisknife NPC_KNIVES,{
+ .@q = getq(ShipQuests_Knife);
+ if (.@q) close;
+
+ mesn "Narrator";
+ mesc(l("There are some knives on the table. Would you like to take one?"), 9);
+ next;
+
+ menu
+ l("Yes."), L_Give,
+ l("No."), -;
+
+ closeclientdialog;
+ close;
+
+L_Give:
+ mes "";
+ inventoryplace Knife, 1;
+
+ setq ShipQuests_Knife, 1;
+ getitem Knife, 1;
+
+ mesn "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."), 9);
+ 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'."), 9);
+ 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."), 9);
+
+ close;
+
+OnInit:
+ .distance = 2;
+ end;
+}
diff --git a/npc/001-2-22/mapflags.txt b/npc/001-2-22/mapflags.txt
new file mode 100644
index 00000000..fdb4e3e2
--- /dev/null
+++ b/npc/001-2-22/mapflags.txt
@@ -0,0 +1 @@
+001-2-22 mapflag town
diff --git a/npc/001-2-22/note.txt b/npc/001-2-22/note.txt
new file mode 100644
index 00000000..8d39cd28
--- /dev/null
+++ b/npc/001-2-22/note.txt
@@ -0,0 +1,33 @@
+// Evol scripts.
+// Author:
+// Vasily_Makarov
+// Description:
+//
+
+001-2-22,31,31,0 script Note#001-2-22 NPC_DAN_NOTE,{
+ mesn;
+ mesq l("This note was left by somebody.");
+ next;
+ mesq l("What do you want to do with it?");
+
+ menu
+ l("Read it."), L_Content,
+ l("Leave it."), -;
+ close;
+
+L_Content:
+ mesn;
+ mes "\"" + l("Dear sister,");
+ mes l("In a couple of days, we will finally reach Artis.");
+ next;
+
+ mes l("I will send you this letter as soon as I arrive.");
+ mes l("Don't worry sister, I didn't forget you.");
+ next;
+
+ mes l("I would like to come back home when the days are better.");
+ mes l("And when we have enough money for ourselves without needing anybody else.");
+
+ mes l("Sincerely yours, Dan.") + "\"";
+ close;
+}
diff --git a/npc/001-2-22/peter.txt b/npc/001-2-22/peter.txt
new file mode 100644
index 00000000..dce6982d
--- /dev/null
+++ b/npc/001-2-22/peter.txt
@@ -0,0 +1,302 @@
+// Evol scripts.
+// Authors:
+// 4144
+// Ablu
+// Alastrim
+// Jesusalva
+// Qwerty Dragon
+// Reid
+// Vasily_Makarov
+// Description:
+// Rat hunter.
+// 4+2 bits array:
+// ShipQuests
+// Variable:
+// ShipQuests_Peter
+// Values is a bitmask:
+// 0 Doesn't know the quest.
+// 1 Task given. (To prevent bugs because zero is a valid instance id)
+// 2 Already completed the first stage
+// 4 Already completed the second stage
+// 8 Already completed the third stage
+// ...
+// =15 Completed every stage.
+// Setq2:
+// Number of killed Rattos:
+// & 1 - Ratto 1
+// & 2 - Ratto 2
+// & 4 - Ratto 3
+// & 8 - Ratto 4
+// = 15: All rattos killed
+// (Adding more monsters etc. is possible, but be careful with the == 15 checks)
+// Setq3:
+// Instance ID (so we can destroy it later if needed, and check it too)
+// Others:
+// .@q = Peter variable.
+// PETER_TIME = gettimetick(2) for daily
+// @peter = Control Variable
+// @pt_mob = Control Variable
+// @MAP_NAME$ = Control Variable
+// "001-2-23" - map with mobs.
+
+001-2-22,72,34,0 script AreaNPC#Artis NPC_HIDDEN,0,1,{
+ end;
+OnTouch:
+ doevent "Peter::OnPeterMain";
+ close;
+}
+
+001-2-22,70,35,0 script Peter#Artis NPC_RATTO_SAILOR,{
+ goto L_Main;
+
+OnPeterMain:
+L_Main:
+ .@q = getq(ShipQuests_Peter);
+ .@q2 = getq2(ShipQuests_Peter);
+ .@q3 = getq3(ShipQuests_Peter);
+ if (BaseLevel < 5) goto OnTooWeak;
+
+ if (!.@q || !isinstance(.@q3) || .@q3 <= 0) 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, -1;
+ mesn;
+ mesq l("Hey there!");
+ next;
+ mesq l("I need somebody who can rid the hold of the ship of these rattos. Can you help me?");
+ next;
+
+ menu
+ l("Yeah, but what reward will I get?"), L_BonusTask,
+ l("Why not, I need to train anyway."), 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;
+
+// Friendly reminder that you have about 20 secs to finish
+OnLowTime:
+ if ((getmap() ~= "001-2-22") || (getmap() ~= "nard*"))
+ dispbottom l("I'm starting to feel dizzy... I shouldn't stay here much longer.");
+ end;
+
+// Minimum Quest Level (any difficulty setting) is on L_Main (and currently is 5)
+OnTooWeak:
+ mesn;
+ mesq l("I need someone to help me clean the edge of the ship, but you aren't strong enough for now.");
+
+ close;
+
+/*
+OnStop:
+ slide 72, 36;
+
+ mesn;
+ mesq l("You can't go there!");
+
+ close;
+*/
+
+// This is cast if player dies in Basement, but not automatically (bad design?)
+// instance_destroy() is being recklessy called here, some sanity check is good.
+OnReturnFail:
+L_ReturnFail:
+ .@q3 = getq3(ShipQuests_Peter);
+ //instance_destroy(.@q3); // This would allow players to try again at once, but is DANGEROUS!
+ setq2 ShipQuests_Peter, 0;
+ setq3 ShipQuests_Peter, -1;
+ mesn;
+ mesq l("I see it's not so easy to get rid of these rattos. Do you want to try again?");
+ next;
+
+ menu
+ l("Yeah, but I would like to make sure I get a reward."), L_BonusTask,
+ l("Why not, I need to train anyway."), 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 or seldomly attacks our fair vessel.");
+ next;
+ mesn;
+ .@q = getq(ShipQuests_Peter);
+ if (!(.@q & 2)) {
+ mes l("- I currently need your help with @@.", getmonsterlink(Tortuga));
+ mes l("I'll give you @@ GP for this job.", 500);
+ mes "";
+ }
+ if (!(.@q & 4)) {
+ mes l("- I currently need your help with @@.", getmonsterlink(Ratto));
+ mes l("I'll give you @@ GP for this job.", 1000);
+ mes "";
+ }
+ if (!(.@q & 8)) {
+ mes l("- I currently need your help with @@.", getmonsterlink(Croc));
+ mes l("I'll give you @@ GP for this job.", 1500);
+ mes "";
+ }
+ // If you already took all three bounties, you can only repeat the quest daily
+ if (.@q == 15 && PETER_TIME <= gettimetick(2)) {
+ mes l("- I currently need your help with @@.", getmonsterlink(Ratto));
+ mes l("I'll give you @@ GP for this job.", 750);
+ } else if (.@q == 15) {
+ mes l("I don't need your help right now, but maybe tomorrow, who knows?");
+ close;
+ }
+ next;
+
+ select
+ l("I'm not feeling like it today... Sorry."),
+ rif(!(.@q & 2), l("I will take the @@ Bounty.", "Tortuga")),
+ 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;
+
+// In Moubootaur Legends, there's a small tutorial about Hit'n'run here
+// I didn't add it here but that can be arranged
+L_Start:
+// Init Instance
+OnStartOutside:
+ .@ID=getcharid(0);
+ @MAP_NAME$="nard@"+str(.@ID); // Max 4 chars for map name
+ .@INSTID = instance_create("ratto@a"+(.@ID), getcharid(3), IOT_CHAR);
+ .@instanceMapName$ = instance_attachmap("001-2-23", .@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=Tortuga;
+ } 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$, 48, 28;
+ // Control how much time you have left
+ addtimer(120000, "Peter#Artis::OnLowTime");
+ addtimer(140000, "Peter#Artis::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;
+
+// TODO: This is very reckless, instance_destroy() could possibly affect others
+// If you agree with me, we can force player to wait until instance expire on its
+// own (3 minutes after start) instead of allowing immediate retry. That's safer,
+// and code will end up looking like Mundane (exploiting attach_map failures)
+
+// (Or if you are set in disregarding this, just uncomment instance_destroy.)
+// (Don't blame me if server SIGSEGV's because that, though)
+OnTimeout:
+ if (!(getmap() ~= "001-2-23") && !(getmap() ~= "nard*"))
+ end;
+ warp "001-2-22", 72, 36;
+ .@q3 = getq3(ShipQuests_Peter);
+ //instance_destroy(.@q3);
+ setq2 ShipQuests_Peter, 0;
+ setq3 ShipQuests_Peter, -1;
+ 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;
+
+// This is called by npc/001-2-23/ratto.txt and completes the quest
+// Just like OnReturnFail and OnTimeout, this recklessy destroys the instance
+// It's not _buggy_, it is just reckless. I would like a setting to restrict it
+// to destroy only instances owned by the char, or to destroy by name :p
+OnDone:
+ warp "001-2-22", 72, 36;
+ .@q3 = getq3(ShipQuests_Peter);
+ //instance_destroy(.@q3);
+ if (@peter)
+ setq ShipQuests_Peter, getq(ShipQuests_Peter)|@peter, 0, -1;
+
+ .@q = getq(ShipQuests_Peter);
+ mesn;
+ mesq l("Good job!") + " " + l("Here's your reward!");
+
+
+ // Before handling the rewards, we should be sure we'll handle daily loop.
+ // You're already in daily phase if @peter is zero.
+ // PS. This is not exactly "daily", this is actually a forced 24-hours wait.
+ if (!@peter) {
+ PETER_TIME=gettimetick(2)+24*60*60;
+ @peter=1; // This allows you to get 32 EXP from daily repeat. Tweak as needed.
+ }
+
+ // You get some EXP based on difficulty taken
+ getexp @peter*32, @peter;
+
+ // We don't need @peter anymore, so reuse it to give you GP rewards
+ switch (@peter) {
+ case 2: @peter=500; break;
+ case 4: @peter=1000; break;
+ case 8: @peter=1500; break;
+ default: @peter=750; break;
+ }
+
+ Zeny += @peter;
+ message strcharinfo(0), l("You receive @@ E!", @peter);
+
+ // Some cleanup. Shouldn't cause bugs but it's absence causes a ugly behavior.
+ deltimer("Peter#Artis::OnLowTime");
+ deltimer("Peter#Artis::OnTimeout");
+ @peter=0;
+ close;
+
+
+OnInit:
+ .distance = 3;
+ end;
+}