From 0cb0d4ccde67c89a8eb28a072788a92e9d8341d4 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 27 May 2020 18:52:06 -0300 Subject: [Blacksmith Axe] will now affect crafting like this: +4% success chance when tweaking/crafting +0.75% chance of additional bonuses -0.75% chance of penalties --- npc/craft/options.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'npc/craft') diff --git a/npc/craft/options.txt b/npc/craft/options.txt index e63b2eac4..c04fe4e62 100644 --- a/npc/craft/options.txt +++ b/npc/craft/options.txt @@ -20,6 +20,13 @@ // use getarraysize(@csys_attr) to know how many are there. // Players can active the bonus groups they want to use +// csys_equip( ) +// Returns a bonus from equips (max: 1) +function script csys_equip { + // Same as: isequippedcnt(BlacksmithAxe{, BlacksmithHelmet, etc.}) + return (getequipid(EQI_HAND_R) == BlacksmithAxe); +} + // csys_Generate( cr_id{, preserve} ) // Return average level function script csys_Generate { @@ -342,6 +349,11 @@ function script csys_Check { // Base Success Rate is: 40% + 5% each craft skill level .@base+=(getskilllv(TMW2_CRAFT)*500); + + // Bonus from equips: 4% each + .@base+=csys_equip()*400; + + // Make the roll if (rand(10000) < .@base) return true; return false; @@ -445,7 +457,7 @@ function script csys_BonusCalc { // csys_Apply( invindex{, lvl, scope} ) function script csys_Apply { .@id=getarg(0); - .@lv=getarg(1, getskilllv(TMW2_CRAFT)); + .@lv=getarg(1, getskilllv(TMW2_CRAFT))+csys_equip(); .@sc=getarg(2, CRAFTSYS_CURRENT); .@lv2=csys_Generate(.@sc); -- cgit v1.2.3-70-g09d2