diff options
author | Saulc <lucashelaine14@gmail.com> | 2018-01-13 20:50:42 +0100 |
---|---|---|
committer | Saulc <lucashelaine14@gmail.com> | 2018-01-13 20:50:42 +0100 |
commit | 20df2abc1aca00d6aa5dc78347133890f36b32f3 (patch) | |
tree | 4ad4a8bb8b0605473a702e314799a4626347721a /npc/001-2-22 | |
download | serverdata-20df2abc1aca00d6aa5dc78347133890f36b32f3.tar.gz serverdata-20df2abc1aca00d6aa5dc78347133890f36b32f3.tar.bz2 serverdata-20df2abc1aca00d6aa5dc78347133890f36b32f3.tar.xz serverdata-20df2abc1aca00d6aa5dc78347133890f36b32f3.zip |
Initial commit
Diffstat (limited to 'npc/001-2-22')
-rw-r--r-- | npc/001-2-22/_import.txt | 13 | ||||
-rw-r--r-- | npc/001-2-22/_mobs.txt | 3 | ||||
-rw-r--r-- | npc/001-2-22/_savepoints.txt | 47 | ||||
-rw-r--r-- | npc/001-2-22/_warps.txt | 3 | ||||
-rw-r--r-- | npc/001-2-22/alige.txt | 324 | ||||
-rw-r--r-- | npc/001-2-22/chefgado.txt | 22 | ||||
-rw-r--r-- | npc/001-2-22/chest.txt | 49 | ||||
-rw-r--r-- | npc/001-2-22/hammock.txt | 137 | ||||
-rw-r--r-- | npc/001-2-22/knife.txt | 47 | ||||
-rw-r--r-- | npc/001-2-22/mapflags.txt | 1 | ||||
-rw-r--r-- | npc/001-2-22/note.txt | 33 | ||||
-rw-r--r-- | npc/001-2-22/peter.txt | 335 |
12 files changed, 1014 insertions, 0 deletions
diff --git a/npc/001-2-22/_import.txt b/npc/001-2-22/_import.txt new file mode 100644 index 000000000..96490c742 --- /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 000000000..a2164e451 --- /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 000000000..a0bd9f89e --- /dev/null +++ b/npc/001-2-22/_savepoints.txt @@ -0,0 +1,47 @@ +// 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,{ + savepointparticle .map$, .x, .y, CURRENT_INN; + close; + +OnInit: + .distance = 2; + .sex = G_OTHER; + end; +} +001-2-22,46,37,0 script #save_001-2-22_46_37 NPC_SAVE_POINT,{ + savepointparticle .map$, .x, .y, CURRENT_INN; + close; + +OnInit: + .distance = 2; + .sex = G_OTHER; + end; +} +001-2-22,55,40,0 script #save_001-2-22_55_40 NPC_SAVE_POINT,{ + savepointparticle .map$, .x, .y, CURRENT_INN; + close; + +OnInit: + .distance = 2; + .sex = G_OTHER; + end; +} +001-2-22,50,38,0 script #save_001-2-22_50_38 NPC_SAVE_POINT,{ + savepointparticle .map$, .x, .y, CURRENT_INN; + close; + +OnInit: + .distance = 2; + .sex = G_OTHER; + end; +} +001-2-22,53,38,0 script #save_001-2-22_53_38 NPC_SAVE_POINT,{ + savepointparticle .map$, .x, .y, CURRENT_INN; + close; + +OnInit: + .distance = 2; + .sex = G_OTHER; + end; +} diff --git a/npc/001-2-22/_warps.txt b/npc/001-2-22/_warps.txt new file mode 100644 index 000000000..8fcdb2c3c --- /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 000000000..70e6058e4 --- /dev/null +++ b/npc/001-2-22/alige.txt @@ -0,0 +1,324 @@ +// 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 + 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); + + 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."), -; + + closedialog; + 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 lg("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 lg("Great, what food do you have for me today?"); + 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, + 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; + + 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 nicely!"); + 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 lg("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"; + 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); + + 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: + .sex = G_MALE; + .distance = 2; + end; +} diff --git a/npc/001-2-22/chefgado.txt b/npc/001-2-22/chefgado.txt new file mode 100644 index 000000000..329d8567d --- /dev/null +++ b/npc/001-2-22/chefgado.txt @@ -0,0 +1,22 @@ +// Evol scripts. +// Authors: +// Hal9000 +// Qwerty Dragon +// Reid +// Description: +// La Johanne Chef. + +001-2-22,27,28,0 script Chef Gado#Artis NPC_CHEF_GADO,{ + + .@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."); + + close; + +OnInit: + .sex = G_MALE; + .distance = 2; + end; +} diff --git a/npc/001-2-22/chest.txt b/npc/001-2-22/chest.txt new file mode 100644 index 000000000..010f5a799 --- /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(0)); // 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(0)); // 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 000000000..f6f700442 --- /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 000000000..7502b1631 --- /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"; + mes col(l("There are some knives on the table. Would you like to take one?"), 9); + next; + + menu + l("Yes."), L_Give, + l("No."), -; + + closedialog; + close; + +L_Give: + mes ""; + inventoryplace Knife, 1; + + setq ShipQuests_Knife, 1; + getitem Knife, 1; + + mesn "Narrator"; + mes col(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; + mes col(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; + mes col(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 000000000..fdb4e3e22 --- /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 000000000..b2560503e --- /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 000000000..0365392af --- /dev/null +++ b/npc/001-2-22/peter.txt @@ -0,0 +1,335 @@ +// Evol scripts. +// Authors: +// 4144 +// Ablu +// Alastrim +// Qwerty Dragon +// Reid +// Vasily_Makarov +// Description: +// Rat hunter. +// 4+2 bits array: +// ShipQuests +// Variable: +// ShipQuests_Peter +// Values: +// 0 Doesn't know the quest. +// 1 Task given. +// 2 Task given and reward expected. +// 3 Task completed without reward. +// 4 Asked for reward after completion of the task. +// 5 Task done and reward given. +// 6 Did not start the quest. +// Others: +// .@peter = Peter#001-2-22 variable. +// "001-2-23" - map with mobs. +// "$@ARTIS_RAT1_HELPER$" - Name of the participant. +// "$@ARTIS_RAT1_DEATHS - Number of deaths when the participant starts the fight. +// "$@ARTIS_RAT1_CONTROL" - Explanation of each index of the array. +// "$@ARTIS_RAT1_OLD_HELPER$" - Name of the participant. +// "$@ARTIS_RAT1_COUNTDOWN" - Seconds since the epoch of when the player done the quest. +// [1] = Shows status of ratto number 1 (1 is dead and 0 is alive). +// [2] = Shows status of ratto number 2 (1 is dead and 0 is alive). +// [3] = Shows status of ratto number 3 (1 is dead and 0 is alive). +// [4] = Shows status of ratto number 4 (1 is dead and 0 is alive). +// [5] = Shows how many seconds passed since ratto number 1 died. +// [6] = Shows how many seconds passed since ratto number 2 died. +// [7] = Shows how many seconds passed since ratto number 3 died. +// [8] = Shows how many seconds passed since ratto number 4 died. +// [9] = Shows how many seconds passed since the player started the quest. +// [10] = Shows how many seconds passed since the player done the quest. + +001-2-22,72,34,0 script AreaNPC#001-2-22 NPC_HIDDEN,0,1,{ + +OnTouch: + if (BaseLevel < 5) goto L_Stop; + if ($@ARTIS_RAT1_COUNTDOWN == 0) goto L_NoCountDown; + if ((gettimetick(2) - $@ARTIS_RAT1_COUNTDOWN) < 10) goto L_NoGoodTick; + if (($@ARTIS_RAT1_OLD_HELPER$ == strcharinfo(0)) && ((gettimetick(2) - $@ARTIS_RAT1_COUNTDOWN) < 60)) goto L_NoGoodTick; + $@ARTIS_RAT1_COUNTDOWN = 0; + +L_NoCountDown: + if ($@ARTIS_RAT1_HELPER$ != "") goto L_Occupied; + .@peter = getq(ShipQuests_Peter); + if (.@peter < 1 || .@peter > 5) goto L_Task; + if (.@peter == 1 || .@peter == 2) goto L_Rfail; + if (.@peter == 3 || .@peter == 4) goto L_Rwin; + if (.@peter > 5) goto L_SecondTime; + doevent "Peter#001-2-22::OnReturnWin"; + close; + +L_Stop: + doevent "Peter#001-2-22::OnStop"; + + close; + +L_Occupied: + doevent "Peter#001-2-22::OnDontneedHelp"; + + close; + +L_Task: + doevent "Peter#001-2-22::OnGiveTask"; + + close; + +L_Rfail: + doevent "Peter#001-2-22::OnReturnFail"; + + close; + +L_Rwin: + doevent "Peter#001-2-22::OnReturnWin"; + + close; + +L_NoGoodTick: + doevent "Peter#001-2-22::OnNoGoodTick"; + + close; +} + +001-2-22,70,35,0 script Peter#001-2-22 NPC_RATTO_SAILOR,{ + if (BaseLevel < 5) goto OnTooWeak; + if ($@ARTIS_RAT1_COUNTDOWN == 0) goto L_NoCountDown; + if ((gettimetick(2) - $@ARTIS_RAT1_COUNTDOWN) < 10) goto OnNoGoodTick; + if (($@ARTIS_RAT1_OLD_HELPER$ == strcharinfo(0)) && ((gettimetick(2) - $@ARTIS_RAT1_COUNTDOWN) < 60)) goto OnNoGoodTick; + $@ARTIS_RAT1_COUNTDOWN = 0; + +L_NoCountDown: + .@peter = getq(ShipQuests_Peter); + if (.@peter == 1 || .@peter == 2) goto OnReturnFail; + if (.@peter == 3 || .@peter == 4 || .@peter == 5) goto OnReturnWin; + +OnGiveTask: + setq ShipQuests_Peter, 6; + .@peter = getq(ShipQuests_Peter); + mesn; + mesq lg("Hey, girl!", "Hey, man!"); + 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_Task, + l("No, they are way too dangerous for me!"), -; + + mes ""; + mesn; + mesq l("Hehe, hehe. Well, come back if you change your mind."); + + goto L_Quit; + +OnTooWeak: + mesn; + mesq lg("I need someone to help me clean the edge of the ship, but you aren't strong enough for now."); + + goto L_Quit; + +OnStop: + warp "001-2-22", 72, 36; + + mesn; + mesq l("You can't go there!"); + + close; + +OnReturnFail: + 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_Task, + l("No, they are way too dangerous for me!"), -; + + mes ""; + mesn; + mesq l("Hehe, hehe. Well, come back if you change your mind."); + + goto L_Quit; + +OnReturnWin: + .@peter = getq(ShipQuests_Peter); + mesn; + mesq l("Thanks again for helping me. Drats these rattos for infesting our fair vessal! They are a permanent problem so I will always need your help to exterminate them in order to keep their number under control. Your help is very welcome indeed. Unfortunately, I can give you a reward only for the first extermination."); + next; + + if (.@peter == 3 || .@peter == 4) + menu + l("Did you say reward? I want it!"), L_BonusTask, + l("I am not worried about rewards. I just want to help."), L_Task, + l("Sorry, I am not in the mood for another fight with these rattos."), -; + + if (.@peter == 5) + menu + l("No problem, I can help you anyway."), L_Task, + l("Sorry, I am not in the mood for another fight with these rattos."), -; + + mes ""; + mesn; + mesq l("Hehe, hehe. Well, come back if you change your mind."); + + close; + +L_BonusTask: + mes ""; + mesn; + mesq l("What if I give you 1000 Esperin for that job, is it ok?"); + next; + + menu + lg("Okay, I'm ready to work!"), -, + l("What? This reward is too small!"), L_Quit; + + .@peter = getq(ShipQuests_Peter); + if ($@ARTIS_RAT1_HELPER$ != "") goto OnDontneedHelp; + if (.@peter == 6) setq ShipQuests_Peter, 2; + if (.@peter == 3) setq ShipQuests_Peter, 4; + .@peter = getq(ShipQuests_Peter); + goto L_Start; + +L_Task: + .@peter = getq(ShipQuests_Peter); + if ($@ARTIS_RAT1_HELPER$ != "") goto OnDontneedHelp; + if (.@peter == 6) setq ShipQuests_Peter, 1; + .@peter = getq(ShipQuests_Peter); + +L_Start: + mes ""; + mesn; + mesq l("Okay, you can start!"); + +OnStartOutside: + if ($@ARTIS_RAT1_HELPER$ != "") goto OnDontneedHelp; + $@ARTIS_RAT1_HELPER$ = strcharinfo(0); + $@ARTIS_RAT1_DEATHS = PC_DIE_COUNTER; + initnpctimer; + warp "001-2-23", 48, 28; + doevent "RattosControl#001-2-23::OnSpawn"; + + goto L_Quit; + +OnTimer2000: + if (attachrid(getcharid(3, $@ARTIS_RAT1_HELPER$)) == 0) goto L_Logoff; + $@ARTIS_RAT1_CONTROL[9] = $@ARTIS_RAT1_CONTROL[9] + 2; + if ($@ARTIS_RAT1_CONTROL[9] > 100) goto L_Timeout; + if (PC_DIE_COUNTER > $@ARTIS_RAT1_DEATHS) goto L_Dead; + if ($@ARTIS_RAT1_CONTROL[1] && $@ARTIS_RAT1_CONTROL[2] && $@ARTIS_RAT1_CONTROL[3] && $@ARTIS_RAT1_CONTROL[4]) goto L_Done; + if (getmapusers("001-2-23") == 0) goto L_CleaningEnd; + goto L_CheckRattos; + + end; + +L_CheckRattos: + if ($@ARTIS_RAT1_CONTROL[1]) $@ARTIS_RAT1_CONTROL[5] = $@ARTIS_RAT1_CONTROL[5] + 2; + if ($@ARTIS_RAT1_CONTROL[2]) $@ARTIS_RAT1_CONTROL[6] = $@ARTIS_RAT1_CONTROL[6] + 2; + if ($@ARTIS_RAT1_CONTROL[3]) $@ARTIS_RAT1_CONTROL[7] = $@ARTIS_RAT1_CONTROL[7] + 2; + if ($@ARTIS_RAT1_CONTROL[4]) $@ARTIS_RAT1_CONTROL[8] = $@ARTIS_RAT1_CONTROL[8] + 2; + if ($@ARTIS_RAT1_CONTROL[5] > 45) doevent "RattosControl#001-2-23::OnRatto1Respawn"; + if ($@ARTIS_RAT1_CONTROL[6] > 45) doevent "RattosControl#001-2-23::OnRatto2Respawn"; + if ($@ARTIS_RAT1_CONTROL[7] > 45) doevent "RattosControl#001-2-23::OnRatto3Respawn"; + if ($@ARTIS_RAT1_CONTROL[8] > 45) doevent "RattosControl#001-2-23::OnRatto4Respawn"; + +L_NotYet: + setnpctimer 0; + + end; + +OnDontneedHelp: + mesn; + mesq l("I don't need your help right now, come back later."); + next; + mesq l("@@ is helping me.", $@ARTIS_RAT1_HELPER$); + + goto L_Quit; + +L_Timeout: + 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."); + warp "001-2-22", 72, 36; + + goto L_CleaningClose; + +L_Logoff: + goto L_CleaningEnd; + +L_Dead: +// Warps the dead body outside, so it does not interfere with the getmapusers check. + if (getmapusers("001-2-23") > 0) warp "001-2-22", 72, 36; + + goto L_CleaningEnd; + +L_Done: + $@ARTIS_RAT1_CONTROL[10] = $@ARTIS_RAT1_CONTROL[10] + 2; + if($@ARTIS_RAT1_CONTROL[10] < 5) goto L_NotYet; + .@peter = getq(ShipQuests_Peter); + if (.@peter == 2 || .@peter == 4) goto L_Reward; + warp "001-2-22", 72, 36; + + goto L_Thanks; + +L_CleaningEnd: + stopnpctimer; + $@ARTIS_RAT1_HELPER$ = ""; + $@ARTIS_RAT1_DEATHS = 0; + cleararray $@ARTIS_RAT1_CONTROL, 0, 11; + killmonster "001-2-23", "RattosControl#001-2-23::OnRatto1Death"; + killmonster "001-2-23", "RattosControl#001-2-23::OnRatto2Death"; + killmonster "001-2-23", "RattosControl#001-2-23::OnRatto3Death"; + killmonster "001-2-23", "RattosControl#001-2-23::OnRatto4Death"; + + end; + +L_CleaningClose: + stopnpctimer; + $@ARTIS_RAT1_OLD_HELPER$ = $@ARTIS_RAT1_HELPER$; + $@ARTIS_RAT1_HELPER$ = ""; + $@ARTIS_RAT1_DEATHS = 0; + cleararray $@ARTIS_RAT1_CONTROL, 0, 11; + killmonster "001-2-23", "RattosControl#001-2-23::OnRatto1Death"; + killmonster "001-2-23", "RattosControl#001-2-23::OnRatto2Death"; + killmonster "001-2-23", "RattosControl#001-2-23::OnRatto3Death"; + killmonster "001-2-23", "RattosControl#001-2-23::OnRatto4Death"; + $@ARTIS_RAT1_COUNTDOWN = gettimetick(2); + + close; + +L_Reward: + warp "001-2-22", 72, 36; + setq ShipQuests_Peter, 5; + .@peter = getq(ShipQuests_Peter); + mesn; + mesq l("Good job!") + " " + l("Here's your reward!"); + getexp 100, 0; + Zeny = Zeny + 1000; + message strcharinfo(0), l("You receive @@ E!", 1000); + + goto L_CleaningClose; + +L_Thanks: + mesn; + mesq l("Thanks for helping me!"); + .@peter = getq(ShipQuests_Peter); + if (.@peter == 1) setq ShipQuests_Peter, 3; + .@peter = getq(ShipQuests_Peter); + + goto L_CleaningClose; + +L_Quit: + .@peter = 0; + + close; + +OnNoGoodTick: + mesn; + mesq l("I don't need your help right now, come back later."); + close; + +OnInit: + .sex = G_MALE; + .distance = 3; + end; +} |