void main()
{
object oPC = GetEnteringObject();
object oCaster = GetNearestObject (OBJECT_TYPE_PLACEABLE);
// Needed if PC only
if (!GetIsPC (oPC)) return;
AssignCommand (oCaster, ActionCastSpellAtObject (499, oPC, METAMAGIC_ANY, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE));
}
I didn't have any luck trying to get the trigger to cast it, but it will work with either the nearest placeable being the caster, or the PC themselves.