I didn't actually run this script but based on the other post you linked it should work. Tweak as needed. The important thing to notice is that we are looping through the "Things" not "picks" this means we are pulling from every spell in HL. Not just the spells that exist on the hero.
Code:
~ If no summoner class get out now
doneif (hero.childlives[cHelpSum] <> 1)
var sTag as string
var sAllowSp as string
~ Loop through all Spell Things for the cleric class
foreach thing in BaseSpell where "sClass.cHelpClr"
~ Pull the spells ThingID
sTag = eachthing.tagids[thingid.?,"|"]
~ Change to Class Allow Spell tag
sAllowSp = replace(sTag,"thingid.","ClsAllowSp.",0)
~ Assign spell to summoner
perform hero.childfound[cHelpSum].assignstr[sAllowSp]
nexteach