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


IF
	See(Player1)
Global("BodhiStronghold","GLOBAL",2)
Global("TalkAboutFeast","LOCALS",0)
RandomNumLT(100,10)
THEN
	RESPONSE #100
 		SetGlobal("TalkAboutFeast","LOCALS",1)
         SetGlobal("BodhiStrongholdPledged","LOCALS",1)
		StartDialogueNoSet(Player1)
		Wait(3)
		SetGlobal("TalkAboutFeast","LOCALS",2)
END

IF
	See(Player1)
Global("BodhiStronghold","GLOBAL",2)
Global("FeastStarted","GLOBAL",1)
Global("AcquiredFood01","GLOBAL",1)
Global("AcquiredFood02","GLOBAL",1) 
Global("AcquiredFood03","GLOBAL",1) 
Global("AcquiredFood04","GLOBAL",1) 
Global("AcquiredFood05","GLOBAL",1) 
Global("AcquiredFood06","GLOBAL",1) 
Global("AcquiredFood07","GLOBAL",1) 
Global("AcquiredFood08","GLOBAL",1) 
Global("AcquiredFood09","GLOBAL",1) 
Global("AcquiredFood10","GLOBAL",1) 
Global("AcquiredFood11","GLOBAL",1) 
Global("AcquiredFood12","GLOBAL",1) 
Global("TalkAboutFeastEnded","LOCALS",0)
THEN
	RESPONSE #100
 		SetGlobal("TalkAboutFeastEnded","LOCALS",1)
		StartDialogueNoSet(Player1)
SetGlobal("FeastStarted","GLOBAL",2)		
END

IF
	See(Player1)
Global("BodhiStronghold","GLOBAL",2)
Global("FeastStarted","GLOBAL",3)
Dead("VVFOOD01")
Dead("VVFOOD02")
Dead("VVFOOD03")
Dead("VVFOOD04")
Dead("VVFOOD05")
Dead("VVFOOD06")
Dead("VVFOOD07")
Dead("VVFOOD08")
Dead("VVFOOD09")
Dead("VVFOOD10")
Dead("VVFOOD11")
Dead("VVFOOD12")
Global("TalkAboutFeastGood","LOCALS",0)
THEN
	RESPONSE #100
 		SetGlobal("TalkAboutFeastGood","LOCALS",1)
		StartDialogueNoSet(Player1)	
END

IF 
   !Dead("c6bodhi")
   Global("BodhiControlsVampires","GLOBAL",1)
   Global("BodhiHatesPlayer","GLOBAL",1)
   Global("BodhiHatesPlayerInit","LOCALS",0)
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)
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



IF 
Global("FeastStarted","GLOBAL",1)
See("VVFOOD01")
Global("SeeFood01","LOCALS",0)
THEN
  RESPONSE #100
  SetGlobal("SeeFood01","LOCALS",1)
  DisplayStringHead(Myself,~What is a coincidence! Blue blood in our graveyard!~)
END  


IF 
Global("FeastStarted","GLOBAL",1)
See("VVFOOD02")
Global("SeeFood02","LOCALS",0)
THEN
  RESPONSE #100
  SetGlobal("SeeFood02","LOCALS",1)
  DisplayStringHead(Myself,~I like noble blood the most!~)
END  



IF 
Global("FeastStarted","GLOBAL",1)
See("VVFOOD03")
Global("SeeFood03","LOCALS",0)
THEN
  RESPONSE #100
  SetGlobal("SeeFood03","LOCALS",1)
  DisplayStringHead(Myself,~See, <CHARNAME>, a noble food!~)
END  


IF 
Global("FeastStarted","GLOBAL",1)
See("VVFOOD04")
Global("SeeFood04","LOCALS",0)
THEN
  RESPONSE #100
  SetGlobal("SeeFood04","LOCALS",1)
  DisplayStringHead(Myself,~This aristocrate is tasty for sure!~)
END  


IF 
Global("FeastStarted","GLOBAL",1)
See("VVFOOD05")
Global("SeeFood05","LOCALS",0)
THEN
  RESPONSE #100
  SetGlobal("SeeFood05","LOCALS",1)
  DisplayStringHead(Myself,~Pure, but with a special flavour.~)
END  



IF 
Global("FeastStarted","GLOBAL",1)
See("VVFOOD06")
Global("SeeFood06","LOCALS",0)
THEN
  RESPONSE #100
  SetGlobal("SeeFood06","LOCALS",1)
  DisplayStringHead(Myself,~He could became a mage, but became a looser. But too tasty to leave him go.~)
END  



IF 
Global("FeastStarted","GLOBAL",1)
See("VVFOOD07")
Global("SeeFood07","LOCALS",0)
THEN
  RESPONSE #100
  SetGlobal("SeeFood07","LOCALS",1)
  DisplayStringHead(Myself,~I love the ones who like to eat. They always have big amount of blood.~)
END  





IF 
Global("FeastStarted","GLOBAL",1)
See("VVFOOD08")
Global("SeeFood08","LOCALS",0)
THEN
  RESPONSE #100
  SetGlobal("SeeFood08","LOCALS",1)
  DisplayStringHead(Myself,~This one will die from hunger. But not his.~)
END  




IF 
Global("FeastStarted","GLOBAL",1)
See("VVFOOD09")
Global("SeeFood09","LOCALS",0)
THEN
  RESPONSE #100
  SetGlobal("SeeFood09","LOCALS",1)
  DisplayStringHead(Myself,~Another looser, but I smell something similar in her blood.~)
END  





IF 
Global("FeastStarted","GLOBAL",1)
See("VVFOOD10")
Global("SeeFood10","LOCALS",0)
THEN
  RESPONSE #100
  SetGlobal("SeeFood10","LOCALS",1)
  DisplayStringHead(Myself,~I like travellers. There is a taste of distant lands in their blood.~)
END  





IF 
Global("FeastStarted","GLOBAL",1)
See("VVFOOD11")
Global("SeeFood11","LOCALS",0)
THEN
  RESPONSE #100
  SetGlobal("SeeFood11","LOCALS",1)
  DisplayStringHead(Myself,~This one is pretty. I almost let her go. But not.~)
END  



IF 
Global("FeastStarted","GLOBAL",1)
See("VVFOOD12")
Global("SeeFood12","LOCALS",0)
THEN
  RESPONSE #100
  SetGlobal("SeeFood12","LOCALS",1)
  DisplayStringHead(Myself,~I'd like to play with her a little. But my mom said to not play with food.~)
END  




