diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-07-06 17:45:12 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-07-06 17:45:12 -0300 |
commit | 08cf44cb9cd6c940226caaf46ff57e61e09cb4b9 (patch) | |
tree | c32cd27343755f12438e1c6e6de61759dab2b6cb | |
parent | d66cdb876508417f898d88c20ecbd4c1bec01219 (diff) | |
download | serverdata-08cf44cb9cd6c940226caaf46ff57e61e09cb4b9.tar.gz serverdata-08cf44cb9cd6c940226caaf46ff57e61e09cb4b9.tar.bz2 serverdata-08cf44cb9cd6c940226caaf46ff57e61e09cb4b9.tar.xz serverdata-08cf44cb9cd6c940226caaf46ff57e61e09cb4b9.zip |
There is no real reason to have multiple recipe arrays.
I mean, findcraftentry does a better job tracking it down.
-rw-r--r-- | npc/008-2-16/stove.txt | 2 | ||||
-rw-r--r-- | npc/008-2-16/yannika.txt | 10 | ||||
-rw-r--r-- | npc/012-2-5/toichi.txt | 4 | ||||
-rw-r--r-- | npc/functions/crafting.txt | 2 | ||||
-rw-r--r-- | npc/functions/quest-debug/055-General_Cooking.txt | 14 | ||||
-rw-r--r-- | npc/items/recipes.txt | 30 |
6 files changed, 20 insertions, 42 deletions
diff --git a/npc/008-2-16/stove.txt b/npc/008-2-16/stove.txt index 91036c44..2ae17b67 100644 --- a/npc/008-2-16/stove.txt +++ b/npc/008-2-16/stove.txt @@ -52,7 +52,7 @@ { // Even if the recipe is right, if you don't have it on your // recipe book, it should be deemed invalid. - if (COOKING_RECIPES[.@entry]) + if (RECIPES[.@entry]) { usecraft .@craft; narrator diff --git a/npc/008-2-16/yannika.txt b/npc/008-2-16/yannika.txt index 7223b70c..22da3c63 100644 --- a/npc/008-2-16/yannika.txt +++ b/npc/008-2-16/yannika.txt @@ -10,7 +10,7 @@ // 0: Doesn't knows the quest // 1: Received the quest for the Cookbook // 2: Completed the quest for the Cookbook -// COOKING_RECIPES +// RECIPES // Controls which recipes you know and doesn't. // It is an array with Craft Constants. @@ -101,7 +101,7 @@ } delitem .@item1, .@ammo1; delitem .@item2, .@ammo2; - COOKING_RECIPES[.@craft]=true; + RECIPES[.@craft]=true; speech l("This is how you do it! HAAH!"); next; @@ -211,7 +211,7 @@ { case CommonCarp: case GrassCarp: - if (COOKING_RECIPES[CraftCarpSandwich]) + if (RECIPES[CraftCarpSandwich]) { speech lg("Haha, silly you! You already know the recipe! Read the @@ if you forgot!", getitemlink(RecipeBook)); @@ -223,7 +223,7 @@ break; case Manana: - if (COOKING_RECIPES[CraftMananaSandwich]) + if (RECIPES[CraftMananaSandwich]) { speech lg("Haha, silly you! You already know the recipe! Read the @@ if you forgot!", getitemlink(RecipeBook)); @@ -235,7 +235,7 @@ break; case PiouLegs: - if (COOKING_RECIPES[CraftPioulegSandwich]) + if (RECIPES[CraftPioulegSandwich]) { speech lg("Haha, silly you! You already know the recipe! Read the @@ if you forgot!", getitemlink(RecipeBook)); diff --git a/npc/012-2-5/toichi.txt b/npc/012-2-5/toichi.txt index d93b3405..c2ff6c78 100644 --- a/npc/012-2-5/toichi.txt +++ b/npc/012-2-5/toichi.txt @@ -30,10 +30,10 @@ function askCrafting { // Debug if (debug && @menu == 3) - RECIPES_EQUIPMENT[CraftInfantryHelmet]=!RECIPES_EQUIPMENT[CraftInfantryHelmet]; + RECIPES[CraftInfantryHelmet]=!RECIPES[CraftInfantryHelmet]; if (debug || @menu == 3) mesf("[DEBUG] Knows the infantry helmet recipe? %s", - (RECIPES_EQUIPMENT[CraftInfantryHelmet] ? "YES" : "NO")); + (RECIPES[CraftInfantryHelmet] ? "YES" : "NO")); mesn; mesq l("Sure, go ahead. But I'll charge you %d E per craft as commission!", .price); diff --git a/npc/functions/crafting.txt b/npc/functions/crafting.txt index df8f30bd..78fac20a 100644 --- a/npc/functions/crafting.txt +++ b/npc/functions/crafting.txt @@ -25,7 +25,7 @@ function script SmithSystem { if (.@entry < 0) { .success=false; } else { - if (!getarg(1, true) || if (RECIPES_EQUIPMENT[.@entry]) { + if (!getarg(1, true) || if (RECIPES[.@entry]) { // Player craft item and setup base variables usecraft .@craft; .@it=getcraftcode(.@entry); diff --git a/npc/functions/quest-debug/055-General_Cooking.txt b/npc/functions/quest-debug/055-General_Cooking.txt index ed9fb685..76e23b17 100644 --- a/npc/functions/quest-debug/055-General_Cooking.txt +++ b/npc/functions/quest-debug/055-General_Cooking.txt @@ -10,7 +10,7 @@ function script QuestDebug55 { mes "General_Cooking"; mes "---"; mes l("Quest state: @@", getq(General_Cooking)); - mes l("Known Recipes: @@", array_entries(COOKING_RECIPES)); + mes l("Known Recipes: @@", array_entries(RECIPES)); next; select @@ -33,14 +33,14 @@ function script QuestDebug55 { getitem RecipeBook, 1; break; case 5: - COOKING_RECIPES[CraftCarpSandwich]=true; - COOKING_RECIPES[CraftMananaSandwich]=true; - COOKING_RECIPES[CraftPioulegSandwich]=true; + RECIPES[CraftCarpSandwich]=true; + RECIPES[CraftMananaSandwich]=true; + RECIPES[CraftPioulegSandwich]=true; break; case 6: - COOKING_RECIPES[CraftCarpSandwich]=false; - COOKING_RECIPES[CraftMananaSandwich]=false; - COOKING_RECIPES[CraftPioulegSandwich]=false; + RECIPES[CraftCarpSandwich]=false; + RECIPES[CraftMananaSandwich]=false; + RECIPES[CraftPioulegSandwich]=false; break; } diff --git a/npc/items/recipes.txt b/npc/items/recipes.txt index ceec3be4..4a790c81 100644 --- a/npc/items/recipes.txt +++ b/npc/items/recipes.txt @@ -5,34 +5,12 @@ // Description: // Contains recipe books for Evol Online -// For RECIPES_EQUIPMENT (do not mistake with COOKING_RECIPES - different sys) // showRecipe( Craft, Bonus, {amount 1, item 1}, {amount 2, item 2}... ) function showRecipe { if (getargcount() < 3 || getargcount() % 2 != 0) return false;//Exception("Faulty recipe skill command invoked - error"); - if (getd("RECIPES_EQUIPMENT["+getarg(0)+"]")) { - if (getarg(1)) { - mes l(".:: %s Recipe ::.", getitemlink(getarg(1))); - - for (.@i=2;.@i < getargcount(); .@i++) { - mesc l("%d/%d %s", countitem(getarg(.@i+1)), getarg(.@i), getitemlink(getarg(.@i+1))); - .@i++; - } - mes ""; - } - return true; - } - return false; -} - -// For Cooking Recipes (completly parallel implementation) -// showCooking( Craft, Bonus, {amount 1, item 1}, {amount 2, item 2}... ) -function showCooking { - if (getargcount() < 3 || getargcount() % 2 != 0) - return false;//Exception("Faulty recipe skill command invoked - error"); - - if (getd("COOKING_RECIPES["+getarg(0)+"]")) { + if (getd("RECIPES["+getarg(0)+"]")) { if (getarg(1)) { mes l(".:: %s Recipe ::.", getitemlink(getarg(1))); @@ -85,17 +63,17 @@ function read_cooking { mes ""; mes ".:: " + l("Sandwiches") + " ::."; mes ""; - showCooking(CraftCarpSandwich, CarpSandwich, + showRecipe(CraftCarpSandwich, CarpSandwich, 1, Bread, 3, LettuceLeaf, 2, Cheese, 1, CommonCarp); - showCooking(CraftPioulegSandwich, PioulegSandwich, + showRecipe(CraftPioulegSandwich, PioulegSandwich, 1, Bread, 3, LettuceLeaf, 2, Cheese, 1, PiouLegs); - showCooking(CraftMananaSandwich, MananaSandwich, + showRecipe(CraftMananaSandwich, MananaSandwich, 1, Bread, 3, LettuceLeaf, 2, Cheese, |