Script: autocast_remove
void main()
{
object oPC = GetPCSpeaker();
object oAutocaster = GetItemPossessedBy(oPC, "autocaster");
int nNUM_SPELLS = GetLocalInt(oAutocaster, "NUM_SPELLS");
if (!nNUM_SPELLS)
return;
int nCt = 1;
while (nCt <= nNUM_SPELLS)
{
DeleteLocalInt(oAutocaster, "SP" + IntToString(nCt));
DeleteLocalInt(oAutocaster, "ME" + IntToString(nCt));
nCt ++;
}
DeleteLocalInt(oAutocaster, "NUM_SPELLS");
}