• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Trouble with a Class Special

kendre

New member
I am currently attempting to port the Spellthief from 3.5 to PF for a campaign I'll be running, and I'm attempting to make the Steal Energy Resistance class feature. This feature says the character can steal 10pts at Lv3, 20pts at Lv11, and 30pts at Lv19.

What I'm unsure of is how to make my script reference the character's amount of levels to determine which amount abValue should be set to. This is my first time really working within this Editor and the script is a bit unfamiliar, so bear with me.

Code:
if (field[xAllLev].value >= 3)
 field[abValue].value += 10
  elseif field(class.cHelpSPL) >=11
   field[abValue].value += 20
    elseif field[cSplthf].ClassLev >= 19
     field[abValue].value += 30
done

If anyone could point me in the right direction, or explain where I'm going wrong, I'd appreciate it!
 
Line 1 is the correct way to look up the level. Lines 3 and 5 are not correct.
 
Last edited:
I thought line one was accurate, but I keep receiving an error from that line,
"Invalid use of a reserved word in script."
 
every line with an if statement needs to end with "then" so

Code:
doneif (tagis[Helper.ShowSpec] <> 0)
if (field[xAlllev].value >= 19) then
  field[abValue].value += 30
elseif (field[xAllLev].value >= 11) then
  field[abValue].value += 20
elseif (field[xAllLev].value >= 3) then
  field[abValue].value += 10
endif

also the way you did it you would need to do the levels in reverse order because otherwise >= 3 will satisfy and exit the statement before you ever check for 11th or 19th.
 
Last edited:
One thing of note, a Pathfinder conversion would make those numbers 5, 10, and 15. They lowered the standard resistances and DR numbers.
 
Fixed, and working! Thank you guys very much! Also, appreciate the notice, Asvaldson! I have corrected my oversight!
 
Back
Top