
IF
  OR(6) 
    StateCheck(Player1,STATE_DEAD)
    StateCheck(Player2,STATE_DEAD)
    StateCheck(Player3,STATE_DEAD)
    StateCheck(Player4,STATE_DEAD)
    StateCheck(Player5,STATE_DEAD)
    StateCheck(Player6,STATE_DEAD)	
	Global("VampireResurrectionTime","GLOBAL",0)
	PartyRested()
THEN 
   RESPONSE #100
   SetGlobal("VampireResurrectionTime","GLOBAL",1)
   Continue()
END	




IF 
	!Name("Hexxat",Player1)
	!Name("cmgmiriam",Player1)
    StateCheck(Player1,STATE_DEAD)
	OR(2)
	Race(Player1,LICH)
	Race(Player1,VAMPIRE)
	Global("VampireResurrectionTime","GLOBAL",1)
THEN 
   RESPONSE #100
   ApplySpell(Player1,CLERIC_RESURRECTION)
   ApplySpell(Player1,RESTORE_FULL_HEALTH) 
//   Continue()
END	


IF 
	!Name("Hexxat",Player2)
	!Name("cmgmiriam",Player2)
    StateCheck(Player2,STATE_DEAD)
	OR(2)
	Race(Player2,LICH)
	Race(Player2,VAMPIRE)
	Global("VampireResurrectionTime","GLOBAL",1)
THEN 
   RESPONSE #100
   ApplySpell(Player2,CLERIC_RESURRECTION)
   ApplySpell(Player2,RESTORE_FULL_HEALTH) 
//    Continue()
END	

IF 
	!Name("Hexxat",Player3)
	!Name("cmgmiriam",Player3)
	OR(2)
	Race(Player3,LICH)
    StateCheck(Player3,STATE_DEAD)
	Race(Player3,VAMPIRE)
	Global("VampireResurrectionTime","GLOBAL",1)
THEN 
   RESPONSE #100
   ApplySpell(Player3,CLERIC_RESURRECTION)
   ApplySpell(Player3,RESTORE_FULL_HEALTH) 
//      Continue()
END	

IF 
	!Name("Hexxat",Player4)
	!Name("cmgmiriam",Player4)
	
    StateCheck(Player4,STATE_DEAD)
	OR(2)
	Race(Player4,LICH)
	Race(Player4,VAMPIRE)
	Global("VampireResurrectionTime","GLOBAL",1)
THEN 
   RESPONSE #100
   ApplySpell(Player4,CLERIC_RESURRECTION)
   ApplySpell(Player4,RESTORE_FULL_HEALTH) 
//      Continue()
END	

IF 
	!Name("Hexxat",Player5)
	!Name("cmgmiriam",Player5)
    StateCheck(Player5,STATE_DEAD)
	OR(2)
	Race(Player5,LICH)
	Race(Player5,VAMPIRE)
	Global("VampireResurrectionTime","GLOBAL",1)
	
THEN 
   RESPONSE #100
   ApplySpell(Player5,CLERIC_RESURRECTION)
   ApplySpell(Player5,RESTORE_FULL_HEALTH) 
   
//      Continue()
END	

IF 
	!Name("Hexxat",Player6)
	!Name("cmgmiriam",Player6)
    StateCheck(Player6,STATE_DEAD)
		OR(2)
	Race(Player6,LICH)
	Race(Player6,VAMPIRE)
	Global("VampireResurrectionTime","GLOBAL",1)
THEN 
   RESPONSE #100
   ApplySpell(Player6,CLERIC_RESURRECTION)
   ApplySpell(Player6,RESTORE_FULL_HEALTH) 
//      Continue()
END	


IF 
    Global("VampireResurrectionTime","GLOBAL",1)
THEN 
    RESPONSE #100
	Wait(5)
	SetGlobal("VampireResurrectionTime","GLOBAL",0)
END



// IF 
  // !StateCheck(Player1,STATE_DEAD)
  // !StateCheck(Player2,STATE_DEAD)
  // !StateCheck(Player3,STATE_DEAD)
  // !StateCheck(Player4,STATE_DEAD)
  // !StateCheck(Player5,STATE_DEAD)
  // !StateCheck(Player6,STATE_DEAD)
  // OR(6)
  // Race(Player1,VAMPIRE)
  // Race(Player2,VAMPIRE)
  // Race(Player3,VAMPIRE)
  // Race(Player4,VAMPIRE)
  // Race(Player5,VAMPIRE)
  // Race(Player6,VAMPIRE)
  // !RealGlobalTimerNotExpired("VampireResurrectTimer","GLOBAL")
// THEN RESPONSE #100
   // RealSetGlobalTimer("VampireResurrectTimer","GLOBAL",SIX_HOURS)	
// END




// IF 
  // StateCheck(Player1,STATE_DEAD)
  // !AreaType(OUTDOOR)
  // OR(2)
  // Race(Player1,VAMPIRE)
  // Race(Player1,LICH)
// !RealGlobalTimerNotExpired("VampireResurrectTimer","GLOBAL")
// Global("VampireResurrectDelay","GLOBAL",0)
// THEN 
  // RESPONSE #100
     // ApplySpell(Player1,CLERIC_RESURRECTION)
   // ApplySpell(Player1,RESTORE_FULL_HEALTH) 
   // Continue()
// END

// IF 
  // StateCheck(Player2,STATE_DEAD)
  // !AreaType(OUTDOOR)
  // OR(2)
  // Race(Player2,VAMPIRE)
  // Race(Player2,LICH)
// !RealGlobalTimerNotExpired("VampireResurrectTimer","GLOBAL")
// Global("VampireResurrectDelay","GLOBAL",0)
// THEN 
  // RESPONSE #100
     // ApplySpell(Player2,CLERIC_RESURRECTION)
   // ApplySpell(Player2,RESTORE_FULL_HEALTH) 
   // Continue()
// END


// IF 
  // StateCheck(Player3,STATE_DEAD)
  // !AreaType(OUTDOOR)
  // OR(2)
  // Race(Player3,VAMPIRE)
  // Race(Player3,LICH)
// !RealGlobalTimerNotExpired("VampireResurrectTimer","GLOBAL")
// Global("VampireResurrectDelay","GLOBAL",0)

// THEN 
  // RESPONSE #100
     // ApplySpell(Player3,CLERIC_RESURRECTION)
   // ApplySpell(Player3,RESTORE_FULL_HEALTH) 
   // Continue()
// END


// IF 
  // StateCheck(Player4,STATE_DEAD)
  // !AreaType(OUTDOOR)
  // OR(2)
  // Race(Player4,VAMPIRE)
  // Race(Player4,LICH)
// !RealGlobalTimerNotExpired("VampireResurrectTimer","GLOBAL")
// Global("VampireResurrectDelay","GLOBAL",0)
// THEN 
  // RESPONSE #100
     // ApplySpell(Player4,CLERIC_RESURRECTION)
   // ApplySpell(Player4,RESTORE_FULL_HEALTH) 
   // Continue()
// END


// IF 
  // StateCheck(Player5,STATE_DEAD)
  // !AreaType(OUTDOOR)
  // OR(2)
  // Race(Player5,VAMPIRE)
  // Race(Player5,LICH)
// !RealGlobalTimerNotExpired("VampireResurrectTimer","GLOBAL")
// Global("VampireResurrectDelay","GLOBAL",0)
// THEN 
  // RESPONSE #100
     // ApplySpell(Player5,CLERIC_RESURRECTION)
   // ApplySpell(Player5,RESTORE_FULL_HEALTH) 
   // Continue()
// END



// IF 
  // StateCheck(Player6,STATE_DEAD)
  // !AreaType(OUTDOOR)
  // OR(2)
  // Race(Player6,VAMPIRE)
  // Race(Player6,LICH)
 // !RealGlobalTimerNotExpired("VampireResurrectTimer","GLOBAL")
 // Global("VampireResurrectDelay","GLOBAL",0)
// THEN 
  // RESPONSE #100
     // ApplySpell(Player6,CLERIC_RESURRECTION)
   // ApplySpell(Player6,RESTORE_FULL_HEALTH) 
   // Continue()
// END






// IF
  // OR(6) 
    // StateCheck(Player1,STATE_DEAD)
    // StateCheck(Player2,STATE_DEAD)
    // StateCheck(Player3,STATE_DEAD)
    // StateCheck(Player4,STATE_DEAD)
    // StateCheck(Player5,STATE_DEAD)
    // StateCheck(Player6,STATE_DEAD)	
	// Global("VampireResurrectionTime","GLOBAL",0)
	// PartyRested()
// THEN 
   // RESPONSE #100
   // SetGlobal("VampireResurrectionTime","GLOBAL",1)
   // Continue()
// END	




// IF 
    // StateCheck(Player1,STATE_DEAD)
	// !Name("Hexxat",Player1)
	// !Name("cmgmiriam",Player1)
	// !Name("Valen",Player1)

	// OR(2)
	// Race(Player1,VAMPIRE)
	// Race(Player1,LICH)
	// Global("VampireResurrectionTime","GLOBAL",1)
// THEN 
   // RESPONSE #100
   // ApplySpell(Player1,CLERIC_RESURRECTION)
   // ApplySpell(Player1,RESTORE_FULL_HEALTH) 
   // Continue()
// END	


// IF 
    // StateCheck(Player2,STATE_DEAD)
	// !Name("Hexxat",Player2)
	// !Name("cmgmiriam",Player2)
	// !Name("Valen",Player2)

	// OR(2)
	// Race(Player2,VAMPIRE)
	// Race(Player2,LICH)
	// Global("VampireResurrectionTime","GLOBAL",1)
// THEN 
   // RESPONSE #100
   // ApplySpell(Player2,CLERIC_RESURRECTION)
   // ApplySpell(Player2,RESTORE_FULL_HEALTH) 
    // Continue()
// END	

// IF 
    // StateCheck(Player3,STATE_DEAD)
	// !Name("Hexxat",Player3)
	// !Name("cmgmiriam",Player3)
	// !Name("Valen",Player3)

	// OR(2)
	// Race(Player3,VAMPIRE)
	// Race(Player3,LICH)
	// Global("VampireResurrectionTime","GLOBAL",1)
// THEN 
   // RESPONSE #100
   // ApplySpell(Player3,CLERIC_RESURRECTION)
   // ApplySpell(Player3,RESTORE_FULL_HEALTH) 
      // Continue()
// END	

// IF 
    // StateCheck(Player4,STATE_DEAD)
	// !Name("Hexxat",Player4)
	// !Name("cmgmiriam",Player4)
		// !Name("Valen",Player4)

	// OR(2)
	// Race(Player4,VAMPIRE)
	// Race(Player4,LICH)
	// Global("VampireResurrectionTime","GLOBAL",1)
// THEN 
   // RESPONSE #100
   // ApplySpell(Player4,CLERIC_RESURRECTION)
   // ApplySpell(Player4,RESTORE_FULL_HEALTH) 
      // Continue()
// END	

// IF 
    // StateCheck(Player5,STATE_DEAD)
	// !Name("Hexxat",Player5)
	// !Name("cmgmiriam",Player5)
		// !Name("Valen",Player5)

	// OR(2)
	// Race(Player5,VAMPIRE)
	// Race(Player5,LICH)
	// Global("VampireResurrectionTime","GLOBAL",1)
	
// THEN 
   // RESPONSE #100
   // ApplySpell(Player5,CLERIC_RESURRECTION)
   // ApplySpell(Player5,RESTORE_FULL_HEALTH) 
   
      // Continue()
// END	

// IF 
    // StateCheck(Player6,STATE_DEAD)
	// !Name("Hexxat",Player6)
	// !Name("cmgmiriam",Player6)
		// !Name("Valen",Player6)

	// OR(2)
	// Race(Player6,VAMPIRE)
	// Race(Player6,LICH)
	// Global("VampireResurrectionTime","GLOBAL",1)
// THEN 
   // RESPONSE #100
   // ApplySpell(Player6,CLERIC_RESURRECTION)
   // ApplySpell(Player6,RESTORE_FULL_HEALTH) 
      // Continue()
// END	


// IF 
    // Global("VampireResurrectionTime","GLOBAL",1)
// THEN 
    // RESPONSE #100
	// Wait(5)
	// SetGlobal("VampireResurrectionTime","GLOBAL",0)
// END






IF 
AreaCheck("BG2616")
  Global("DetermineRace","LOCALS",0)
  THEN 
    RESPONSE #100
  SetGlobal("DetermineRace","LOCALS",1)	
	SetDialog("MYSELFIN")

    StartDialogueNoSet(Myself)
END	





   

   


//IF
//	Race(Myself,VAMPIRE)
//	See(LastTargetedBy(Myself))
//	OR(2)
//		StateCheck(LastTargetedBy(Myself),STATE_CHARMED)
//		StateCheck(LastTalkedToBy(Myself),STATE_STUNNED)
//THEN
//	RESPONSE #100
//		ActionOverride(LastTargetedBy(Myself),ChangeAIScript("dominate",RACE))
//		DisplayString(Myself,67) // All right, all right, the game is up, but I'll still have you join me.
//	//	Continue()
//END

//IF
//    Global("RaceScriptReplaced","LOCALS",0)
//	!Name("Hexxat",Myself)
//THEN
//   RESPONSE #100
//   SetGlobal("RaceScriptReplaced","LOCALS",1)
//   ChangeAIScript("PARTRACE",RACE)
//END

IF 
  Global("Player1RaceBlood","GLOBAL",0)
  Global("MyRaceBlood","LOCALS",1)
THEN 
  RESPONSE #100
SetGlobal("Player1RaceBlood","GLOBAL",1)
 END
 
 IF 
  Global("Player1RaceBlood","GLOBAL",0)
  Global("MyRaceBlood","LOCALS",2)
THEN 
  RESPONSE #100
SetGlobal("Player1RaceBlood","GLOBAL",2)
 END
 
  IF 
  Global("Player1RaceBlood","GLOBAL",0)
  Global("MyRaceBlood","LOCALS",3)
THEN 
  RESPONSE #100
SetGlobal("Player1RaceBlood","GLOBAL",3)
 END
 
  
  IF 
  Global("Player1RaceBlood","GLOBAL",0)
  Global("MyRaceBlood","LOCALS",4)
THEN 
  RESPONSE #100
SetGlobal("Player1RaceBlood","GLOBAL",4)
 END
 
 
  
 IF 
 !Global("PlayerLooksLikeDrow","GLOBAL",1)
 Global("PlayerLooksLikeDrow","LOCALS",1)
THEN  
  RESPONSE #100
SetGlobal("PlayerLooksLikeDrow","GLOBAL",1)
END


