IF 
 OR(3)
 Global("SaliaRomance","GLOBAL",0)
 Global("SaliaRomance","GLOBAL",1)
 Global("SaliaRomance","GLOBAL",2)
 Gender(Player1,FEMALE)
 !Global("VampireWorldHomoSexOff","GLOBAL",0)
THEN 
  RESPONSE #100
  SetGlobal("SaliaLoveTalksTimer","LOCALS",99)
  SetGlobal("SaliaRomance","GLOBAL",3)
END




IF
  RandomNumLT(100,5)
  Race(Player1,VAMPIRE)
  InParty(Myself)
  Global("VampireWorldRomances","GLOBAL",1)
  Global("SaliaRomanceStart","LOCALS",0)
//  !AreaType(OUTDOOR)
THEN
  RESPONSE #100
   SetGlobal("SaliaRomance","GLOBAL",1)
   SetGlobal("SaliaRomanceStart","LOCALS",1)
   SetGlobalTimer("SaliaLoveTalksTimer","LOCALS",EIGHT_HOURS)
END


IF
InParty(Myself)
See(Player1)
!See([ENEMY])
!AreaType(OUTDOOR)
Global("VampireWorldRomances","GLOBAL",1)
OR(2)
Global("SaliaRomance","GLOBAL",1)
Global("SaliaRomance","GLOBAL",2)
GlobalLT("SaliaRomanceTalk","LOCALS",10)
!GlobalTimerNotExpired("SaliaLoveTalksTimer","LOCALS")
THEN 
   RESPONSE #40
  SetGlobal("SaliaRomanceTalkStart","LOCALS",1)
  IncrementGlobal("SaliaRomanceTalk","LOCALS",1)
  SetGlobalTimer("SaliaLoveTalksTimer","LOCALS",SIXTEEN_HOURS)
  StartDialogueNoSet(Player1)
  SetGlobal("SaliaRomanceTalkStart","LOCALS",0)
 // Wait(2)
  RESPONSE #40
  SetGlobal("SaliaRomanceTalkStart","LOCALS",1)
  IncrementGlobal("SaliaRomanceTalk","LOCALS",1)
  SetGlobalTimer("SaliaLoveTalksTimer","LOCALS",TWO_DAYS)		
  StartDialogueNoSet(Player1)
  SetGlobal("SaliaRomanceTalkStart","LOCALS",0)
 // Wait(2)
  RESPONSE #20
  SetGlobal("SaliaRomanceTalkStart","LOCALS",1)
  IncrementGlobal("SaliaRomanceTalk","LOCALS",1)
  SetGlobalTimer("SaliaLoveTalksTimer","LOCALS",ONE_DAY)			
  StartDialogueNoSet(Player1)
  SetGlobal("SaliaRomanceTalkStart","LOCALS",0)
 // Wait(2)
END

//IF 
//  Global("ChallengesDone","GLOBAL",1)
//   !See([ENEMY])
//   AreaCheck("AR4500")
//   Global("SaliaRomance","GLOBAL",2)
//   OR(2)
//   Global("BodhiLiked","GLOBAL",1)
//   Global("BodhiLoved","GLOBAL",1)
//   Global("FinalLoveTalk","LOCALS",0)
//THEN
//  RESPONSE #100
//  SetGlobal("FinalPartTalk","LOCALS",1)
//		StartDialogueNoSet(Player1)
//  Wait(5)
//SetGlobal("FinalPartTalk","LOCALS",2)  
//END

//IF 
//   Global("ChallengesDone","GLOBAL",1)
//   !See([ENEMY])
//   AreaCheck("AR4500")
//   Global("SaliaRomance","GLOBAL",2)
//   !Global("BodhiHatesPlayer","GLOBAL",0)
//   Global("FinalLoveTalk","LOCALS",0)
//THEN
//  RESPONSE #100
//  SetGlobal("FinalLoveTalk","LOCALS",1)
//		StartDialogueNoSet(Player1)
//  Wait(5)
//SetGlobal("FinalLoveTalk","LOCALS",2)  
//END


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



IF 
   !Dead("c6bodhi")
   Global("BodhiControlsVampires","GLOBAL",1)
   Global("BodhiHatesPlayer","GLOBAL",1)
   Global("BodhiHatesPlayerInit","LOCALS",0)
   !Global("SaliaRomance","GLOBAL",2)
THEN 
   RESPONSE #100
   SetGlobal("BodhiHatesPlayerInit","LOCALS",1)
   LeaveParty()
   Enemy()
   DisplayStringHead(Myself,~Bodhi calls me!~)
END   

IF 
   Dead("c6bodhi")
   Global("BodhiControlsVampires","GLOBAL",1)
   Global("BodhiHatesPlayer","GLOBAL",1)
   Global("BodhiHatesPlayerInit","LOCALS",1)
   !Global("SaliaRomance","GLOBAL",2)
THEN 
   RESPONSE #100
   	ChangeEnemyAlly(Myself,NEUTRAL)
	ClearActions(Myself)
	SetGlobal("BodhiHatesPlayerInit","LOCALS",2)
   DisplayStringHead(Myself,~What was that?~)	
END     

IF 
StateCheck(Myself,STATE_PANIC)
   InParty("c6bodhi")
   !Dead("c6bodhi")
   Global("BodhiControlsVampires","GLOBAL",1)
THEN 
   RESPONSE #100
		ForceSpell(Myself,CLERIC_REMOVE_FEAR)
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")
  !See([ENEMY])
  !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


IF
    !InParty(Myself)
	ActionListEmpty()
	See(NearestEnemyOf(Myself))
	InWeaponRange(LastSeenBy(Myself))
THEN
	RESPONSE #100
		AttackReevaluate(NearestEnemyOf(Myself),30)
END

IF
   !InParty(Myself)
	ActionListEmpty()
	AttackedBy([ANYONE],DEFAULT)
	InWeaponRange(LastSeenBy(Myself))
THEN
	RESPONSE #100
		Attack(LastAttackerOf(Myself))
END

IF
    !InParty(Myself)
	ActionListEmpty()
	See(NearestEnemyOf(Myself))
THEN
	RESPONSE #100
		MoveToObject(LastSeenBy(Myself))
END