• 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

Odd Secondary Spells

AndrewD2

Well-known member
I'm working on setting up a class that kind of has two spell lists. It can prepare a few spells from the Cleric list and it also can prepare a number of domain spells each day. The catch is the number of domain spells it can prepare changes based on the level.

Is there a way to set this up as I can only find the ability to set a number for the secondary spells?
 
I've been trying to find the field that stores the value for the secondary spell at each level so that I can write a script to take of setting this, but I haven't had any luck. Does anybody know where this is referenced?
 
I got it to work.

Code:
if (#levelcount[DivineCha] >= 1) then
	hero.child[cHelpDCh].field[cSecMax].arrayvalue[1] = 1
endif
if (#levelcount[DivineCha] >= 2) then
	hero.child[cHelpDCh].field[cSecMax].arrayvalue[1] = 2
endif
~if (#levelcount[DivineCha] >= 3) then
~endif
if (#levelcount[DivineCha] >= 4) then
	hero.child[cHelpDCh].field[cSecMax].arrayvalue[3] = 2
endif
~if (#levelcount[DivineCha] >= 5) then
if (#levelcount[DivineCha] >= 6) then
	hero.child[cHelpDCh].field[cSecMax].arrayvalue[1] = 3
endif
~if (#levelcount[DivineCha] >= 7) then
~endif
if (#levelcount[DivineCha] >= 8) then
	hero.child[cHelpDCh].field[cSecMax].arrayvalue[4] = 2
endif
if (#levelcount[DivineCha] >= 9) then
	hero.child[cHelpDCh].field[cSecMax].arrayvalue[2] = 3
endif
if (#levelcount[DivineCha] >= 10) then
	hero.child[cHelpDCh].field[cSecMax].arrayvalue[5] = 2
endif
if (#levelcount[DivineCha] >= 11) then
	hero.child[cHelpDCh].field[cSecMax].arrayvalue[3] = 3
endif
if (#levelcount[DivineCha] >= 12) then
	hero.child[cHelpDCh].field[cSecMax].arrayvalue[6] = 2
endif
if (#levelcount[DivineCha] >= 13) then
	hero.child[cHelpDCh].field[cSecMax].arrayvalue[4] = 3
endif
if (#levelcount[DivineCha] >= 14) then
	hero.child[cHelpDCh].field[cSecMax].arrayvalue[7] = 2
endif
if (#levelcount[DivineCha] >= 15) then
	hero.child[cHelpDCh].field[cSecMax].arrayvalue[5] = 3
endif
if (#levelcount[DivineCha] >= 16) then
	hero.child[cHelpDCh].field[cSecMax].arrayvalue[8] = 2
endif
if (#levelcount[DivineCha] >= 17) then
	hero.child[cHelpDCh].field[cSecMax].arrayvalue[6] = 3
endif
if (#levelcount[DivineCha] >= 18) then
	hero.child[cHelpDCh].field[cSecMax].arrayvalue[9] = 2
endif
if (#levelcount[DivineCha] >= 19) then
	hero.child[cHelpDCh].field[cSecMax].arrayvalue[7] = 3
endif
~if (#levelcount[DivineCha] >= 20) then
~endif

If anyone has any efficiency recommendations I would greatly appreciate it.

(Yes I know there are some commented out lines, I just left them in there in case there was ever a need to edit those levels easily.
 
Back
Top