void main()
{
    object oPC = GetLastUsedBy();
    location lSpawn = GetLocation(GetWaypointByTag("SPAWN_ELEM"));

    AssignCommand(oPC,ActionPlayAnimation(ANIMATION_LOOPING_GET_MID, 1.0, 1.0));
    PlayAnimation(ANIMATION_PLACEABLE_ACTIVATE, 1.0, 1.0);

    if (GetLocalInt(OBJECT_SELF, "DoneOnce")){
        SpeakString("Nothing happens.");
        return;
        }

    object oLite = GetObjectByTag("TOWSHFT_PURP");
    SetPlotFlag(oLite, FALSE);
    DestroyObject(oLite, 1.5);
    CreateObject(OBJECT_TYPE_CREATURE, "shdtwr_purp", lSpawn, TRUE);
    SpeakString("It appears as though activating this lever has caused the creation of an elemental being.");
    SetLocalInt(OBJECT_SELF, "DoneOnce", TRUE);

}
