summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2024-01-20 18:49:35 -0300
committerJesusaves <cpntb1@ymail.com>2024-01-20 18:49:35 -0300
commit0f698d4c834814b9747e25004ceaff02a8c5a834 (patch)
treeb29356de0312dc1ad9fe6b83490b942ce4ce7337
parenta3315ae304b9fc6d9ea73f3e9d1860989596ed52 (diff)
downloadserverdata-0f698d4c834814b9747e25004ceaff02a8c5a834.tar.gz
serverdata-0f698d4c834814b9747e25004ceaff02a8c5a834.tar.bz2
serverdata-0f698d4c834814b9747e25004ceaff02a8c5a834.tar.xz
serverdata-0f698d4c834814b9747e25004ceaff02a8c5a834.zip
You can now learn all recipes. But keep in mind: Flour is still unobtanium.
-rw-r--r--npc/002-1/chefgado.txt60
-rw-r--r--npc/009-2/ryan.txt57
-rw-r--r--npc/017-3/chef.txt75
-rw-r--r--npc/031-3/cook.txt2
-rw-r--r--npc/craft/cooking.txt4
5 files changed, 190 insertions, 8 deletions
diff --git a/npc/002-1/chefgado.txt b/npc/002-1/chefgado.txt
index a17a74e02..f0276111c 100644
--- a/npc/002-1/chefgado.txt
+++ b/npc/002-1/chefgado.txt
@@ -81,7 +81,7 @@ L_Reward:
inventoryplace CreasedGloves, 1;
delitem PiouLegs, 11;
getitem CreasedGloves, 1;
- setq ShipQuests_ChefGado,2;
+ setq ShipQuests_ChefGado, 2;
Zeny = Zeny + 100;
getexp 25, 5;
mes "";
@@ -93,13 +93,63 @@ L_Reward:
end;
L_Complete:
- .@r = rand2(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 salt?! This is sugar! Proper sailors need salt, not sugar!");
- if (.@r == 2) npctalk3 l("Are you going to stand here all day long? Go wash the dishes or go away.");
+ .@total = getq2(ShipQuests_ChefGado);
+ if (getskilllv(TMW2_COOKING) > .@total) goto L_Cooking;
+ switch (rand2(3)) {
+ case 0: npctalk3 l("What are you doing in my kitchen?! Get out, it's not a place for kids!"); break;
+ case 1: npctalk3 l("Where is the salt?! This is sugar! Proper sailors need salt, not sugar!"); break;
+ case 2: npctalk3 l("Are you going to stand here all day long? Go wash the dishes or go away."); break;
+ }
closedialog;
close;
+L_Cooking:
+ .@total = getq2(ShipQuests_ChefGado);
+ mesn;
+ mesq l("Wait. Stop there. You have the same smell as Ashley. Did you just receive some cooking lesson from her?");
+ next;
+ mesn;
+ mesq l("I wish to gouge on you but I own her a great deal, so I'll teach you a recipe for free. I work mostly with sea food... This includes %s by the way.", getitemlink(PoisonedDish));
+ next;
+
+ // Prepare a list of recipes you still haven't learned
+ if (!RECIPES_COOKING[CraftCarpSandwich])
+ array_push(.@recipes, CraftCarpSandwich);
+ if (!RECIPES_COOKING[CraftShellSandwich])
+ array_push(.@recipes, CraftShellSandwich);
+ if (!RECIPES_COOKING[CraftSushi])
+ array_push(.@recipes, CraftSushi);
+ if (!RECIPES_COOKING[CraftPoisonedDish])
+ array_push(.@recipes, CraftPoisonedDish);
+
+ // Check if there *are* recipes to be learned
+ if (!getarraysize(.@recipes)) {
+ mesn;
+ mesq l("But you'll have to wait I figure out a new recipe. This may take years so shoo, shoo! Get out of my sight!");
+ close;
+ }
+
+ // Decide on a random recipe that you'll now learn
+ array_shuffle(.@recipes);
+ .@new = array_pop(.@recipes);
+ // FIXME: Actually broken but who cares
+ .@const$ = data_to_string(.@new);
+ .@item = string_to_data(substr(.@const$, 5, getstrlen(.@const$) - 1));
+
+ // Actually teach you the recipe
+ setq2 ShipQuests_ChefGado, .@total + 1;
+ RECIPES_COOKING[.@new] = true;
+
+ // Some text so you know what you learned
+ mesn;
+ mesq l("So, today I'll teach you the %s recipe.", getitemlink(.@item));
+ next;
+ mesc l("Some time later...");
+ mes "";
+ mesn;
+ mesq l("Good. I also noted it down in your Recipe Book. The path of culinary is an arduous one but the fruits it yields are sweet!");
+ close;
+
OnInit:
.sex = G_MALE;
.distance = 4;
diff --git a/npc/009-2/ryan.txt b/npc/009-2/ryan.txt
index 79b6b96b3..2230c792f 100644
--- a/npc/009-2/ryan.txt
+++ b/npc/009-2/ryan.txt
@@ -28,9 +28,11 @@
next;
select
rif(countitem(TonoriDelight) >= .@a, l("I have everything!")),
+ rif(getskilllv(TMW2_COOKING), l("Actually, could you teach me some recipes?")),
l("Ah, not now...");
mes "";
- if (@menu == 2)
+ if (@menu == 2) goto L_Cooking;
+ if (@menu == 3)
close;
inventoryplace ChefHat, 1;
@@ -158,6 +160,59 @@ L_Prologue:
mesq l("There's a big prize in the end... Could you bring me some later?");
close;
+L_Cooking:
+ .@total = getq3(HalinarzoQuest_LifeDelight);
+ mesn;
+ mesq l("Hmmm? Oh, a true connoisseur, I see! That's a rare sight these days.");
+ next;
+ mesn;
+ mesq l("I certainly can teach you some recipes. I work mostly with dessert-like plates. This includes %s by the way.", getitemlink(ZombieNachos));
+ next;
+ .@q=getq2(HalinarzoQuest_LifeDelight);
+ .@min = 10 * .@total + 20;
+ if (.@q < .@min) {
+ mesn;
+ mesq l("If you fulfill my request for %s %d more times, I'll gladly impart a new recipe with you.", getitemlink(TonoriDelight), (.@min - .@q));
+ close;
+ }
+ // Prepare a list of recipes you still haven't learned
+ if (!RECIPES_COOKING[CraftCaramelApple])
+ array_push(.@recipes, CraftCaramelApple);
+ if (!RECIPES_COOKING[CraftFruitSalad])
+ array_push(.@recipes, CraftFruitSalad);
+ if (!RECIPES_COOKING[CraftZombieNachos])
+ array_push(.@recipes, CraftZombieNachos);
+ if (!RECIPES_COOKING[CraftPancake])
+ array_push(.@recipes, CraftPancake);
+
+ // Check if there *are* recipes to be learned
+ if (!getarraysize(.@recipes)) {
+ mesn;
+ mesq l("...Except that I already told you everything I knew. So I wish you luck in your cooking journey!");
+ close;
+ }
+
+ // Decide on a random recipe that you'll now learn
+ array_shuffle(.@recipes);
+ .@new = array_pop(.@recipes);
+ // FIXME: Actually broken but who cares
+ .@const$ = data_to_string(.@new);
+ .@item = string_to_data(substr(.@const$, 5, getstrlen(.@const$) - 1));
+
+ // Actually teach you the recipe
+ setq3 HalinarzoQuest_LifeDelight, .@total + 1;
+ RECIPES_COOKING[.@new] = true;
+
+ // Some text so you know what you learned
+ mesn;
+ mesq l("So, today I'll teach you the %s recipe.", getitemlink(.@item));
+ next;
+ mesc l("Some time later...");
+ mes "";
+ mesn;
+ mesq l("Good. I also noted it down in your Recipe Book. The path of culinary is an arduous one but the fruits it yields are sweet!");
+ close;
+
OnInit:
.@npcId = getnpcid(.name$);
setunitdata(.@npcId, UDT_HEADTOP, ChefHat);
diff --git a/npc/017-3/chef.txt b/npc/017-3/chef.txt
index d6f7db1da..a414fbecb 100644
--- a/npc/017-3/chef.txt
+++ b/npc/017-3/chef.txt
@@ -14,6 +14,7 @@
goto L_Busy;
L_Busy:
+ if (getskilllv(TMW2_COOKING) < 0) goto L_Cooking;
mesn;
mesq l("I'm too busy right now to talk. Dimond's recipes are the best!");
close;
@@ -57,6 +58,80 @@ L_Report:
}
close;
+L_Cooking:
+ .@total = getq2(LoFQuest_ButcherKnife);
+ mesn;
+ mesq l("Hmm hmm, do you perhaps know the true wonders of the Art of Cooking, are you perchance worthy of my skills?");
+ next;
+ mesn;
+ mesq l("If so, I may be able to offer you a fair trade and a fair deal for a new recipe for you. My theme are meat dishes. This includes %s by the way.", getitemlink(PepperoniPizza));
+ next;
+ switch (.@total) {
+ case 0:
+ mesn;
+ mesq l("I want a S-rank card, like %s, any of them can do.", getitemlink(rand2(5041, 5052)));
+ mes "##B" + l("Drag and drop an item from your inventory.") + "##b";
+
+ .@id = requestitem();
+ if (.@id < 5041 || .@id > 5052)
+ close;
+ delitem .@id, 1;
+ break;
+ case 1:
+ mesn;
+ mesq l("I want a X-rank card, like %s, any of them can do.", getitemlink(rand2(5053, 5064)));
+ mes "##B" + l("Drag and drop an item from your inventory.") + "##b";
+
+ .@id = requestitem();
+ if (.@id < 5053 || .@id > 5064)
+ close;
+ delitem .@id, 1;
+ break;
+ case 2:
+ mesn;
+ mesq l("I want a ★★★★★ mercenary card, like %s, any of them can do.", getitemlink(rand2(7510, 7513)));
+ mes "##B" + l("Drag and drop an item from your inventory.") + "##b";
+
+ .@id = requestitem();
+ if (.@id < 7510 || .@id > 7513)
+ close;
+ delitem .@id, 1;
+ break;
+ default:
+ mesn;
+ mesq l("But there's nothing I want from you, so get going and come back in a couple years, I might have a new recipe by then. %%2");
+ close;
+ }
+ // Grant you a recipe, NO FAILSAFE, EXPLODE DRAMATICALLY IF CHEATING
+ if (!RECIPES_COOKING[CraftPepperoniPizza])
+ array_push(.@recipes, CraftPepperoniPizza);
+ if (!RECIPES_COOKING[CraftChickenSandwich])
+ array_push(.@recipes, CraftChickenSandwich);
+ if (!RECIPES_COOKING[CraftSteakAndEggs])
+ array_push(.@recipes, CraftSteakAndEggs);
+
+ // Check skipped: I want script to explode if cheating was made
+ // Skip straight to deciding on a random recipe that you'll now learn
+ array_shuffle(.@recipes);
+ .@new = array_pop(.@recipes);
+ // FIXME: Actually broken but who cares
+ .@const$ = data_to_string(.@new);
+ .@item = string_to_data(substr(.@const$, 5, getstrlen(.@const$) - 1));
+
+ // Actually teach you the recipe
+ setq2 LoFQuest_ButcherKnife, .@total + 1;
+ RECIPES_COOKING[.@new] = true;
+
+ // Some text so you know what you learned
+ mesn;
+ mesq l("So, today I'll teach you the %s recipe.", getitemlink(.@item));
+ next;
+ mesc l("Some time later...");
+ mes "";
+ mesn;
+ mesq l("Good. I also noted it down in your Recipe Book. The path of culinary is an arduous one but the fruits it yields are sweet!");
+ close;
+
/*
.@q=getq(TulimsharQuest_Kadiya);
if ((.@q == 9) && (countitem ("MopoxCurePotion") > 0))
diff --git a/npc/031-3/cook.txt b/npc/031-3/cook.txt
index fd41d07c5..432e5d023 100644
--- a/npc/031-3/cook.txt
+++ b/npc/031-3/cook.txt
@@ -19,7 +19,7 @@
.@lv = getskilllv(TMW2_COOKING);
.@price = 5000 + (25000 * .@lv);
mesn;
- mesq l("As you're wearing one, I can acknowledge you as a %s being and tell you that I'll be charging you %s GP and that you need to have finished %d/%d%% of the quests in this town.", get_race(), fnum(.@price), reputation("Aethyr"), .@lv*20);
+ mesq l("As you're wearing one, I can acknowledge you as a %s being and tell you that I'll be charging you %s GP and that you need to have finished %d/%02d%% of the quests in this town.", get_race(), fnum(.@price), reputation("Aethyr"), .@lv*20);
if (Zeny < .@price) close;
if (reputation("Aethyr") < .@lv*20) close;
next;
diff --git a/npc/craft/cooking.txt b/npc/craft/cooking.txt
index efc29acc5..b95405387 100644
--- a/npc/craft/cooking.txt
+++ b/npc/craft/cooking.txt
@@ -22,6 +22,7 @@ function script CookingSystem {
setskin "craft3";
.@var$ = requestcraft(6); // ?????
+ setskin "";
.@craft = initcraft(.@var$);
.@entry = findcraftentry(.@craft, CRAFT_COOKING); // ??????
if (debug || $@GM_OVERRIDE) mes "found craft entry: " + .@entry;
@@ -38,7 +39,8 @@ function script CookingSystem {
}
usecraft(.@craft);
.@it=getcraftcode(.@entry);
- .@tm=limit(3600, getiteminfo(.@it, ITEMINFO_SELLPRICE) * getskilllv(TMW2_COOKING), 86400);
+ .@bt=min(1500, getiteminfo(.@it, ITEMINFO_SELLPRICE)) * 10; // basetime
+ .@tm=limit(3600, .@bt * getskilllv(TMW2_COOKING), 86400);
if (countitem(.@it)) {
mesc l("Skipping seasoning: You have multiple %s.", getitemlink(.@it));