Go to the adjust tab, and note the "Spells Cast Per Day" adjustment - that'll be our starting point in the editor. So, in the editor, go to the adjustments, and use "New (Copy)" to pull up "Spells Cast Per Day".
Here's its script:
Code:
~ If we're not enabled, get out now
if (field[pIsOn].value = 0) then
done
endif
~ If nothing chosen, get out now
if (field[pChosen].ischosen = 0) then
done
endif
~ Add extra spell levels appropriately
var spelllevel as number
spelllevel = field[pSpellLvl].value
field[pChosen].chosen.field[cMemMax].arrayvalue[spelllevel] += field[pAdjust].value
field[pChosen].chosen.field[cCastMax].arrayvalue[spelllevel] += field[pAdjust].value
The first test, for being enabled, is specific to adjustments - specifically to the on/off checkbox they have. The second test is to make sure that a class has been chosen.
field[pSpellLvl].value is also adjustment-specific - it's what the user sets when they choose the level of spells to change.
this code:
transitions the context of the script to whichever class was chosen.
Since you know you want to transition to the cleric class, you can instead use:
Code:
hero.childfound[cHelpClr]
Putting those together,
Code:
hero.childfound[cHelpClr].field[cMemMax].arrayvalue[1]
Is the Cleric's maximum memorized 1st level spells, and:
Code:
hero.childfound[cHelpClr].field[cCastMax].arrayvalue[1]
is the Cleric's maximum cast 1st level spells.
Since the Cleric is a memorized spellcaster (like the wizard, and unlike sorcerer or bard), all we need to worry about is the first line. If we were creating this item for a bard, we'd only need the second line. No problems will be created if you adjust both for any class (you'll note the adjustment changes both, so that it doesn't have to test what type of class it's adjusting).
field[pAdjust].value is what the user has entered for how much to adjust the spells - you said you get +1 to each level.
Putting all that together:
Code:
hero.childfound[cHelpClr].field[cMemMax].arrayvalue[1] += 1
hero.childfound[cHelpClr].field[cMemMax].arrayvalue[2] += 1
hero.childfound[cHelpClr].field[cMemMax].arrayvalue[3] += 1
hero.childfound[cHelpClr].field[cMemMax].arrayvalue[4] += 1
You said that you've already figured out how to make sure the item is equipped, but for the use of anyone else reading this post:
Code:
if (field[gIsEquip].value <> 0) then
hero.childfound[cHelpClr].field[cMemMax].arrayvalue[1] += 1
hero.childfound[cHelpClr].field[cMemMax].arrayvalue[2] += 1
hero.childfound[cHelpClr].field[cMemMax].arrayvalue[3] += 1
hero.childfound[cHelpClr].field[cMemMax].arrayvalue[4] += 1
endif
Next is the timing: the adjustment uses Final/10000 as its timing - stick with that.