summaryrefslogtreecommitdiff
path: root/npc/craft
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-05-27 18:52:06 -0300
committerJesusaves <cpntb1@ymail.com>2020-05-27 18:52:06 -0300
commit0cb0d4ccde67c89a8eb28a072788a92e9d8341d4 (patch)
treee7ecb183157595989ebc3133229fa88f57acdf86 /npc/craft
parent0db2b35019ae33924865641f745e389071e11175 (diff)
downloadserverdata-0cb0d4ccde67c89a8eb28a072788a92e9d8341d4.tar.gz
serverdata-0cb0d4ccde67c89a8eb28a072788a92e9d8341d4.tar.bz2
serverdata-0cb0d4ccde67c89a8eb28a072788a92e9d8341d4.tar.xz
serverdata-0cb0d4ccde67c89a8eb28a072788a92e9d8341d4.zip
[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
Diffstat (limited to 'npc/craft')
-rw-r--r--npc/craft/options.txt14
1 files changed, 13 insertions, 1 deletions
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);