jkthomsen9
July 10th, 2010, 11:47 AM
I am trying to code the water rat feat from savage tide adventure path. I am trying to get it to disable the feat if you are in medium/heavy armor, encumbered, or fatigued or exhausted. I got most of it to work but am having trouble with the fatigue and exhausted line. This is the code I used. On a second note I have no education in programing. Where is a good book/web resorce I could use to learn the basics to program herolab?
elseif (hero.tagis[pcnFatigue] + hero.tagis[pcnExhaust] <> 0) then
result = assign[Helper.SpcDisable]
done
The full code is listed below.
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)
var result as number
~ If we fail the test for being speedy, get out
if (hero.tagis[Encumbered.Heavy] + hero.tagis[Encumbered.Medium] <> 0) then
result = assign[Helper.SpcDisable]
done
elseif (hero.tagis[Hero.MedArmor] + hero.tagis[Hero.HeavyArmor] <> 0) then
result = assign[Helper.SpcDisable]
done
elseif (hero.tagis[pcnFatigue] + hero.tagis[pcnExhaust] <> 0) then
result = assign[Helper.SpcDisable]
done
endif
#skillbonus[skSwim] += 2
if (#skillranks[skSwim] >= 10) then
#skillbonus[skSwim] += 2
endif
elseif (hero.tagis[pcnFatigue] + hero.tagis[pcnExhaust] <> 0) then
result = assign[Helper.SpcDisable]
done
The full code is listed below.
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)
var result as number
~ If we fail the test for being speedy, get out
if (hero.tagis[Encumbered.Heavy] + hero.tagis[Encumbered.Medium] <> 0) then
result = assign[Helper.SpcDisable]
done
elseif (hero.tagis[Hero.MedArmor] + hero.tagis[Hero.HeavyArmor] <> 0) then
result = assign[Helper.SpcDisable]
done
elseif (hero.tagis[pcnFatigue] + hero.tagis[pcnExhaust] <> 0) then
result = assign[Helper.SpcDisable]
done
endif
#skillbonus[skSwim] += 2
if (#skillranks[skSwim] >= 10) then
#skillbonus[skSwim] += 2
endif