IF
	HotKey(H)
THEN
	RESPONSE #100
		VerbalConstant(Myself,HURT)
		Help()
		Continue()
END

IF
	HitBy([ANYONE],POISON)
	HasItem("POTN20",Myself) // Antidote
THEN
	RESPONSE #100
		UseItem("POTN20",Myself) // Antidote
END

IF
	HitBy([ANYONE],POISON)
	HaveSpell(INNATE_SLOW_POISON)
THEN
	RESPONSE #100
		Spell(Myself,INNATE_SLOW_POISON)
END

IF
	HitBy([ANYONE],POISON)
	HaveSpell(CLERIC_NEUTRALIZE_POISON)
THEN
	RESPONSE #100
		Spell(Myself,CLERIC_NEUTRALIZE_POISON)
END

IF
	HitBy([ANYONE],POISON)
	HaveSpell(CLERIC_SLOW_POISON)
THEN
	RESPONSE #100
		Spell(Myself,CLERIC_SLOW_POISON)
END

IF
	HitBy([ANYONE],POISON)
THEN
	RESPONSE #100
		Shout(1)
		Continue()
END

IF
	Heard([PC],1)
	HaveSpell(INNATE_SLOW_POISON)
THEN
	RESPONSE #100
		Spell(LastHeardBy(Myself),INNATE_SLOW_POISON)
		Wait(5)
END

IF
	Heard([PC],1)
	HaveSpell(CLERIC_NEUTRALIZE_POISON)
THEN
	RESPONSE #100
		Spell(LastHeardBy(Myself),CLERIC_NEUTRALIZE_POISON)
		Wait(5)
END

IF
	Heard([PC],1)
	HaveSpell(CLERIC_SLOW_POISON)
THEN
	RESPONSE #100
		Spell(LastHeardBy(Myself),CLERIC_SLOW_POISON)
		Wait(5)
END

IF
	HPPercentLT(Myself,35)
	HaveSpell(INNATE_LAY_ON_HANDS)
THEN
	RESPONSE #100
		Spell(Myself,INNATE_LAY_ON_HANDS)
END

IF
	HPPercentLT(Myself,35)
	HaveSpell(INNATE_CURE_LIGHT_WOUNDS)
THEN
	RESPONSE #100
		Spell(Myself,INNATE_CURE_LIGHT_WOUNDS)
END

IF
	HPPercentLT(Myself,35)
	HaveSpell(CLERIC_CURE_CRITICAL_WOUNDS)
THEN
	RESPONSE #100
		Spell(Myself,CLERIC_CURE_CRITICAL_WOUNDS)
END

IF
	HPPercentLT(Myself,35)
	HaveSpell(CLERIC_CURE_SERIOUS_WOUNDS)
THEN
	RESPONSE #100
		Spell(Myself,CLERIC_CURE_SERIOUS_WOUNDS)
END

IF
	HPPercentLT(Myself,35)
	HaveSpell(CLERIC_CURE_LIGHT_WOUNDS)
THEN
	RESPONSE #100
		Spell(Myself,CLERIC_CURE_LIGHT_WOUNDS)
END

IF
	HPPercentLT(Myself,35)
	HasItem("POTN08",Myself) // Potion of Healing
THEN
	RESPONSE #100
		UseItem("POTN08",Myself) // Potion of Healing
END

IF
	Delay(2)
	HPPercentLT(Myself,35)
THEN
	RESPONSE #95
		Shout(2)
		Continue()
	RESPONSE #5
		VerbalConstant(Myself,HURT)
		Shout(2)
		Continue()
END

IF
	Heard([PC],2)
	HaveSpell(INNATE_LAY_ON_HANDS)
THEN
	RESPONSE #100
		Spell(LastHeardBy(Myself),INNATE_LAY_ON_HANDS)
END

IF
	Heard([PC],2)
	HaveSpell(INNATE_CURE_LIGHT_WOUNDS)
THEN
	RESPONSE #100
		Spell(LastHeardBy(Myself),INNATE_CURE_LIGHT_WOUNDS)
END

IF
	Heard([PC],2)
	HaveSpell(CLERIC_CURE_CRITICAL_WOUNDS)
THEN
	RESPONSE #100
		Spell(LastHeardBy(Myself),CLERIC_CURE_CRITICAL_WOUNDS)
END

IF
	Heard([PC],2)
	HaveSpell(CLERIC_CURE_SERIOUS_WOUNDS)
THEN
	RESPONSE #100
		Spell(LastHeardBy(Myself),CLERIC_CURE_SERIOUS_WOUNDS)
END

IF
	Heard([PC],2)
	HaveSpell(CLERIC_CURE_LIGHT_WOUNDS)
THEN
	RESPONSE #100
		Spell(LastHeardBy(Myself),CLERIC_CURE_LIGHT_WOUNDS)
END

IF
	AttackedBy([ANYONE],DEFAULT)
	InParty(LastAttackerOf(Myself))
THEN
	RESPONSE #100
		RunAwayFrom(LastAttackerOf(Myself),75)
END

IF
	AttackedBy([ENEMY],DEFAULT)
	Range(LastAttackerOf(Myself),5)
	!StateCheck(LastAttackerOf(Myself),STATE_PANIC)
	!Class(Myself,FIGHTER_MAGE_THIEF)
THEN
	RESPONSE #100
		Shout(3)
		EquipMostDamagingMelee()
		AttackReevaluate(LastAttackerOf(Myself),30)
END

IF
	AttackedBy([ENEMY],DEFAULT)
THEN
	RESPONSE #100
		Shout(3)
		EquipRanged()
		AttackReevaluate(LastAttackerOf(Myself),30)
END

IF
	Heard([PC],3)
	!InParty(LastAttackerOf(LastHeardBy(Myself)))
	Range(LastAttackerOf(LastHeardBy(Myself)),5)
	!StateCheck(LastAttackerOf(LastHeardBy(Myself)),STATE_PANIC)
	!Class(Myself,FIGHTER_MAGE_THIEF)
THEN
	RESPONSE #100
		EquipMostDamagingMelee()
		AttackReevaluate(LastAttackerOf(LastHeardBy(Myself)),30)
END

IF
	Heard([PC],3)
	!InParty(LastAttackerOf(LastHeardBy(Myself)))
THEN
	RESPONSE #100
		EquipRanged()
		AttackReevaluate(LastAttackerOf(LastHeardBy(Myself)),30)
END

IF
	See(NearestEnemyOf(Myself))
	!InParty(NearestEnemyOf(Myself))
	Range(NearestEnemyOf(Myself),5)
	!StateCheck(NearestEnemyOf(Myself),STATE_PANIC)
	!Class(Myself,FIGHTER_MAGE_THIEF)
THEN
	RESPONSE #100
		Shout(4)
		EquipMostDamagingMelee()
		AttackReevaluate(NearestEnemyOf(Myself),30)
END

IF
	See(NearestEnemyOf(Myself))
	!InParty(NearestEnemyOf(Myself))
THEN
	RESPONSE #100
		Shout(4)
		EquipRanged()
		AttackReevaluate(NearestEnemyOf(Myself),30)
END

IF
	Heard([PC],4)
	!InParty(NearestEnemyOf(LastHeardBy(Myself)))
	Range(NearestEnemyOf(LastHeardBy(Myself)),5)
	!StateCheck(NearestEnemyOf(LastHeardBy(Myself)),STATE_PANIC)
	!Class(Myself,FIGHTER_MAGE_THIEF)
THEN
	RESPONSE #100
		EquipMostDamagingMelee()
		AttackReevaluate(NearestEnemyOf(LastHeardBy(Myself)),30)
END

IF
	Heard([PC],4)
	!InParty(NearestEnemyOf(LastHeardBy(Myself)))
THEN
	RESPONSE #100
		EquipRanged()
		AttackReevaluate(NearestEnemyOf(LastHeardBy(Myself)),30)
END

IF
	!See([ENEMY])
	Help([PC])
	!Range(LastHelp(Myself),5)
THEN
	RESPONSE #100
		MoveToObject(LastHelp(Myself))
END

IF
	!See([ENEMY])
	HPPercentLT(Myself,100)
	HPPercentGT(Myself,85)
	HasItem("GBERRY",Myself) // Good Berry
	ActionListEmpty()
THEN
	RESPONSE #100
		UseItem("GBERRY",Myself) // Good Berry
END

IF
	Delay(30)
	!See([ENEMY])
	!HasItem("GBERRY",Myself) // Good Berry
	HaveSpell(CLERIC_GOOD_BERRIES)
	ActionListEmpty()
THEN
	RESPONSE #100
		Spell(Myself,CLERIC_GOOD_BERRIES)
END


