diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-06-01 00:12:49 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-06-01 00:12:49 -0300 |
commit | d50d2cf473f3218cff0fc110c44c55ab459268e1 (patch) | |
tree | 0828e1e41af3b911a9f5cc96b6d5d9b825df8c35 | |
parent | 2590d9f400cbafb16590b87f0a2ccf133da00181 (diff) | |
download | serverdata-d50d2cf473f3218cff0fc110c44c55ab459268e1.tar.gz serverdata-d50d2cf473f3218cff0fc110c44c55ab459268e1.tar.bz2 serverdata-d50d2cf473f3218cff0fc110c44c55ab459268e1.tar.xz serverdata-d50d2cf473f3218cff0fc110c44c55ab459268e1.zip |
Register on relevant scripts, the equipment recipes
-rw-r--r-- | db/craft_db.conf | 2 | ||||
-rw-r--r-- | npc/craft/recipes.txt | 58 |
2 files changed, 58 insertions, 2 deletions
diff --git a/db/craft_db.conf b/db/craft_db.conf index 5d9001bf7..3abcb874d 100644 --- a/db/craft_db.conf +++ b/db/craft_db.conf @@ -738,7 +738,7 @@ craft_db: ( Name: "CraftBacksword" Flag: 16 ReturnCode: 3504 - //ShortGladius + //Backsword SourceItems: ( { diff --git a/npc/craft/recipes.txt b/npc/craft/recipes.txt index 99a1d6e8d..e53a08155 100644 --- a/npc/craft/recipes.txt +++ b/npc/craft/recipes.txt @@ -157,7 +157,30 @@ function readCrafting { next; mesc l("List of known crafting recipes:"); mes ""; - showRecipe(0, Iten, WarpedLog, 9999); + // Weapons + mesc "----------"+l("Weapon Recipes")+"----------", 2; + showRecipe(CraftWoodenSword, WoodenSword, + 20, WoodenLog, + 5, RawLog, + 1, SharpKnife); + showRecipe(CraftBugSlayer, BugSlayer, + 8, IronIngot, + 12, Coal, + 1, EverburnPowder); + showRecipe(CraftShortGladius, ShortGladius, + 12, IronIngot, + 16, Coal, + 1, EverburnPowder); + showRecipe(CraftBacksword, Backsword, + 18, IronIngot, + 3, TinIngot, + 20, Coal, + 1, EverburnPowder); + showRecipe(CraftShortsword, ShortSword, + 24, IronIngot, + 5, TinIngot, + 24, Coal, + 1, EverburnPowder); next; @scope$=""; return; @@ -178,6 +201,9 @@ function script MakeBlueprint { .@rarity=getarg(1, 1); switch (.@type) { + ///////////////////////////////////////////////////// + ///// Alchemy Recipes + ///////////////////////////////////////////////////// case CRAFT_ALCHEMY: if (.@rarity & CRAFT_BASIC) { array_push(.@recipes, CraftPiberriesInfusion); @@ -222,6 +248,36 @@ function script MakeBlueprint { RECIPES_ALCHEMY[.@rcp]=true; } break; + ///////////////////////////////////////////////////// + ///// Equipment Recipes + ///////////////////////////////////////////////////// + case CRAFT_EQUIPMENT: + if (.@rarity & CRAFT_BASIC) { + array_push(.@recipes, CraftWoodenSword); + } + if (.@rarity & CRAFT_INTERMEDIARY) { + array_push(.@recipes, CraftBugSlayer); + } + if (.@rarity & CRAFT_ADVANCED) { + array_push(.@recipes, CraftShortGladius); + } + if (.@rarity & CRAFT_EXPERT) { + array_push(.@recipes, CraftBacksword); + } + if (.@rarity & CRAFT_MASTER) { + array_push(.@recipes, CraftShortsword); + } + + // Now you'll learn some recipe! + .@rcp=any_of(.@recipes); + if (RECIPES_EQUIPMENT[.@rcp]) { + dispbottom l("It was a recipe you already knew..."); + getexp (BaseLevel+JobLevel)*rand(1,.@rarity), JobLevel+rand(1,.@rarity); + } else { + dispbottom l("Learned a new recipe!"); + RECIPES_EQUIPMENT[.@rcp]=true; + } + break; default: return Exception("Invalid blueprint type "+.@type+" - item was lost."); } |