So I am trying to make my own attack -defence system and on the regular attack I have this formula
attB = a.atk + a.agi ; rol = 1 + rand(20) + attB ; if rol > b.def ; 1 + rand(4) ; else ;0 ; end; #or I write it like this... attB = a.atk + a.agi ; rol = 1 + rand(20) + attB ; rol > b.def ? (1 + rand(5)) : 0 However I want to be able to change the rand(4) to Rand(6) when the player holds a Rapier or shortsword weapon and then to rand(8) if he equips a Longsword or Morningstar etc. (there are other things I want to do as well)
I know how to do this, however the Damage formula line restricts me to a specific number of characters.
So how can I make the damage formula run a script?
Then how can I return the value from the script?
I really need your help...
EDIT: Even though the question I ask at this post is answered, I encounter a problem with the formula... So my problem continues here : http://forums.rpgmakerweb.com/index.php?/topic/40773-problem-with-a-script/
attB = a.atk + a.agi ; rol = 1 + rand(20) + attB ; if rol > b.def ; 1 + rand(4) ; else ;0 ; end; #or I write it like this... attB = a.atk + a.agi ; rol = 1 + rand(20) + attB ; rol > b.def ? (1 + rand(5)) : 0 However I want to be able to change the rand(4) to Rand(6) when the player holds a Rapier or shortsword weapon and then to rand(8) if he equips a Longsword or Morningstar etc. (there are other things I want to do as well)
I know how to do this, however the Damage formula line restricts me to a specific number of characters.
So how can I make the damage formula run a script?
Then how can I return the value from the script?
I really need your help...
EDIT: Even though the question I ask at this post is answered, I encounter a problem with the formula... So my problem continues here : http://forums.rpgmakerweb.com/index.php?/topic/40773-problem-with-a-script/