• 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

Class Custom Special

So probably the last of my suggestions - re-using code written to go on a class special on the class itself, but without the code, we can't help find the error.
 
Sorry, been away for a while...First code is..

First 10000

var foundone as number

foreach pick in hero from BaseClSpec where "component.BaseClrDom & CustTaken.cHelpTMP"
foundone = 1
nexteach

doneif (foundone = 0)

perform assign[CasterType.MemAll]
perform assign[CasterSrc.Divine]

if (linkage[varies].field[cTotalLev].value >= 17) then
linkage[varies].field[cSecMax].arrayvalue[1] = 1
linkage[varies].field[cSecMax].arrayvalue[2] = 1
linkage[varies].field[cSecMax].arrayvalue[3] = 1
linkage[varies].field[cSecMax].arrayvalue[4] = 1
linkage[varies].field[cSecMax].arrayvalue[5] = 1
linkage[varies].field[cSecMax].arrayvalue[6] = 1
linkage[varies].field[cSecMax].arrayvalue[7] = 1
linkage[varies].field[cSecMax].arrayvalue[8] = 1
linkage[varies].field[cSecMax].arrayvalue[9] = 1
elseif (linkage[varies].field[cTotalLev].value >= 15) then
linkage[varies].field[cSecMax].arrayvalue[1] = 1
linkage[varies].field[cSecMax].arrayvalue[2] = 1
linkage[varies].field[cSecMax].arrayvalue[3] = 1
linkage[varies].field[cSecMax].arrayvalue[4] = 1
linkage[varies].field[cSecMax].arrayvalue[5] = 1
linkage[varies].field[cSecMax].arrayvalue[6] = 1
linkage[varies].field[cSecMax].arrayvalue[7] = 1
linkage[varies].field[cSecMax].arrayvalue[8] = 1
elseif (linkage[varies].field[cTotalLev].value >= 13) then
linkage[varies].field[cSecMax].arrayvalue[1] = 1
linkage[varies].field[cSecMax].arrayvalue[2] = 1
linkage[varies].field[cSecMax].arrayvalue[3] = 1
linkage[varies].field[cSecMax].arrayvalue[4] = 1
linkage[varies].field[cSecMax].arrayvalue[5] = 1
linkage[varies].field[cSecMax].arrayvalue[6] = 1
linkage[varies].field[cSecMax].arrayvalue[7] = 1
elseif (linkage[varies].field[cTotalLev].value >= 11) then
linkage[varies].field[cSecMax].arrayvalue[1] = 1
linkage[varies].field[cSecMax].arrayvalue[2] = 1
linkage[varies].field[cSecMax].arrayvalue[3] = 1
linkage[varies].field[cSecMax].arrayvalue[4] = 1
linkage[varies].field[cSecMax].arrayvalue[5] = 1
elseif (linkage[varies].field[cTotalLev].value >= 9) then
linkage[varies].field[cSecMax].arrayvalue[1] = 1
linkage[varies].field[cSecMax].arrayvalue[2] = 1
linkage[varies].field[cSecMax].arrayvalue[3] = 1
linkage[varies].field[cSecMax].arrayvalue[4] = 1
linkage[varies].field[cSecMax].arrayvalue[5] = 1
elseif (linkage[varies].field[cTotalLev].value >= 7) then
linkage[varies].field[cSecMax].arrayvalue[1] = 1
linkage[varies].field[cSecMax].arrayvalue[2] = 1
linkage[varies].field[cSecMax].arrayvalue[3] = 1
linkage[varies].field[cSecMax].arrayvalue[4] = 1
elseif (linkage[varies].field[cTotalLev].value >= 5) then
linkage[varies].field[cSecMax].arrayvalue[1] = 1
linkage[varies].field[cSecMax].arrayvalue[2] = 1
linkage[varies].field[cSecMax].arrayvalue[3] = 1
elseif (linkage[varies].field[cTotalLev].value >= 3) then
linkage[varies].field[cSecMax].arrayvalue[1] = 1
linkage[varies].field[cSecMax].arrayvalue[2] = 1
endif

The problem here is, the code compiles without errors and gives no other errors when using the class. However, the domain spells do not show up when a domain is chosen.

The other script to disable domain powers is...

First 400

foreach pick in hero from BaseClSpec
if (eachpick.isroot <> 0) then
if (root.tagexpr[component.BaseClrDom & CustTaken.cHelpTMP] <> 0) then
perform eachpick.forward[AbReplace.?]
perform eachpick.assign[Helper.SpcDisable]
perform eachpick.assign[Hide.Special]
endif
endif
nexteach

This script compiles ok, but gives the error stated edarlier when anything on the character is chosen?
 
if (root.tagexpr[component.BaseClrDom & CustTaken.cHelpTMP] <> 0) then

should be

if (eachpick.root.tagexpr[component.BaseClrDom & CustTaken.cHelpTMP] <> 0) then
 
Not sure why the code I recommended's not working, but not a lot of time to research it. Instead of the if level X then set array stuff, maybe try...

Code:
        var foundone as number

        foreach pick in hero from BaseClSpec where "component.BaseClrDom & CustTaken.cHelpTMP"
          foundone = 1
          nexteach

        doneif (foundone = 0)

        perform assign[CasterType.MemAll]
        perform assign[CasterSrc.Divine]

        linkage[varies].field[cSecSplReq].value = 1
 
So far the domain powers are hidden but the spells still do not show up on the class. Is there something on the class helper I need, just want the domain spells to show up so he can pick his spells when a domain is chosen as a custom class ability?

Stumped?
 
Back
Top