summaryrefslogtreecommitdiff
path: root/npc/craft
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2024-01-20 11:49:57 -0300
committerJesusaves <cpntb1@ymail.com>2024-01-20 11:49:57 -0300
commit03cbbf5e2ba23f9714baf42df157c0001599fb85 (patch)
tree6ec7d8a8183a5ac8034ffe08170c91d86ad5a97d /npc/craft
parentd786c3b3977ef72b4b64248099274dd79b642258 (diff)
downloadserverdata-03cbbf5e2ba23f9714baf42df157c0001599fb85.tar.gz
serverdata-03cbbf5e2ba23f9714baf42df157c0001599fb85.tar.bz2
serverdata-03cbbf5e2ba23f9714baf42df157c0001599fb85.tar.xz
serverdata-03cbbf5e2ba23f9714baf42df157c0001599fb85.zip
This is the initial version of Cooking System (work in progress).
In particular: - You cannot learn how to cook - You cannot learn any recipe - You cannot make flour - You cannot cook Fruit Salad, Zombie Nachos nor Pancake This also introduces changes to drops, as well as new items, incl. Donuts. Partly Tested.
Diffstat (limited to 'npc/craft')
-rw-r--r--npc/craft/cooking.txt132
-rw-r--r--npc/craft/price.txt13
-rw-r--r--npc/craft/recipes.txt13
3 files changed, 157 insertions, 1 deletions
diff --git a/npc/craft/cooking.txt b/npc/craft/cooking.txt
new file mode 100644
index 000000000..0ec3ee1f8
--- /dev/null
+++ b/npc/craft/cooking.txt
@@ -0,0 +1,132 @@
+// TMW2 Script
+// Author:
+// Jesusalva, Micksha, Meway
+// Description:
+// Cooking System (Player, Guild, NPC)
+
+// Usage: CookingSystem ({scope})
+// Scopes: CRAFT_NPC, CRAFT_PLAYER
+// If an invalid scope is passed, .knowledge won't be set but will be required
+// Returns true on success, false on failure
+function script CookingSystem {
+ // Set .scope, .knowledge and .success
+ .scope=getarg(0, CRAFT_PLAYER);
+ if (.scope == CRAFT_PLAYER) {
+ if (!getskilllv(TMW2_COOKING)) {
+ mesc l("You don't know how to cook."), 1;
+ return false;
+ }
+ copyarray(.knowledge,RECIPES_COOKING,getarraysize(RECIPES_COOKING));
+ }
+ .success=false;
+
+ setskin "craft3";
+ .@var$ = requestcraft(6); // ?????
+ .@craft = initcraft(.@var$);
+ .@entry = findcraftentry(.@craft, CRAFT_COOKING); // ??????
+ if (debug || $@GM_OVERRIDE) mes "found craft entry: " + .@entry;
+ if (debug || $@GM_OVERRIDE) mes "knowledge value: " + .knowledge[.@entry];
+ if (.@entry < 0) {
+ .success=false;
+ } else {
+ if (.scope == CRAFT_NPC || .knowledge[.@entry]) {
+ .@s=validatecraft(.@craft);
+ // Could not validate (not enough resources)
+ if (!.@s) {
+ mesc l("Not crafting - insufficient materials!"), 1;
+ return false;
+ }
+ usecraft(.@craft);
+ .@it=getcraftcode(.@entry);
+ .@tm=limit(3600, getiteminfo(.@it, ITEMINFO_SELLPRICE) * getskilllv(TMW2_COOKING), 86400);
+ rentitem(.@it, .@tm); // From 1 hour to 1 day
+ // getskilllv(TMW2_COOKING) → and in theory, we can apply options
+ .success=true;
+ } else {
+ .success=false;
+ }
+ }
+ deletecraft .@craft;
+ setskin "";
+ return .success;
+}
+
+/*
+Alchemy can rely in cross-building
+Where a weaker potion is base for a stronger one
+Standard Duration = 2 minutes ~ 5 minutes
+
+Reagents:
+ Water
+ ...Eggs?
+ ...Milk?
+ Nymph Poison
+ Death Potion
+ Manapple
+
+Products:
+ Tea (Chamomile, Spearmint, Oolong, Jasmine, Yerba Mate?)
+ → Argaes Water + «Herbal Reagent»
+OK Coffee (Shadow Herb + Tonori Water)
+OK Piberries Infusion (Piberries + Curshroom)
+OK Atropos Mixture (Lachesis Brew + Clotho Liquor)
+OK Death Potion (Dragonfruit + Nightshade Tea)
+OK Smoke Grenade (Cactus pot + Coal)
+OK Grenade (Cactus pot + Sulfur Powder)
+OK Scented Grenade (Cactus pot + Moss)
+OK Haste Potion (Plushshroom)
+OK Strength Potion (Chagashroom)
+ Return Potion (Hurnscald Recipe => Ocean Croc Claw + Hard Spike? Grass Seeds?)
+OK Status Reset (Curshroom + Mana Piou Feather)
+OK Homun Stat Reset (Curshroom + Manapple)
+OK Move Speed (Gem Powder + Fluor Powder)
+OK Precision (Piberries + Mt. Snake Egg)
+OK Dodge Potion (Piberries + Snake Egg)
+OK Luck, Dex, Int, Vit, Agi (Gems + Tea)
+OK Sacred Life (Golden Apple + Elixir of Life)
+OK Sacred Mana (Golden Apple + Celestia Tea)
+OK Sacred Revival (Sacred Life + Sacred Mana)
+OK Broken Warp Crystal? (Wurtizite + Black Mamba Skin)
+OK Magic Apple? (Divine Apple + Manapple? Death Potion? Sacred Life/Revival?)
+OK Purification Potion (Nymph Poison + Sacred Life)
+OK Iced Bottle (Tonori W. + Argaes W.)
+OK Insurance Contract (» Insurance?) (Quill + Reed Bundle)
+OK Insurance (Quill + Death Potion)
+ Mysterious Fruit? (Legendary)
+
+For all Scrolls: Quill + ? (depends on scroll itself)
+ » Summon Scrolls (Based on mob parts, 1× mob?)
+ → alignment_cansummon() + SummonMagic() or summon() directly
+ → Criteria between weak/strong version is alignment
+ → When aligned, scrolls always summon strongest ver
+ → Level must be equal or superior to strongest, tho
+ » Maggot/Giant Maggot: Bug Leg (Lv 40)
+ » CaveMaggot: Maggot Slime
+ » Green Dragon/Nightmare: Dragon Scales (Lv 105)
+ » Wolvern: Wolvern Pelt
+ » Moggun/Yeti: Frozen Yeti Tear (Lv 60)
+ » Terranite/T.Prot.: Terranite Ore (Lv 90)
+ » Magnus Heal (Lifestone)
+ » Area Provoke? → Scent grenade?
+ » Guild Skills?
+OK » ScrollAngelLightA ( + )
+OK » ScrollBattlePlansA ( + )
+OK » ScrollDefenseBlessA ( + )
+OK » ScrollCriticalFortuneA ( + )
+ → TODO: Kyrie Eleison (Absolute Shield)
+ → With self-stun, makes you a temporary wall?
+ → Maybe a item of Quill + LoF Coin for guild skills? (LoF Quill)
+
+ // Skills for Aegis Shield, all beyond maximum level
+ // Slimes, Snakes, Fairies, Darth Duck, Mr. Prickel
+ // PoisonS.Mushroom
+ // TODO: Lizards, (Black)Scorpions, Moonshroom, Black Mamba, Centaur
+ skill TMW2_HALHISS, 10;
+ skill TMW2_KALSPIKE, 9;
+ skill TMW2_LIMERIZER, 10;
+ skill TMW2_FAIRYKINGDOM, 9;
+ skill TMW2_DUCKY, 10;
+ skill TMW2_FAIRYEMPIRE, 10;
+
+*/
+
diff --git a/npc/craft/price.txt b/npc/craft/price.txt
index ba40f95e8..7cc755029 100644
--- a/npc/craft/price.txt
+++ b/npc/craft/price.txt
@@ -96,6 +96,19 @@ function script fix_cPrice {
// TODO: Scrolls? Reagents?
// And reagents should happen before potions
+ // Fix cooked food prices
+ _fix_cPrice(PepperoniPizza, 9999);
+ _fix_cPrice(CaramelApple, 9999);
+ _fix_cPrice(CarpSandwich, 9999);
+ _fix_cPrice(ShellSandwich, 9999);
+ _fix_cPrice(ChickenSandwich, 9999);
+ _fix_cPrice(Sushi, 9999);
+ _fix_cPrice(SteakAndEggs, 9999);
+ _fix_cPrice(FruitSalad, 9999);
+ _fix_cPrice(PoisonedDish, 9999);
+ _fix_cPrice(ZombieNachos, 9999);
+ _fix_cPrice(Pancake, 9999);
+
// And weapons
_fix_cPrice(WoodenSword);
_fix_cPrice(BugSlayer);
diff --git a/npc/craft/recipes.txt b/npc/craft/recipes.txt
index 423bca93b..3d819e654 100644
--- a/npc/craft/recipes.txt
+++ b/npc/craft/recipes.txt
@@ -107,11 +107,22 @@ function readCooking {
@scope$="COOKING";
mesc l("Eating is a necessity, but cooking is an art.");
+ mesc l("NOTE: Cooked Food will expire some time after its cooked."), 1;
mesc l("(All items must be placed exactly in this order.)");
next;
mesc l("List of known cooking recipes:");
mes "";
- //showRecipe(0, Iten, WarpedLog, 9999);
+ showRecipe(PepperoniPizza,
+ CaramelApple,
+ CarpSandwich,
+ ShellSandwich,
+ ChickenSandwich,
+ Sushi,
+ SteakAndEggs,
+ FruitSalad,
+ PoisonedDish,
+ ZombieNachos,
+ Pancake);
next;
@scope$="";
return;