• 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

"Domain" Spells for the Arcane

spannclann

Well-known member
I have created a Custom "Deity of Arcane Magic" into my campaign. As a result, I want arcane users to have access to this Deity's custom spells if the PCs decide to worship them.

I am wanting the spells to be available in the list of spells for each Arcana based caster, but greyed out if they do not worship this particular god.

I am looking for a script to put in the spell that will check what god the PC worships; sort of as a prerequisite check. If the check is true, then the spell becomes available.

I am sure I will need the HasDeity.deiCustomDeityName tag in the check somewhere.

Would this work? Am I on the right track or way off?

if (hero.childfound[HasDeity.deiCustomDeityName].tagis[thing.activated] <> 0) then
 
I was thinking this as possible as a Pre-req. Thoughts?

@valid = 0

if (hero.childlives[deiCustomDeityName] <>0) then
if (hero.childfound[deiCustomDeityName].field[usrIndex].value = 0) then
@valid = 1
endif
endif
 
Okay, this works as a pre-req and will grey out the spell unless this particular god is worshiped.

@valid = 0

if (hero.childlives[deiRIPVon] <>0) then
if (hero.childfound[deiRIPVon].field[usrIndex].value = 0) then
@valid = 1
endif
endif

However, I am getting an error when I select the spell or do not.

"Attempt to access field 'usrIndex' that does not exist for thing 'deiRIPVon'
 
Okay, easy enough. All I needed to make this work properly was to take out the second if/then statement.

@valid = 0

if (hero.childlives[deiRIPVon] <>0) then

@valid = 1

endif
 
Back
Top