
IF
	NumberOfTimesTalkedTo(0)
	Detect([PC])
THEN
	RESPONSE #100
		StartDialogueNoSet(LastSeenBy(Myself))
END



IF
	Global("PhlydianResurrected","GLOBAL",1)
	!InParty(Myself)
	See(Player1)
THEN
	RESPONSE #100
		StartDialogueNoSet(Player1)
		SetGlobal("PhlydianResurrected","GLOBAL",2)
END

IF
  !InParty(Myself)
	//HPLT(Myself,10)
	Die()
THEN
	RESPONSE #100
		DropInventory()
		Kill(Myself)
			DestroySelf()
		CreateCreature("GASFORM4",[-1.-1],S)
		ActionOverride("GASFORM4",EscapeArea())
		// SetGlobalTimer("VampireResurrectTimer","LOCALS",FOUR_HOURS)
		//ReallyForceSpellDead(Myself,VAMPIRE_BAT_FORM_CHANGE)
END

IF
!InParty(Myself)
	!HasItemEquiped("ohhcloak",Myself) // Cloak of Dragomir
	!HasItemEquiped("ohhkork",Myself) // Korkorran
	TimeGT(5)
	TimeLT(DUSK_END)
	AreaType(OUTDOOR)
THEN
	RESPONSE #100
		//DropInventory()
		Kill(Myself)
			DestroySelf()
		CreateCreature("GASFORM4",[-1.-1],S)
		ActionOverride("GASFORM4",EscapeArea())
END




IF 
  AreaCheck("AR0808")
  !InParty(Myself)
  Global("BodhiStronghold","GLOBAL",2)
  Global("BodhiStrongholdPledged","LOCALS",1)
	!GlobalTimerNotExpired("BD_Move","LOCALS")
	!Allegiance(Myself,ENEMY)
THEN
	RESPONSE #40
		SetGlobalTimer("BD_Move","LOCALS",ONE_ROUND)
		RandomWalk()
	RESPONSE #40
		SetGlobalTimer("BD_Move","LOCALS",ONE_ROUND)
		RandomTurn()
	RESPONSE #20
		SetGlobalTimer("BD_Move","LOCALS",ONE_ROUND)
		NoAction()
END