Thanks for the response Ryuhi200, but I couldn't get yours to work. And I am really trying to get the enhancements all at once instead of something drawn out. I did cut my amount of buffs in half hoping to reduce lag, and it works... almost always.
Here is what I have so far...
void main()
{
object oPC = GetPCSpeaker();
if (GetGold(oPC) >= 250)
{
AssignCommand(oPC, TakeGoldFromCreature(250, oPC, TRUE));
oTarget = oPC;
ActionCastSpellAtObject(SPELL_AID, oTarget, METAMAGIC_ANY, TRUE, 12, PROJECTILE_PATH_TYPE_DEFAULT, FALSE);
ActionCastSpellAtObject(SPELL_DARKFIRE, oTarget, METAMAGIC_ANY, TRUE, 12, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
ActionCastSpellAtObject(SPELL_ENDURE_ELEMENTS, oTarget, METAMAGIC_ANY, TRUE, 12, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
ActionCastSpellAtObject(SPELL_HASTE, oTarget, METAMAGIC_ANY, TRUE, 12, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
ActionCastSpellAtObject(SPELL_MAGIC_VESTMENT, oTarget, METAMAGIC_ANY, TRUE, 12, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
ActionCastSpellAtObject(SPELL_MAGIC_WEAPON, oTarget, METAMAGIC_ANY, TRUE, 12, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
}
else
{
AssignCommand(GetObjectByTag("Marisa"), ActionSpeakString("I'm sorry, but that is not enough gold for a donation."));
}
}
Everything seems to be working as I would like.. except, once in about 4 tries, the NPC takes the gold starts to cast spell and stops... nothing else happens. So PC loses gold and gets no buff.
Does anybody have any ideas what could be the problem?
Thanks in advance for any help.