IF
  Global("prep","locals",0)
THEN
    RESPONSE #100
             SetGlobal("prep","locals",1)
             Ally()
END

IF
  AttackedBy([GOODCUTOFF],DEFAULT)
  !Allegiance(Myself,ENEMY)
  !StateCheck(LastAttackerOf,STATE_CHARMED)
  !StateCheck(LastAttackerOf,STATE_BERSERK)
  !StateCheck(LastAttackerOf,STATE_CONFUSED)
  Global("tb#lotrkilledamn","global",0)
THEN
  RESPONSE #100
           Enemy()
           DisplayStringHead(Myself,@0)
	   SetGlobal("tb#lotrkilledamn","global",1)
END

IF
  Global("tb#lotrkilledamn","global",1)
  !Detect("tb#lotrc")
  !Detect("tb#lotrw")
THEN
    RESPONSE #100
    	     Wait(2)
    	     DisplayStringHead(Myself,@1)
	   SetGlobal("tb#lotrkilledamn","global",2)
END

IF
  Global("tb#lotrkilledamn","global",2)
THEN
    RESPONSE #100
    	     Wait(2)
    	     DisplayStringHead(Myself,@10)
    	     Wait(2)
    	     DestroySelf()
END

IF
  !See([PC])
  !See(NearestEnemyOf(Myself))
  Delay(6)
THEN
    RESPONSE #100
    	     MoveToObject(Player1)
    	     DisplayStringHead(Myself,@2)
END

IF
  HPPercentLT(Myself,25)
  !GlobalTimerNotExpired("shouted1","locals")
  ActionListEmpty()
THEN
    RESPONSE #100
    	     DisplayStringHead(Myself,@3)
    	     SetGlobalTimer("shouted1","locals",6)
    	     PauseGame()
END

IF
  HPPercentLT(Myself,50)
  HPPercentGT(Myself,25)
  !GlobalTimerNotExpired("shouted","locals")
  ActionListEmpty()
THEN
    RESPONSE #100
	     DisplayStringHead(Myself,@4)
    	     SetGlobalTimer("shouted","locals",12)
END

IF
  ActionListEmpty()
THEN
    RESPONSE #100
             AttackOneRound(NearestEnemyOf)
END

