I am not really sure of the question but without timing my guess it that the only reason the above script works is the last line:
Code:
hero.childfound[cMnkKiPool].field[trkMax].value +=
hero.childfound[cMnkKiPool].field[xExtraLev].value
Which forces the Tracker to be increased by the same amount you added extra levels. Which in that case no reason to increase the Extra Levels as you already directly increased the tracker.
Which FYI means the script can be shortened to the following assuming we are running on a class special at Post-Levels/1000.
Code:
~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] <> 1)
~ If we've been Disabled, get out now
doneif (tagis[Helper.SpcDisable] <> 0)
~ Increase Ki pool by an amount equal to half my class level
#trkmax[cMnkKiPool] += round(field[xTotalLev].value/2,0,-1)
This can go onto a class special and it will activate itself at the level you set when you bootstrap it. It then takes the level from itself which is associated to the any PrC or class you bootstrapped too. Divides in half and increases the Ki Pool tracker by that amount. If no Monk Ki Pool tracker found then it won't do anything.
Of course I could have missed the whole point of what your trying to accomplish.