diff options
author | Fedja Beader <fedja@protonmail.ch> | 2025-01-11 21:19:41 +0000 |
---|---|---|
committer | Jesusalva Jesusalva <jesusalva@tmw2.org> | 2025-01-11 21:19:41 +0000 |
commit | 1170e3711cba8110f73e525274349286ee2418b7 (patch) | |
tree | 47cfb12ec86a520764d9d35eb2659ddc1aa48ea2 | |
parent | a8ab218df36032213e4fbf228385f35cc9269662 (diff) | |
download | serverdata-1170e3711cba8110f73e525274349286ee2418b7.tar.gz serverdata-1170e3711cba8110f73e525274349286ee2418b7.tar.bz2 serverdata-1170e3711cba8110f73e525274349286ee2418b7.tar.xz serverdata-1170e3711cba8110f73e525274349286ee2418b7.zip |
Piou isles Chef quest
Just the Chef part of !121
Generated with `f=./npc/006-2-5/pouf.txt; for i in {1..10}; do git rebase --autosquash --exec "if [ -f $f ]; then git rm -f $f; git commit -a --amend --no-edit; fi" HEAD~$i || break; done` and so on...
Co-Authored-By: +seeds <abby.hulka@gmail.com>
Co-Authored-By: Sean Hulka <sean.hulka@gmail.com>
Co-Authored-By: Jesusaves <jesusalva@tmw2.org>
Fix indent as ThinkSome asked
spaces2tabs + force 2space indents in comment section to keep it neat
Me, jes, test all agree that tabs>spaces :3
Fix typo
q2->q3 & q1->q2 to match Arkim's setup
Arkim-ize Glim daily
Forgot to forward-declare the function
Add some punctuation for our poor old eyes...
Is this less or more verbose than if & else if?
(also handles case if q > 3 for whatver reason)
Rename new Piou island quests LilitQuest->PiouQuest and shift IDs
Trim unused quest vars, shift ID up
Unshift, leave placeholders instead...
* Remove redundant delivery wait loop function and redistribute parts of it elsewhere
* What instance?
* More refactor
* Add PiouChef import
* spaces2tabs
* Re-indent headers
* Rename LilitQuest->PiouQuest & add to quest_db
* Piou isles quests
Co-Authored-By: +seeds <abby.hulka@gmail.com>
Co-Authored-By: Sean Hulka <sean.hulka@gmail.com>
Co-Authored-By: Jesusaves <jesusalva@tmw2.org>
Fix indent as ThinkSome asked
spaces2tabs + force 2space indents in comment section to keep it neat
Me, jes, test all agree that tabs>spaces :3
Fix typo
q2->q3 & q1->q2 to match Arkim's setup
Arkim-ize Glim daily
Forgot to forward-declare the function
Add some punctuation for our poor old eyes...
Is this less or more verbose than if & else if?
(also handles case if q > 3 for whatver reason)
Rename new Piou island quests LilitQuest->PiouQuest and shift IDs
Trim unused quest vars, shift ID up
Unshift, leave placeholders instead...
****
Co-authored-by: +seeds <abby.hulka@gmail.com>
Approved-by: Jesusalva Jesusalva <jesusalva@tmw2.org>
-rw-r--r-- | db/quest_db.conf | 5 | ||||
-rw-r--r-- | npc/006-2-1/_import.txt | 1 | ||||
-rw-r--r-- | npc/006-2-1/piouchef.txt | 131 |
3 files changed, 136 insertions, 1 deletions
diff --git a/db/quest_db.conf b/db/quest_db.conf index 6fe28eafa..111ad13e0 100644 --- a/db/quest_db.conf +++ b/db/quest_db.conf @@ -551,7 +551,10 @@ quest_db: ( Id: 246 Name: "PiouQuest_Glim" }, -// 247 PiouChef +{ + Id: 247 + Name: "PiouQuest_PiouChef" +}, // 248 Hatchling { Id: 249 diff --git a/npc/006-2-1/_import.txt b/npc/006-2-1/_import.txt index a29668d14..034300f49 100644 --- a/npc/006-2-1/_import.txt +++ b/npc/006-2-1/_import.txt @@ -6,5 +6,6 @@ "npc/006-2-1/glim.txt", "npc/006-2-1/lune.txt", "npc/006-2-1/miltaco.txt", +"npc/006-2-1/piouchef.txt", "npc/006-2-1/plum.txt", "npc/006-2-1/server.txt", diff --git a/npc/006-2-1/piouchef.txt b/npc/006-2-1/piouchef.txt new file mode 100644 index 000000000..3c3fea984 --- /dev/null +++ b/npc/006-2-1/piouchef.txt @@ -0,0 +1,131 @@ +// 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 chefSupplyList; + function chefGiveDelivery; + function chefClose; + + .@q1 = getq(PiouQuest_PiouChef); + + if (.q1 == 1) { + mesn; + mesq l("Did you bring the supplies?"); + next; + } + + mesn; + mesc l("The chef is muttering under his breath while kneading a pile of soft dough."); + next; + select + rif(.@q1 == 0, l("Do you need help with anything?")), + rif(.@q1 == 1, l("What did you want? I've forgotten.")), + rif(.@q1 == 1, l("Yes, I have them right here.")), + rif(.@q1 != 1, l("I better leave him to his work.")); + + mes ""; + + switch (@menu) { + case 1: + chefAssign(); + break; + case 2: + chefSupplyList(); + 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; + chefClose(); + 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 PiouQuest_PiouChef, 1; + chefSupplyList(); + chefClose(); + return; +} + +function chefSupplyList { + mesn; + mesq l("We need %d %s, %d %s, and %d %s for our regular stores and nesting materials, and %d %s 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(100000, 1226); + setq(PiouQuest_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("Now go away, %s! Can't you see I'm busy?", get_race()); + } + close; + return; +} + +OnInit: + .sex = G_OTHER; + .distance = 4; + end; +} |