Senior Member
Join Date: May 2007
Location: Durham, NC
Posts: 1,747
|
Need a little help with a custom ability.
You gain a bonus to all Knowledge checks equal to half your level. Script ~our bonus is level /2 var bonus as number foreach pick in hero from BaseSkill where "Helper.SkCatKnow" bonus = field[xTotalLev].value / 2 eachpick.field[Bonus].value += maximum(round(bonus,0,-1),1) perform eachpick.delete[Helper.TrainOnly] nexteach |
#1 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
you might try:
Post-Levels 1000 Code:
var bonus as number bonus = herofield[tHitDice].value / 2 foreach pick in hero from BaseSkill where "Helper.SkCatKnow" eachpick.field[Bonus].value += maximum(round(bonus,0,-1),1) perform eachpick.delete[Helper.TrainOnly] nexteach |
#2 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Frodie, half of what level? I see that Sendric has given you a "half character level" version of this script, but if this is an ability on a class, the rule for those is that anytime they refer to the level, it means the level of the class (unless it specifically says character level or total level).
What phase & priority were you using? If it is a class ability, switch to Post-Levels/10000, but I don't think you'll need to change anything else about your script. |
#3 |
Senior Member
Join Date: May 2007
Location: Durham, NC
Posts: 1,747
|
Timing, I had "pre-levels" not post-levels. Sorry about that. Sometimes I over look the simple things. Thanks yall.
|
#4 |
|
|