• 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

Help with Eval script

Kaleb

Well-known member
I am trying to write a script to add the class level of the parent class to a 1d6
the first script below is from Natural healing minus the line of code that divides the class level by 3
var plus as number
if (#hasability[cRslImpNat] <> 0) then
plus = #levelcount[Forester]
endif



field[livename].text = "Improved Nature's Healing(1d6+" & plus & ")"

When I use this script I 1d6+0 as my out put instead of 1d6 +12 as the test is a 12th level forseter.

Could I eliminate the var plus as number and the Plus= and use
if (#hasability[cRslImpNat] <> 0) then
+= #levelcount[Forester]
endif

field[livename].text = "Improved Nature's Healing(1d6+" & #levelcount[Forester] & ")"

to get the out put that I am looking for?
 
not sure exactly what the '#levelcount[]' is doing (can hazard a guess but just clarifying that i don't know for sure) but assume its to get the level of the forester.
in the IF statement, what are you += the levelcount to?

in a recent script i added the level of the char to the livename but was for the total character level, assume would need to find and make sure 'Forester' is the id of the field that has the forester level. as you can see below, when i grabbed the char level its from 'tTotLevel'...i would assume the forester would have one of those small letters in front as well like cForester or something...

hero.child[trKTRopEnd].field[livename].text = "At Rope's End = " & hero.child[Totals].field[tTotLevel].value & "/DR for 1 min"
 
I am trying to write a script to add the class level of the parent class to a 1d6
the first script below is from Natural healing minus the line of code that divides the class level by 3
var plus as number
if (#hasability[cRslImpNat] <> 0) then
plus = #levelcount[Forester]
endif



field[livename].text = "Improved Nature's Healing(1d6+" & plus & ")"

When I use this script I 1d6+0 as my out put instead of 1d6 +12 as the test is a 12th level forseter.
What is your timing? You need to be like Post-Levels/10000 to get correct class levels.

Is this on a Class Special or a Custom Class Special? As both have similar mechanics built in that set the class level they are attached too.

This code should work on either a Custom or Class Special I think.
Post-Levels/10000
Code:
~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] <> 1)
~ if we've been disabled, get out now
doneif (tagis[Helper.SpcDisable] <> 0)

~ Set our level based on the class we are attached too
field[abValue].value += field[xTotalLev].value
~ Set live name based on our Thing's name and 1d6+X
field[livename].text = field[thingname].text & [B]" 1d6"[/B] & signed(field[abValue].value)
of course its been a long morning. So I could be wrong. :)
 
Back
Top