summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusalva Jesusalva <jesusalva@themanaworld.org>2023-03-05 00:23:54 +0000
committerJesusalva Jesusalva <jesusalva@themanaworld.org>2023-03-05 00:23:54 +0000
commitf123b04e54885559000b799e73373e5b99affc71 (patch)
tree1f7c947565e90cb2f9f10f828e445a346956583f
parent181de88c329902299082dfb61f8a8e644b8e89bf (diff)
downloadserverdata-f123b04e54885559000b799e73373e5b99affc71.tar.gz
serverdata-f123b04e54885559000b799e73373e5b99affc71.tar.bz2
serverdata-f123b04e54885559000b799e73373e5b99affc71.tar.xz
serverdata-f123b04e54885559000b799e73373e5b99affc71.zip
Revert "Merge branch 'PiouIsles_quests' into 'master'"
This reverts merge request !94
-rw-r--r--db/constants.conf2
-rw-r--r--db/quest_db.conf16
-rw-r--r--db/re/item_db.conf29
-rw-r--r--npc/006-2-1/glim.txt69
-rw-r--r--npc/006-2-1/may.txt85
-rw-r--r--npc/006-2-1/piouchef.txt150
-rw-r--r--npc/006-2-5/dusk.txt89
-rw-r--r--npc/006-2-5/pouf.txt151
-rw-r--r--npc/006-2-5/reed.txt93
-rw-r--r--npc/006-2-6/hatchling.txt136
10 files changed, 1 insertions, 819 deletions
diff --git a/db/constants.conf b/db/constants.conf
index 3467360a8..185f72428 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -1853,7 +1853,7 @@ constants_db: {
NPC_PIOU_MAGE: 266
NPC_PIOU_QUEEN: 267
NPC_PIOU_KNIGHT_L: 268
- NPC_PIOU_KNIGHT_R: 269
+ NPC_PIOU_KNIGHT_R: 260
NPC_PIOU_ALCHEMIST: 270
NPC_DUCK_ELDER: 271
NPC_GUINEVERE: 272
diff --git a/db/quest_db.conf b/db/quest_db.conf
index 0ae55974c..565adf2dc 100644
--- a/db/quest_db.conf
+++ b/db/quest_db.conf
@@ -565,22 +565,6 @@ quest_db: (
Id: 254
Name: "LilitQuest_Raify"
},
-{
- Id: 255
- Name: "LilitQuest_Glim"
-},
-{
- Id: 256
- Name: "LilitQuest_PiouChef"
-},
-{
- Id: 257
- Name: "LilitQuest_Hatchling"
-},
-{
- Id: 258
- Name: "LilitQuest_Pouf"
-},
// ID 270 to 299: Land Of Fire Quests
{
diff --git a/db/re/item_db.conf b/db/re/item_db.conf
index dfe317e77..e02612173 100644
--- a/db/re/item_db.conf
+++ b/db/re/item_db.conf
@@ -3170,35 +3170,6 @@ item_db: (
// Mounts (690 to 699, probably there will be extra IDs)
{
- Id: 695
- AegisName: "BronzePin"
- Name: "Bronze Pin"
- Type: "IT_ARMOR"
- Loc: "EQP_SHADOW_SHOES"
- Buy: 45000
- Sell: 15000
- Weight: 300
- Def: 5
- EquipLv: 30
- Refine: false
- Trade: {
- notrade: true
- nodrop: true
- noselltonpc: true
- nomail: true
- noauction: true
- }
- Script: <"
- bonus bFlee,25;
- bonus bAtkRate,5;
- bonus bSpeedRate,10;
- bonus bNoKnockback,1;
- bonus bHPRegenRate,-50;
- bonus bSPRegenRate,-50;
- bonus bMaxHP,-200;
- ">
-},
-{
Id: 696
AegisName: "RidingMouboo"
Name: "Riding Mouboo"
diff --git a/npc/006-2-1/glim.txt b/npc/006-2-1/glim.txt
deleted file mode 100644
index 07e644797..000000000
--- a/npc/006-2-1/glim.txt
+++ /dev/null
@@ -1,69 +0,0 @@
-// TMW2 scripts.
-// Authors:
-// Jesusalva
-// +seeds
-// Description:
-// Daily quest to exchange Tolchi Arrow Boxes for a small amount of gp and exp
-// Variables:
-// $GLIM_ST
-// How many Tolchi Arrow Boxes were given
-// q1
-// Controls your own progress helping Glim - Items today
-// q2
-// Controls your own progress helping Glim - Your timer
-
-006-2-1,82,28,0 script Glim NPC_PIOU_VIKING,{
-
-L_Loop:
- .@q1=getq(LilitQuest_Glim);
- .@q2=getq2(LilitQuest_Glim);
- mesn;
- mesq l("Argh, I've run out o' arrows! Say, ye don't have any I could use, do ye?.", $GLIM_ST);
- next;
- if (.@q2 < $@GLIM_QTIMER) {
- setq1 Lilitquest_Glim, 0;
- setq2 Lilitquest_Glim, $@GLIM_QTIMER;
- }
-
- // Daily limit reached
- .@q1=getq1(Lilitquest_Glim);
- if (.@q1 >= (BaseLevel-17)/3) goto L_Timer;
- select
- rif(countitem(TolchiAmmoBox) >= 1, l("Give Glim a @@"), getitemlink(TolchiAmmoBox)),
- l("Maybe later.");
- mes "";
-
- switch (@menu) {
- case 1:
- delitem TolchiAmmoBox, 1;
- getexp 64, 0;
- Zeny=Zeny+50;
- break;
- case 2:
- close;
- break;
- }
- $GLIM_ST=$GLIM_ST+1;
- setq1 Lilitquest_Glim, .@q1+1;
- goto L_Loop;
-
-L_Timer:
- if (BaseLevel < 10)
- mesq l("Wait a minute! I ain't trustin' a weakling like ye fer good arrows!");
- mesn;
- mesq l("Come back when ye've grown sum muscles.");
- mesn;
- mesq l("I'm all stocked up now, thanks to ye. Come back in @@ and ye might be able to help me again.", FuzzyTime($@GLIM_TIMER+(60*60*24),2,2));
- close;
-
-OnInit:
- .sex=G_OTHER;
- .distance=5;
- // No end; on purpose
-
-OnHour00:
- $@GLIM_QTIMER=gettimeparam(GETTIME_DAYOFMONTH);
- $@GLIM_QTIMER=gettimetick(2);
- end;
-
-}
diff --git a/npc/006-2-1/may.txt b/npc/006-2-1/may.txt
deleted file mode 100644
index 2de362cd2..000000000
--- a/npc/006-2-1/may.txt
+++ /dev/null
@@ -1,85 +0,0 @@
-// TMW-2 scripts.
-// Original Authors: Hal9000 & Qwerty Dragon
-// TMW-2 Authors:
-// +seeds
-// dangerduck
-// Description:
-// Piou nurse who keeps losing one of her charges.
-
-006-2-1,28,24,0 script Nurse May NPC_PIOU_NURSE,{
- function mayHello;
- function mayHelp;
- function mayClose;
- .@q=getq(LilitQuest_Hatchling);
-
- if (.@q <= 1)
- function mayHello {
- mesn;
- mesq l("Oh please help me, %s! A hatchling has escaped and I can't leave my charges to retrieve him! Will you fetch him for me?", get_race());
- next;
- select
- l("Of course, I'd be happy to help!"),
- l("I don't do well with kids, sorry."),
- mes "";
- switch (@menu) {
- case 1:
- mayHelp();
- break;
- case 2:
- mayClose();
- break;
- }
- return;
-}
-
-function mayHelp {
- mesn;
- mesq l("My charge Chuck darted through the door when I came in this morning, and escaped!");
- mesn;
- mesq l("One of the palace guards came by earlier to pickup her daughter, and she said he's at the castle.");
- mesn;
- mesq l("Apparently he's been terrorizing the staff, and keeping them out of their quarters!");
- mesn;
- mesq l("Nobody's been able to coax him back or catch him, but a %s might be able to.", get_race());
- mesn;
- mesq l("Please bring him back, and hurry!");
- close;
-}
-
-function mayClose {
- {
- .@r = rand2(2);
- if (.@r == 0)
- {
- npctalk3 l("I'm sorry, I simply can't spare any more time to talk with you. Oh, Kendra, don't eat that!");
- }
- else
- {
- npctalk3 l("I must get back to my hatchlings!", get_race());
- }
- }
- else if (.@q == 1)
- {
- mesn;
- mesq l("Oh, hello again %s! I'm afraid Chuck escaped again. Would you mind retrieving him again, please?", strcharinfo(0));
-next;
- select
- l("No problem! It's kind of fun chasing after him."),
- l("Sorry, I'm too busy to worry about misbehaved chicks. Catch him yourself."),
- mes "";
- switch (@menu) {
- case 1:
- close;
- case 2:
- mayClose();
- break;
- }
- return;
-}
-
-OnInit:
- .sex = G_OTHER;
- .distance = 4;
- end;
-}
-
diff --git a/npc/006-2-1/piouchef.txt b/npc/006-2-1/piouchef.txt
deleted file mode 100644
index 2536053e5..000000000
--- a/npc/006-2-1/piouchef.txt
+++ /dev/null
@@ -1,150 +0,0 @@
-// TMW2 Script
-// Author:
-// dangerDuck
-// +seeds
-// Description:
-// Piou chef who asks you to check on a missing delivery.
-
-006-2-1,35,75,0 script Piou Chef NPC_PIOU_COOK,{
- function chefAssign;
- function chefWait;
- function chefSupplyList;
- function chefGiveDelivery;
- function chefClose;
- .@q=getq(LilitQuest_PiouChef);
- mesn;
- mesc l("The chef is muttering under his breath while kneading a pile of soft dough.");
- next;
- select
- rif(.@q == 0, l("Do you need help with anything?")),
- rif(.@q == 1, l("I have the supplies you asked for.")),
- l("I better leave him to his work.");
- mes "";
- switch (@menu) {
- case 1:
- chefAssign();
- break;
- case 2:
- chefWait();
- break;
- case 3:
- chefGiveDelivery();
- break;
- default:
- chefClose();
- break;
- }
- close;
-
-function chefAssign {
- if (BaseLevel < 50) {
- mesn;
- mesq l("Unfortunately, a mere fledgling like you is not strong enough to help us.");
- next;
- elderClose();
- return;
- }
- mesn;
- mesq l("Your information is correct, %s. Pirates have been plaguing our shores and cutting off our supply lines.", get_race());
- next;
- mesn;
- mesq l("We are in desperate need of food and nesting material, as well as our sacred supply of @@.", getitemlink(CrystallizedMaggot));
- next;
- setq LilitQuest_PiouChef, 1;
- chefSupplyList();
- chefClose();
- return;
-}
-
-function chefWait {
- do
- {
- mesn;
- mesq l("Did you bring the supplies?");
- next;
- select
- l("Yes, I have them right here."),
- l("What did you want? I've forgotten."),
- l("Not yet. I've been... delayed.");
- mes "";
- switch (@menu) {
- case 1:
- chefGiveDelivery();
- break;
- case 2:
- chefSupplyList();
- break;
- case 3:
- chefClose();
- close;
- break;
- }
- } while (true);
- return;
-}
-
-function chefSupplyList {
- do
- {
- mesn;
- mesq l("We need @@, @@, and @@ for our regular stores and nesting materials, and @@ for the royal kitchen.", 300, getitemlink(Moss), 250, getitemlink(RoastedMaggot), 20, getitemlink(FishBox), 1, getitemlink(CrystallizedMaggot));
- next;
- mesn;
- mesq l("Please hurry, our citizens are going hungry, and you do NOT want to find out what a crowd of hungry pious will do!");
- close;
- return;
-}
-
-function chefGiveDelivery {
- if (countitem(Moss) < 300 ||
- countitem(RoastedMaggot) < 250 ||
- countitem(FishBox) < 20 ||
- countitem(CrystallizedMaggot) < 1) {
- mesn;
- mesq l("This isn't what I requested!!! Perhaps you should count your items more carefully.");
- next;
- mesn;
- mesq l("If you aren't more careful, we might... accidentally... mistake you for an agent of the Duck Side.");
- percentheal -99, 0;
- close;
- }
-
- delitem(Moss, 300);
- delitem(RoastedMaggot, 250);
- delitem(FishBox, 20);
- delitem(CrystallizedMaggot, 1);
-
- getexp(34576, 19226);
- setq(LilitQuest_PiouChef, 2);
-
- mes "";
- next;
- mesn;
- mesq l("I appreciate the help, %s. Come back anytime for a tasty dish!", get race());
- close;
-}
-
-function chefClose {
- mesn;
- mesq l("Keep your eye out for pesky ducks, %s. I have a new sauce I want to try out...", strcharinfo(0));
- next;
- mesn;
- if (BaseLevel < 50) {
- mesq l("Perhaps you may be of assistance later.");
- } else {
- mesq l("Go away, %s! Can't you see I'm busy?", get_race());
- }
- close;
- return;
-}
-
-OnInit:
- .sex = G_OTHER;
- .distance = 4;
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname(.name$);
- end;
-}
-
diff --git a/npc/006-2-5/dusk.txt b/npc/006-2-5/dusk.txt
deleted file mode 100644
index 9e523ca02..000000000
--- a/npc/006-2-5/dusk.txt
+++ /dev/null
@@ -1,89 +0,0 @@
-// TMW-2 scripts.
-// Original Authors: Hal9000 & Qwerty Dragon
-// TMW-2 Authors:
-// +seeds
-// dangerduck
-// Description:
-// Piou captain who gives information about the war, and the piou queen.
-
-006-2-5,36,25,0 script Captain Dusk NPC_PIOU_KNIGHT_R,{
- function duskHello;
- function duskAboutQueen;
- function duskAboutWar;
- .@q=getq(LilitQuest_Pouf);
-
- if (.@q <= 2)
- {
- .@r = rand2(3);
- if (.@r == 0)
- {
- npctalk3 l("Don't think you'll sneak anything by me. I'm watching you...");
- }
- else if (.@r == 1)
- {
- npctalk3 l("I don't tolerate a piou, or %s, who is afraid of hard work.", get_race());
- }
- else
- {
- npctalk3 l("Best steer clear of the Princess, %s. It won't go well if you upset her.", strcharinfo(0));
- }
- }
- else if (.@q == 3)
- {
- duskHello();
- }
- close;
-
-function duskHello {
- mesn;
- mesq l("Welcome to the Order of the Piou Knights, %s.", strcharinfo(0));
- next;
- select
- l("Where is the Piou Queen?"),
- l("How is the war going?"),
- l("I just wanted to say hi.");
- mes "";
- switch (@menu) {
- case 1:
- duskAboutQueen();
- break;
- case 2:
- duskAboutWar();
- break;
- case 3:
- break;
- }
- return;
-}
-
-function duskAboutQueen {
- mesn;
- mesq l("Queen +seeds of Piou Isles is busy coordinating war efforts at the front.");
- mesn;
- mesq l("She's a fierce piou, leading our troops into the heart of each battle. I admire her bravery.");
- mesn;
- mesq l("Princess Pouf has been given leadership until our Queen returns. Should Queen +seeds perish, Princess Pouf will take the crown.");
- mesn;
- mesq l("Fight bravely and well, %s, and perhaps our Queen will survive to return to her beloved Isles.", strcharinfo(0));
- mesn;
- duskHello();
-}
-
-function duskAboutWar {
- mesn;
- mesq l("So far neither the Duck Side or the Piou Knights have gained the upper hand in the war.");
- mesn;
- mesq l("However, our mages have recently sensed something dark stirring.");
- mesn;
- mesq l("I fear something terrible is rising, and I do not know if we can weather the coming storm.");
- mesn;
- mesc l("The captain falls quiet, and appears to be lost in thought.");
- mesn;
- return;
-}
-
-OnInit:
- .sex = G_OTHER;
- .distance = 4;
- end;
-}
diff --git a/npc/006-2-5/pouf.txt b/npc/006-2-5/pouf.txt
deleted file mode 100644
index 6b42846c4..000000000
--- a/npc/006-2-5/pouf.txt
+++ /dev/null
@@ -1,151 +0,0 @@
-// TMW-2 scripts.
-// Original Authors: Hal9000 & Qwerty Dragon
-// TMW-2 Authors:
-// dangerDuck
-// +seeds
-// Description:
-// Piou royal who asks players to prove themselves against piou knights.
-
-function script PoufMobCount {
- .@q=getq(LilitQuest_Pouf);
- .@t=getq2(LilitQuest_Pouf);
- if (.@q == 1 && killedrid == PiouKnight)
- {
- setq2(LilitQuest_Pouf, .@t+1);
- }
- if (.@t+1 >= 10)
- {
- setq(LilitQuest_Pouf, 2);
- }
-
- // Report progress
- dispbottom l("@@/@@", .@t+1, 10);
-
- return;
-}
-
-006-2-5,38,23,0 script Princess Pouf NPC_PIOU_QUEEN,{
- function poufChallenge;
- function poufQuest;
- function poufQuestReport;
- function poufQuestReward;
- function poufQuestFinished;
- if (BaseLevel < 60)
- {
- mesn;
- mesq l("You are too weak to pass my test.");
- next;
- mesn;
- mesc l("Return when you are stronger.");
- }
- else
- {
- poufChallenge();
- }
- closedialog;
- close;
-
-function poufChallenge {
- .@q=getq(LilitQuest_Pouf);
- if (.@q == 0)
- {
- mesn;
- mesq l("Welcome to my Isles, traveller.");
- next;
- mesc l("To show you are worthy of remaining here, you must prove yourself to me! Do you accept my challenge?"), 1;
- if (askyesno() == ASK_NO)
- return;
- poufQuest();
- }
- else if (.@q == 1)
- {
- poufQuestReport();
- }
- else if (.@q == 2)
- {
- poufQuestReward();
- }
- else
- {
- poufQuestFinished();
- }
- return;
-}
-
-function poufQuest {
- mes "";
- mesn;
- mesq l("Defeat 10 of my bravest @@ to prove yourself a warrior, brave of heart and strong of arm!", getmonsterlink(PiouKnight));
- next;
- select
- l("Point the way! Little yellow birds can't be that hard."),
- l("Scary pious with armor? No thank you!");
- mes "";
- switch (@menu) {
- case 1:
- mesn;
- mesq l("Excellent. You will find them in the training room beneath this chamber.");
- next;
- setq(LilitQuest_Pouf, 1, 0);
- break;
- case 2:
- next;
- mesq l("You are clearly not brave enough for this test. Leave my sight at once, chicken.");
- break;
- }
- return;
-}
-
-function poufQuestReport {
- mesn;
- mesq l("You've only killed @@/10 @@! You must defeat more to win my favor.", getq2(LilitQuest_Pouf),getmonsterlink(PiouKnight));
- next;
- return;
-}
-
-function poufQuestReward {
- mesn;
- mesq l("You've defeated 10 of my knights without flinching! You are truly a brave warrior.");
- next;
- mesn;
- mesc l("The princess flies off her perch and alights upon your right and left shoulder in succession.");
- next;
- mesn;
- mesq l("I dub thee Honorary Piou Knight @@, with all the rewards and duties of the position.", strcharinfo(0));
- next;
- mesn;
- mesc l("The princess produces a small, shiny bronze feather and pins it to your lapel, then returns to her perch.");
- next;
- mesn;
- mesq l("Make me proud, knight!");
- inventoryplace BronzePin, 1;
- getitem BronzePin, 1;
- getexp(91479, 24989);
- setq(LilitQuest_Pouf, 3);
- next;
- return;
-}
-
-function poufQuestFinished {
- mesn;
- .@r = rand2(3);
- if (.@r == 0)
- {
- npctalk3 l("I bid you a good %s, brave knight.", (is_night() ? l("evening") : l("day")));
- }
- else if (.@r == 1)
- {
- npctalk3 l("Fight bravely for Queen +seeds and our isles, honorable knight!");
- }
- else
- {
- npctalk3 l("I wish you success on your ventures, Knight @@.", strcharinfo(0));
- }
- return;
-}
-
-OnInit:
- .sex = G_OTHER;
- .distance = 3;
- end;
-}
diff --git a/npc/006-2-5/reed.txt b/npc/006-2-5/reed.txt
deleted file mode 100644
index 03a83bf62..000000000
--- a/npc/006-2-5/reed.txt
+++ /dev/null
@@ -1,93 +0,0 @@
-// TMW-2 scripts.
-// Original Authors: Hal9000 & Qwerty Dragon
-// TMW-2 Authors:
-// +seeds
-// dangerduck
-// Description:
-// Piou captain who gives information about shrewboo mounts and the Piou Knights.
-
-006-2-5,40,25,0 script Captain Reed NPC_PIOU_KNIGHT_L,{
- function reedHello;
- function reedAboutKnights;
- function reedAboutShrewboos;
- .@q=getq(LilitQuest_Pouf);
-
- if (.@q <= 2)
- {
- .@r = rand2(3);
- if (.@r == 0)
- {
- npctalk3 l("This is no place for a weakling like you. I suggest you leave.");
- }
- else if (.@r == 1)
- {
- npctalk3 l("Allowing you to remain on our Isles is dangerous. Tread carefully, %s.", get_race());
- }
- else
- {
- npctalk3 l("I'll be keeping an eye on you, %s. Don't make trouble.", strcharinfo(0));
- }
- }
- else if (.@q == 3)
- {
- reedHello();
- }
- close;
-
-function reedHello {
- mesn;
- mesq l("Do you need assistance, Knight %s?", strcharinfo(0));
- next;
- select
- l("What can you tell me about the Piou Knights?"),
- l("Why do Piou Knights need mounts if they can fly?"),
- l("I just wanted to say hi.");
- mes "";
- switch (@menu) {
- case 1:
- reedAboutKnights();
- break;
- case 2:
- reedAboutShrewboos();
- case 3:
- // fallthrough
- break;
- }
- return;
-}
-
-function reedAboutKnights {
- mesn;
- mesq l("The Order of Piou Knights was originally created as a defense against hunters from the humanoid races.");
- mesn;
- mesc l("Our Order stopped the hunters from harming any piou on Piou Isles, but it could not do anything for the pious who refused to live here.");
- mesn;
- mesq l("We grew in strength and knowledge over time, and dedicated ourselves to upholding justice and peace on the Isles, and in the world.");
- mesn;
- mesq l("When the ducks joined the Moubootaur and created the Duck Side, our convictions and oaths to the Order ensured we would oppose them.");
- mesn;
- mesc l("The humanoid races do not consider ducks or pious to be a threat, thus we are the only line of defense against the Duck Side.");
- mesn;
- mesq l("Remember that, %s. You dedicated yourself to the Order of Piou Knights, and you are now sworn to oppose the Duck Side.", strcharinfo(0));
- mesn;
- reedHello();
-}
-
-function reedAboutShrewboos {
- mesn;
- mesq l("Our warriors are burdened with strong, yet heavy, armor.");
- mesn;
- mesc l("Due to this detriment to our speed and ability to fly, we started training shrewboos as mounts.");
- mesn;
- mesq l("Over time, we improved our training, and our warboos are now extremely efficient fighting steeds.");
- mesn;
- mesq l("They also give Piou Knights a much needed speed boost against the ducks, who are naturally fast.");
- mesn;
- reedHello();
-}
-
-OnInit:
- .sex = G_OTHER;
- .distance = 4;
- end;
-}
diff --git a/npc/006-2-6/hatchling.txt b/npc/006-2-6/hatchling.txt
deleted file mode 100644
index df06409eb..000000000
--- a/npc/006-2-6/hatchling.txt
+++ /dev/null
@@ -1,136 +0,0 @@
-// Evol scripts.
-// Author:
-// Travolta
-// +seeds
-// Description:
-// A piou hatchling who escaped his nurse and fled to the castle. He's been terrorizing the staff.
-// Variables:
-// none
-
-function script ArtisFlyingPiouLogic {
- .@tick = gettimetick(1);
- .@LastTimeTouched = getvariableofnpc(.LastTimeTouched, strnpcinfo(3));
- if (.@tick > .@LastTimeTouched + 300)
- {
- .speed = 200;
- set getvariableofnpc(.LastPlayerTouched, strnpcinfo(3)), -1;
- }
- .@rnd = rand(5) - 3;
- if (.@rnd > 0)
- return execmovecmd("wait " + .@rnd);
- return 0;
-}
-
-006-2-6,38,28,0 script #Hatchling NPC_FLYING_PIOU,{
- .@q=getq(LilitQuest_Hatchling);
- function TryCatchPiou {
- .@agi = readparam(bAgi);
- @ArtisQuests_CatchPiouTries += 1;
- getmapxy(.@map$, .@x1, .@y1, 1);
- getmapxy(.@map$, .@x2, .@y2, 0);
- .@distance = distance(.@x1, .@y1, .@x2, .@y2);
- .@chance = max(ArtisQuests_CatchPiou_Difficulcy,
- 20 + .@distance * 5 - .@agi/10 -
- @ArtisQuests_CatchPiouTries);
- return rand(.@chance);
- }
-
- .@charid = getcharid(0);
- if (.LastPlayerTouched <= 0)
- {
- .LastPlayerTouched = .@charid;
- @ArtisQuests_CatchPiouTries = 0;
- }
- else if (.LastPlayerTouched != .@charid)
- {
- message strcharinfo(0), l("Looks like somebody else is looking for Chuck. I better leave them to try.");
- end;
- }
-
- .@q = getq(ArtisQuests_CatchPiou);
- if (.@q != 1)
- {
- mesn "Narrator";
- mesc(l("The hatchling looks at you with big, pleading eyes, and you don't have the heart to take it back to May."), 9);
- close;
- }
-
- .@tick = gettimetick(1);
- if (.@tick < .LastTimeTouched + min(4, ArtisQuests_CatchPiou_Difficulcy
- + @ArtisQuests_CatchPiouTries / 3))
- {
- mesq l("The hatchling spooked at your attempt to catch it, and zoomed out of sight.");
- .LastTimeTouched = .@tick;
- end;
- }
-
- .LastTimeTouched = .@tick;
-
- .@rnd = TryCatchPiou();
- if (!.@rnd)
- {
- npcstop;
- stopnpctimer;
- getmapxy(.@map$, .@x, .@y, 1);
- npcwalkto .@x, .@y;
- .@trader$ = "Salem#001-1";
- mesn "Narrator";
- mesc(l("Finally, you captured the speedy hatchling, but he's trying to squirm away! Hurry back to May before he escapes."), 9);
- setq LilitQuest_Hatchling, 1;
- getexp(1000, 500);
- set getvariableofnpc(.LastPiouHunter$, .@trader$), strcharinfo(0);
- set getvariableofnpc(.PiouEscapedMessage$, .@trader$), l("The little pipsqueak gave you the slip! You need to catch him again.");
- set getvariableofnpc(.LastPiouHunterID, .@trader$), .@charid;
- set getvariableofnpc(.PiouCaught, .@trader$), 1;
- donpcevent .@trader$ + "::OnPiouFlee";
- close2;
- disablenpc strnpcinfo(3);
- close;
- }
- else
- {
- setarray .RandomFailureMessages$[0], l("Nearly there!"), l("Like trying to catch a greased shrewboo..."), l("Aw, he got away again!"), l("Slippery little guy!");
- .@r = rand(getarraysize(.RandomFailureMessages$));
- message strcharinfo(0), .RandomFailureMessages$[.@r];
- .speed = max(140, 200 - 10 * (@ArtisQuests_CatchPiouTries +
- ArtisQuests_CatchPiou_Difficulcy));
- }
- end;
-
-OnHour00:
- .LastTimeTouched = 0;
- end;
-
-OnTimer1000:
- dographmovestep;
-
-OnInit:
- .distance = 5;
- .walkmask = WALK_WATER;
-
- initmovegraph "carpet middle", 38, 28,
- "upper left", 34, 26, 32, 23,
- "lower right", 41, 31, 44, 34,
- "upper right", 42, 26, 44, 23,
- "lower left", 35, 31, 32, 34,
- "passage left", 32, 28,
- "passage right", 44, 28,
- ;
-
- setmovegraphcmd "carpet middle", "upper left", 1, "wait 1; call ArtisFlyingPiouLogic",
- "upper left", "lower right", 1, "call ArtisFlyingPiouLogic",
- "lower right", "upper right", 2, "call ArtisFlyingPiouLogic",
- "lower right", "lower_left", 1, "call ArtisFlyingPiouLogic",
- "upper right", "lower left", 1, "call ArtisFlyingPiouLogic",
- "lower left", "table left", 1, "call ArtisFlyingPiouLogic",
- "lower left", "table right", 1, "call ArtisFlyingPiouLogic",
- "passage left", "carpet middle", 1, "wait 2; call ArtisFlyingPiouLogic",
- "passage right", "carpet middle", 1, "wait 2; call ArtisFlyingPiouLogic",
- ;
-
- firstmove "speed 200", "market_start";
- initnpctimer;
-
- .LastPlayerTouched = -1;
- end;
-}