I think your way of deleting tags, inserting some temporary tags before wealth calculations, and then reinserting the correct tags afterwards is probably the best method.
I don't have much experience with bootscraps, foreach picks and helpers, so is this follow below what you mean? The idea with this script to use the foreach pick to grab every class tag, pull them, delete our current class tags, and then assign an equal number of temporary Gestalt class tags to determine our level.
Code:
~ If we are under level 3 don't do anything as we will cause errors
~ Once we have three classes then we can modify it down to two.
doneif (hero.tagcount[Classes.?] < 3)
~ Test to see if this does anything useful
var nClasses as number
var nGestalt as number
var iX as number
nClasses = hero.tagcount[Classes.?]
nGestalt = hero.tagcount[Classes.S2Gestalt]
nClasses = nClasses - (nGestalt * 2)
foreach pick in hero
perform eachpick.pulltags[Classes.?]
nexteach
~perform hero.pulltags[Classes.?]
perform hero.delete[Classes.?]
iX = 0
while (iX < nClasses)
iX += 1
perform hero.assign[Classes.S2Gestalt]
loop
The plan is for the next script at Pre-levels 5001 to clear our temporary class tags, and then push the tags we pulled in the previous script.
I assume there are ways to push pulled variables from other scripts or am I overcomplicating this?