diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-05-25 00:06:14 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-05-25 00:06:14 -0300 |
commit | ff9d0ccef4d0a494da2eae4e1f68a0bc0d1df25c (patch) | |
tree | 023f8ff699a713a291eb84f169301fb0a2fb38a2 /npc/craft/recipes.txt | |
parent | 0e815bf70a0ab74416b15c2384b935c1da0db271 (diff) | |
download | serverdata-ff9d0ccef4d0a494da2eae4e1f68a0bc0d1df25c.tar.gz serverdata-ff9d0ccef4d0a494da2eae4e1f68a0bc0d1df25c.tar.bz2 serverdata-ff9d0ccef4d0a494da2eae4e1f68a0bc0d1df25c.tar.xz serverdata-ff9d0ccef4d0a494da2eae4e1f68a0bc0d1df25c.zip |
Recipe System + Recipe Book + bugfix
Diffstat (limited to 'npc/craft/recipes.txt')
-rw-r--r-- | npc/craft/recipes.txt | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/npc/craft/recipes.txt b/npc/craft/recipes.txt index e388c794f..016d1ceec 100644 --- a/npc/craft/recipes.txt +++ b/npc/craft/recipes.txt @@ -36,18 +36,18 @@ OnUse: close; // Expects: @scope$ -// showRecipe( Craft, Bonus, {item 1, amount 1}, {item 2, amount 2}... ) +// showRecipe( Craft, Bonus, {amount 1, item 1}, {amount 2, item 2}... ) function showRecipe { if (getargcount() < 3 || getargcount() % 2 != 0 || @scope$ == "") return Exception("Faulty recipe skill command invoked - error"); // getd("$RECIPES_ALCHEMY_"+getcharid(2)+"["+getarg(0)+"]") - if (getd("RECIPES_"+@scope$+"["+getarg(0)+"]") { + if (getd("RECIPES_"+@scope$+"["+getarg(0)+"]")) { if (getarg(1)) { - mesn l(".:: @@ Recipe ::.", getitemlink(getarg(1))); + mes l(".:: @@ Recipe ::.", getitemlink(getarg(1))); for (.@i=2;.@i < getargcount(); .@i++) { - mesc l("@@/@@ @@", countitem(getarg(.@i)), getarg(.@i+1), getitemlink(getarg(.@i))); + mesc l("@@/@@ @@", countitem(getarg(.@i+1)), getarg(.@i), getitemlink(getarg(.@i+1))); .@i++; } mes ""; @@ -75,7 +75,7 @@ function readCooking { } // =============================== Cooking Functions -function readCooking { +function readAlchemy { setnpcdialogtitle l("Alchemy Recipes"); @scope$="ALCHEMY"; @@ -109,35 +109,35 @@ function readCooking { // Stats Boosts mesc "----------"+l("Stat Boost Recipes")+"----------", 2; showRecipe(CraftLukPotionA, LukPotionA, - 1, EmeraldPower, 1, HerbalTea); + 1, EmeraldPowder, 1, HerbalTea); showRecipe(CraftLukPotionB, LukPotionB, 1, Emerald, 2, HerbalTea); showRecipe(CraftLukPotionC, LukPotionC, 1, PolishedEmerald, 3, HerbalTea); showRecipe(CraftDexPotionA, DexPotionA, - 1, AmethystPower, 1, HerbalTea); + 1, AmethystPowder, 1, HerbalTea); showRecipe(CraftDexPotionB, DexPotionB, 1, Amethyst, 2, HerbalTea); showRecipe(CraftDexPotionC, DexPotionC, 1, PolishedAmethyst, 3, HerbalTea); showRecipe(CraftIntPotionA, IntPotionA, - 1, SapphirePower, 1, HerbalTea); + 1, SapphirePowder, 1, HerbalTea); showRecipe(CraftIntPotionB, IntPotionB, 1, Sapphire, 2, HerbalTea); showRecipe(CraftIntPotionC, IntPotionC, 1, PolishedSapphire, 3, HerbalTea); showRecipe(CraftVitPotionA, VitPotionA, - 1, DiamondPower, 1, HerbalTea); + 1, DiamondPowder, 1, HerbalTea); showRecipe(CraftVitPotionB, VitPotionB, 1, Diamond, 2, HerbalTea); showRecipe(CraftVitPotionC, VitPotionC, 1, PolishedDiamond, 3, HerbalTea); showRecipe(CraftAgiPotionA, AgiPotionA, - 1, TopazPower, 1, HerbalTea); + 1, TopazPowder, 1, HerbalTea); showRecipe(CraftAgiPotionB, AgiPotionB, 1, Topaz, 2, HerbalTea); showRecipe(CraftAgiPotionC, AgiPotionC, @@ -211,6 +211,15 @@ function script MakeBlueprint { array_push(.@recipes, CraftAgiPotionC); array_push(.@recipes, CraftVitPotionC); } + + // Now you'll learn some recipe! + .@rcp=any_of(.@recipes); + if (RECIPES_ALCHEMY[.@rcp]) + dispbottom l("It was a recipe you already knew..."); + else + dispbottom l("Learned a new recipe!"); + + RECIPES_ALCHEMY[.@rcp]=true; break; default: return Exception("Invalid blueprint type "+.@type+" - item was lost."); |