#include "nw_i0_generic"
//::///////////////////////////////////////////////
//:: Name     dm_toggle01
//:: FileName dm_toggle01
//:://////////////////////////////////////////////
/*

*/
//:://////////////////////////////////////////////
//:: Created By: Scrotok
//:: Modified By:ENoa4
//:: Created On: 02/24/2005
//:://////////////////////////////////////////////

void main()
{
   object oPC = GetEnteringObject();
    object oTarget;
   object oPC2;
    if (!GetIsPC(oPC)) return;
    oPC2 = oPC;

   object oCreature;
   //int nPlayer = 0;
   int nDM = 0; // 0 = no DM in game, 1 = DM is playing
   oPC = GetFirstPC();
   while (GetIsObjectValid(oPC))
    {
       if ((GetIsDM(oPC)) || (GetIsDMPossessed(oPC)))
        {
           nDM = 1;
        }
       oPC = GetNextPC();
    }


   if (nDM == 0)
    {
               // No DM, so make oCreature hostile
           //ChangeToStandardFaction(oCreature, STANDARD_FACTION_HOSTILE);
           //oCreature = GetObjectByTag("Nerid");
           //SetIsTemporaryNeutral(oPC, oCreature, FALSE, 180.0f);
           //oCreature = GetObjectByTag("WateryFist");
           //SetIsTemporaryNeutral(oPC, oCreature, FALSE, 180.0f);
           // oCreature = GetObjectByTag("ElectricEel");
           //SetIsTemporaryNeutral(oPC, oCreature, FALSE, 180.0f);

            oTarget = GetObjectByTag("Nerid");

            AdjustReputation(oPC, oTarget, -100);

            oTarget = GetObjectByTag("Nerid");

            SetIsTemporaryEnemy(oPC2, oTarget);

            AssignCommand(oTarget, ActionAttack(oPC2));

            AssignCommand(oTarget, DetermineCombatRound(oPC2));

    }
   else
    {





       SendMessageToAllDMs("The Nerid, Watery Fist and Electric Eel are Neutral so the DM may role play and control them.  You may want to send the creatures to and from limbo to keep them hidden at your discression, particularly the watery fist and eel.");

    }
}
