Level + feat eval script?
I'm trying to code a legacy weapon, and want to control the dex bonus it grants as the wielder increases in level.
I tried using if (#totallevelcount[] >= 17) & (#hasfeat[fToBGLDW]) then #enhancementbonus[hero.child[aDEX], 6] elseif (#totallevelcount[] >= 14) & (#hasfeat[fToBL2DW]) then #enhancementbonus[hero.child[aDEX], 4] elseif (#totallevelcount[] >= 7) & (#hasfeat[fToBLLDW]) then #enhancementbonus[hero.child[aDEX], 2] endif but it seems to be crapping out on my use of "& (#hasfeat[xxxx]") as it was working fine before I added that bit. Suggestions? |
Use nested ifs:
Code:
|
Quote:
|
Okay, so I plug in
if (#totallevelcount[] >= 17) then if (#hasfeat[fToBGLDW] <> 0) then elseif (#totallevelcount[] >= 14) then if (#hasfeat[fToBL2DW] <> 0) then elseif (#totallevelcount[] >= 7) then if (#hasfeat[fToBLLDW] <> 0) then endif endif endif endif but its no longer giving me the +2 DEX at level 7 when the feat is known (or at any level). Did I miss something? NVM. My eyes are tired. LOL |
Code:
if (#totallevelcount[] >= 17) then |
Quote:
|
Don't you want:
Code:
|
All times are GMT -8. The time now is 10:42 PM. |
Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.