|
|
Thread Tools | Display Modes |
Member
Join Date: Jul 2015
Location: Ottawa
Posts: 58
|
Ok, another one. I've got an item that needs to be able to substitute the normal Str bonus to melee attacks with the Dex bonus instead. Here's the script I've written for the item to (not ) do this:
Code:
~ "Precision Assault" Use Dex instead of Str for attacks ~ If we're not enabled, get out now. doneif (field[gIsEquip].value = 0) var HD as number HD = hero.tagcount[Hero.HitDice] + 2 var Rit as number Rit = field[Value].value var vDex as number vDex = hero.child[aDEX].field[aModBonus].value var vStr as number vStr = hero.child[aSTR].field[aModBonus].value var Diff as number Diff = vDex - vStr ~ Change our base attack bonus. if (HD >= 5) then if (Rit >= 1) then hero.child[Attack].field[tAtkMelee].value += Diff endif endif Best I can think of, my script is firing in the wrong place. right now, I've tried both Pre-levels 10000 and Post-levels 10000. Both places work for a hard-coded amount, but not a variable amount. Any suggestions what I've done wrong? Thanks! |
#1 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
|
#2 |
|
|