summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-08-05 14:52:47 -0300
committerJesusaves <cpntb1@ymail.com>2020-08-05 14:52:47 -0300
commit7fcbbae35d1bc88c9e384dceef6a323f40128151 (patch)
treec4be9a50c076f63588fb8e724b4a62b7cea33837 /npc
parent4fbf9f30dd64fdeb299654394ccf18da5007b693 (diff)
downloadserverdata-7fcbbae35d1bc88c9e384dceef6a323f40128151.tar.gz
serverdata-7fcbbae35d1bc88c9e384dceef6a323f40128151.tar.bz2
serverdata-7fcbbae35d1bc88c9e384dceef6a323f40128151.tar.xz
serverdata-7fcbbae35d1bc88c9e384dceef6a323f40128151.zip
Fix bugs on Duck Elder
Diffstat (limited to 'npc')
-rw-r--r--npc/018-5-4/elder.txt106
1 files changed, 59 insertions, 47 deletions
diff --git a/npc/018-5-4/elder.txt b/npc/018-5-4/elder.txt
index 6ed4b4db4..13e907590 100644
--- a/npc/018-5-4/elder.txt
+++ b/npc/018-5-4/elder.txt
@@ -11,6 +11,7 @@
018-5-4,28,73,0 script Duck Elder NPC_DUCK_ELDER,{
function elderQuest;
+ function elderSupplyMenu;
function elderSupplyList;
function elderSupplyGive;
function elderPirateAttack;
@@ -19,17 +20,18 @@
function elderPirateReward;
function elderAbout;
function elderAboutSarah;
+ function elderInitiate;
function elderClose;
.@q=getq(LilitQuest_PiratesOfSARAH);
mesn;
mesq l("Hello %s. What brings you here?", get_race());
next;
select
- rif (.@q == 0, l("I've heard tidings of strange goings-on in this area...")),
- rif (.@q == 1, l("I'm here to help you restock...")),
- rif (.@q == 2, l("What did the Council of Elders say? Is there any news of the pirates?")),
- rif (.@q == 3, l("Have the pirates been routed? Will they return?")),
- rif (.@q == 4, l("I'm here as an Initiate. May I enter Duck Dungeon?")),
+ rif(.@q == 0, l("I've heard tidings of strange goings-on in this area...")),
+ rif(.@q == 1, l("I'm here to help you restock...")),
+ rif(.@q == 2, l("What did the Council of Elders say? Is there any news of the pirates?")),
+ rif(.@q == 3, l("Have the pirates been routed? Will they return?")),
+ rif(.@q == 4, l("I'm here as an Initiate. May I enter Duck Dungeon?")),
l("Oh, I'm just exploring. What can you tell me about this island?"),
l("I came to enjoy a beautiful day with some ducks!");
mes "";
@@ -38,9 +40,21 @@
elderQuest();
break;
case 2:
+ elderSupplyMenu();
+ break;
+ case 3:
+ elderPirateAttack();
+ break;
+ case 4:
+ elderPirateReward();
+ break;
+ case 5:
+ elderInitiate();
+ break;
+ case 6:
elderAbout();
// fallthrough
- case 3:
+ default:
elderClose();
break;
}
@@ -54,52 +68,42 @@ function elderQuest {
elderClose();
return;
}
- .@q = getq(LilitQuest_PiratesOfSARAH);
- switch (.@q) {
- case 0:
- 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_PiratesOfSARAH, 1;
- elderSupplyList();
- break;
+ 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_PiratesOfSARAH, 1;
+ elderSupplyList();
+ elderClose();
+ return;
+}
+
+function elderSupplyMenu {
+ 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:
- 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:
- elderSupplyGive();
- break;
- case 2:
- elderSupplyList();
- break;
- case 3:
- close;
- break;
- }
+ elderSupplyGive();
break;
case 2:
- elderPirateAttack();
+ elderSupplyList();
break;
case 3:
- elderPirateReward();
- break;
- case 4:
- mesn;
- mesq l("We are deliberating. Some do not... approve of your initiation. Leave.");
- mesc "* "+l("Kolchak and dangerDuck are working to finish Duck Dungeon. Contact them for updates...");
+ elderClose();
+ close;
break;
- }
- close;
+ }
+ } while (true);
return;
}
@@ -112,8 +116,9 @@ function elderSupplyList {
mesq l("%d/%d %s", countitem(FishBox), 20, getitemlink(FishBox));
mesq l("%d/%d %s", countitem(CrystallizedMaggot), 1, getitemlink(CrystallizedMaggot));
next;
+ mesn;
mesq l("Of course, we'll find a way to reward you for your efforts.");
- close;
+ next;
return;
}
@@ -326,6 +331,13 @@ function elderPirateReward {
return;
}
+function elderInitiate {
+ mesn;
+ mesq l("We are deliberating. Some do not... approve of your initiation. Leave.");
+ mesc "* "+l("Kolchak and dangerDuck are working to finish Duck Dungeon. Contact them for updates...");
+ return;
+}
+
function elderAbout {
mesn;
mesq l("This is Duck Island, the last safe refuge for birds. Ducks tend to be very peaceful, but our young ruler, King DD, has been taken up with the art of war.");