diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-07-06 18:20:15 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-07-06 18:20:15 -0300 |
commit | bccc68f1c8c50195cf660e9aebfb3b44498460e8 (patch) | |
tree | 09003875d445f26e9db86d131de0be2ab8d106a1 | |
parent | a03d0a9bc1c91d11da9e4430393834b1a319328a (diff) | |
download | serverdata-bccc68f1c8c50195cf660e9aebfb3b44498460e8.tar.gz serverdata-bccc68f1c8c50195cf660e9aebfb3b44498460e8.tar.bz2 serverdata-bccc68f1c8c50195cf660e9aebfb3b44498460e8.tar.xz serverdata-bccc68f1c8c50195cf660e9aebfb3b44498460e8.zip |
Missin code
-rw-r--r-- | npc/items/recipes.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/npc/items/recipes.txt b/npc/items/recipes.txt index 98e39f4a..e85bf2ba 100644 --- a/npc/items/recipes.txt +++ b/npc/items/recipes.txt @@ -168,6 +168,22 @@ function script MakeBlueprint { // ---------------------------------- } + + // We now (maybe) have a .@recipes array set + .@rcp=any_of(.@recipes); + + // Double precision failsafe + if (RECIPES[.@rcp]) + .@rcp=any_of(.@recipes); + + // Learn the recipe or lose the item (and gain some EXP) + if (RECIPES_[.@rcp]) { + dispbottom l("It was a recipe you already knew..."); + getexp (BaseLevel+JobLevel)*rand2(1,.@rarity), JobLevel+rand2(1,.@rarity); + } else { + dispbottom l("Learned a new recipe!"); + RECIPES[.@rcp]=true; + } return; } |