• 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

need help with new cleric domain

mbran01

Well-known member
I am trying to create a new cleric domain that adds the dwarven stonecunning ability to the character, or if the character already posses the ability I want to increase it by two. I am having a problem with the script, however. I have pieced this together by looking at how other scripts work. I am not very proficient with with scripting so I have hit a dead end on how to fix it. I get an error on line 5.

if (#hasability[raStonecun] <> 0) then
#value[raStonecun] += 2
else
if (#hasability[raStonecun] = 0) then
perform hero.assign[ability.raStonecun]
endif

Any help would be appreciated.
 
Your error is because you have 2 ifs, but only 1 endif to close. change your script to this for no error

if (#hasability[raStonecun] <> 0) then
#value[raStonecun] += 2
elseif (#hasability[raStonecun] = 0) then
perform hero.assign[ability.raStonecun]
endif

It is important to note that "perform hero.assign[ability.raStonecun]" will not actually put the ability on the hero, it will only assign the tag to the hero as though they had the ability. I would recommend making a new racial ability also named stonecunning but with a different Unique ID. This ability should be bootstrapped to your domain, and detect if the original stonecunning is present, add 2 to that and rename itself if so.

if (#hasability[raStonecun] <> 0) then
#value[raStonecun] += 2
field[name].text = "Improved Stonecunning"
endif
 
I still get the following error: group ability not defined.

Is there a way to put the ability on the hero?
 
Last edited:
Back
Top