      /*
 *  Script generated by LS Script Generator, v.TK.0
 *
 *  For download info, please visit:
 *  http://nwvault.ign.com/View.php?view=Other.Detail&id=1502
 */
// Put this script OnEnter.


void main()
{
    object oTarget;
    object oSpawn;

    // Get the creature who triggered this event.
    object oPC = GetEnteringObject();

    // Only fire for (real) PCs.
    if ( !GetIsPC(oPC)  ||  GetIsDMPossessed(oPC) )
        return;

    // Only fire once per PC.
   // if ( GetLocalInt(oPC, "DO_ONCE__" + GetTag(OBJECT_SELF)) )
   //     return;
   // SetLocalInt(oPC, "DO_ONCE__" + GetTag(OBJECT_SELF), TRUE);

    // If the local int is exactly 1.
    if ( GetLocalInt(oPC, "grimboldally") == 1 )
    {
        // Spawn "grimboldally".
        oTarget = GetWaypointByTag("WP_Grimbold_Ally");
        oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "grimboldally", GetLocation(oTarget));
        DestroyObject(OBJECT_SELF);
}
}
