IF
  Die()
THEN
  RESPONSE #100
    Shout(66)
END

IF
  OR(2)
    Heard([EVILCUTOFF],79)
    Heard([NEUTRAL],79)
  Allegiance(Myself,NEUTRAL)
  !Global("BP_PlotMan","LOCALS",1)
THEN
  RESPONSE #100
    Enemy()
    Continue()
END

IF
  OR(2)
    Heard([EVILCUTOFF],89)
    Heard([NEUTRAL],89)
  Allegiance(Myself,NEUTRAL)
  !Global("BP_PlotMan","LOCALS",1)
THEN
  RESPONSE #100
    Enemy()
    Continue()
END

IF
  OR(2)
    Heard([NEUTRAL],151)
    Heard([EVILCUTOFF],151)
  Allegiance(Myself,NEUTRAL)
  !Global("BP_PlotMan","LOCALS",1)
THEN
  RESPONSE #100
    Enemy()
    Continue()
END

IF
   CheckStatGT(Myself,7,INT)
  OR(2)
    HitBy([PC],CRUSHING)
    AttackedBy([PC],DEFAULT)
  Allegiance(Myself,NEUTRAL)
  Class(Myself,INNOCENT)
THEN
  RESPONSE #100
    DisplayStringHead(Myself,@0)
    Shout(101)
    Enemy()
    Continue()
END


IF
  CheckStatGT(Myself,7,INT)
  !Allegiance(Myself,ENEMY)
  !Allegiance(Myself,PC)
  OR(2)
    AttackedBy([GOODCUTOFF],DEFAULT)
    Allegiance(LastAttackerOf(Myself),GOODCUTOFF)
THEN
  RESPONSE #100
    DisplayStringHead(Myself,@1)
    Shout(151)
    Enemy()
    Continue()
END

IF
  CheckStatGT(Myself,7,INT)
  !Allegiance(Myself,ENEMY)
  !Allegiance(Myself,GOODCUTOFF)
  OR(2)
    HitBy([GOODCUTOFF],CRUSHING)
    Allegiance(LastHitter(Myself),GOODCUTOFF)
THEN
  RESPONSE #100
    DisplayStringHead(Myself,@1)
    Shout(151)
    Enemy()
    Continue()
END

IF
  Heard([EVILCUTOFF],82)
  !Range(LastHeardBy(Myself),1)
  Global("BP_PlotMan","LOCALS",0)
  !Allegiance(Myself,ENEMY)
  !Allegiance(Myself,PC)
  !Class(Myself,INNOCENT)
  See(LastHeardBy(Myself))
  Global("March","LOCALS",0)
THEN
  RESPONSE #90
    Enemy()
    MoveToObjectFollow(LastHeardBy(Myself))
    SetGlobal("March","LOCALS",1)
  RESPONSE #10
    Enemy()
    SetGlobal("March","LOCALS",1)
END

IF
  OR(2)
    Heard([EVILCUTOFF],101)
    Heard([NEUTRAL],101)
  !Range(LastHeardBy(Myself),1)
  !Allegiance(Myself,ENEMY)
  !Allegiance(Myself,PC)
  Class(Myself,INNOCENT)
  !Global("BP_PlotMan","LOCALS",1)
THEN
  RESPONSE #75
    Enemy()
    Shout(101)
    RunAwayFrom(LastAttackerOf(LastHeardBy(Myself)),40)
  RESPONSE #25
    Continue()
END

IF
  CheckStatGT(Myself,7,INT)
  OR(2)
    Heard([EVILCUTOFF],101)
    Heard([NEUTRAL],101)
  !Range(LastHeardBy(Myself),1)
  !Allegiance(Myself,ENEMY)
  !Allegiance(Myself,PC)
  !Class(Myself,INNOCENT)
  !Global("BP_PlotMan","LOCALS",1)
  !GlobalTimerNotExpired("BUSY","LOCALS")
THEN
  RESPONSE #40
    SetGlobalTimer("BUSY","LOCALS",THREE_ROUNDS)
    Enemy()
    ProtectObject(LastHeardBy(Myself),15)
  RESPONSE #30
    SetGlobalTimer("BUSY","LOCALS",TWO_ROUNDS)
    Enemy()
    MoveToObject(LastHeardBy(Myself))
    ProtectObject(LastHeardBy(Myself),5)
  RESPONSE #20
    SetGlobalTimer("BUSY","LOCALS",TWO_ROUNDS)
    Continue()
END

IF
  CombatCounter(0)
  Class(Myself,INNOCENT)
  !Allegiance(Myself,NEUTRAL)
  !See([PC])
THEN
  RESPONSE #100
    Wait(6)
    ChangeEnemyAlly(Myself,NEUTRAL)
END

IF
  HitBy(Myself,CRUSHING)
THEN
  RESPONSE #100
    RunAwayFrom(Nearest,15)
END

IF
  CheckStatGT(Myself,7,INT)
  Allegiance(Myself,EVILCUTOFF)
  !See(NearestEnemyOf(Myself))
  Heard([EVILCUTOFF],111)
  !Range(LastHeardBy(Myself),1)
  !GlobalTimerNotExpired("BUSY","LOCALS")
THEN
  RESPONSE #100
    SetGlobalTimer("BUSY","LOCALS",TWO_ROUNDS)
    DisplayStringHead(Myself,@2)
    MoveToObject(LastHeardBy(Myself))
END

IF
  CheckStatGT(Myself,7,INT)
  Allegiance(Myself,EVILCUTOFF)
  Detect([EVILCUTOFF])
  See(NearestEnemyOf(Myself))
  !Range(NearestEnemyOf(Myself),20)
  Global("BP_Shouted","LOCALS",0)
THEN
  RESPONSE #100
    DisplayStringHead(Myself,@3)
    Shout(111)
    SetGlobal("BP_Shouted","LOCALS",1)
END

IF
  ActionListEmpty()
  BreakingPoint()
  !GlobalTimerNotExpired("BPW","LOCALS")
  Allegiance(Myself,EVILCUTOFF)
  Detect([EVILCUTOFF])
THEN
  RESPONSE #50
    SetGlobalTimer("BPW","LOCALS",ONE_ROUND)
    DisplayStringHead(Myself,@4)
    Shout(124)
  RESPONSE #50
    SetGlobalTimer("BPW","LOCALS",ONE_ROUND)
    DisplayStringHead(Myself,@4)
    Shout(124)
  RESPONSE #50
    SetGlobalTimer("BPW","LOCALS",ONE_ROUND)
    DisplayStringHead(Myself,@4)
    Shout(124)
END

IF
  ActionListEmpty()
  HPPercentLT(Myself,20)
  Global("LastWhines","LOCALS",0)
  Allegiance(Myself,EVILCUTOFF)
  Detect([EVILCUTOFF])
THEN
  RESPONSE #100
    SetGlobal("LastWhines","LOCALS",1)
    DisplayStringHead(Myself,@4)
    Shout(124)
    RunAwayFrom(Nearest,45)
END

IF
  ActionListEmpty()
  HPPercentLT(Myself,35)
  !GlobalTimerNotExpired("BPW","LOCALS")
  Allegiance(Myself,EVILCUTOFF)
  Detect([EVILCUTOFF])
  !HasItem("POTN52",Myself)
  !HasItem("POTN55",Myself)
THEN
  RESPONSE #100
    SetGlobalTimer("BPW","LOCALS",TWO_ROUNDS)
    DisplayStringHead(Myself,@5)
    Shout(123)
END

IF
  ActionListEmpty()
  HPPercentLT(Myself,50)
  !GlobalTimerNotExpired("BPW","LOCALS")
  AttackedBy([GOODCUTOFF],DEFAULT)
  Allegiance(Myself,EVILCUTOFF)
  Detect([EVILCUTOFF])
THEN
  RESPONSE #100
    DisplayStringHead(Myself,@5)
    SetGlobalTimer("BPW","LOCALS",10)
    Shout(124)
END

IF
  Allegiance(Myself,NEUTRAL)
  Heard([NEUTRAL],151)
  !Class(Myself,INNOCENT)
  !Global("BP_PlotMan","LOCALS",1)
  !Range(LastHeardBy(Myself),1)
  See(LastHeardBy(Myself))
  OR(2)
    See(LastAttackerOf(LastHeardBy(Myself)))
    See(LastHitter(LastHeardBy(Myself)))
  !Allegiance(LastSeenBy(Myself),NEUTRAL)
  !Range(NearestEnemyOf(Myself),3)
  !GlobalTimerNotExpired("BUSY","LOCALS")
THEN
  RESPONSE #65
    SetGlobalTimer("BUSY","LOCALS",TWO_ROUNDS)
    AttackOneRound(LastSeenBy(Myself))
  RESPONSE #35
    SetGlobalTimer("BUSY","LOCALS",TWO_ROUNDS)
    SetGlobalTimer("BUSY","LOCALS",TWO_ROUNDS)
END

IF
  Allegiance(Myself,EVILCUTOFF)
  Heard([EVILCUTOFF],151)
  !Range(LastHeardBy(Myself),1)
  Range(LastHeardBy(Myself),12)
  OR(3)
    See(NearestEnemyOf(Myself))
    See(LastAttackerOf(LastHeardBy(Myself)))
    See(LastHitter(LastHeardBy(Myself)))
  !Allegiance(LastSeenBy(Myself),EVILCUTOFF)
  !Range(NearestEnemyOf(Myself),3)
  !GlobalTimerNotExpired("BUSY","LOCALS")
THEN
  RESPONSE #45
    SetGlobalTimer("BUSY","LOCALS",TWO_ROUNDS)
    AttackOneRound(LastSeenBy(Myself))
  RESPONSE #25
    SetGlobalTimer("BUSY","LOCALS",TWO_ROUNDS)
    AttackOneRound(NearestEnemyOf(Myself))
  RESPONSE #35
    SetGlobalTimer("BUSY","LOCALS",TWO_ROUNDS)
END

IF
  ActionListEmpty()
  !HaveAnySpells()
  Allegiance(Myself,NEUTRAL)
  OR(3)
    Heard(ThirdNearest([NEUTRAL]),111)
    Heard(SecondNearest([NEUTRAL]),111)
    Heard([NEUTRAL],111)
  !Range(LastHeardBy(Myself),1)
  See(LastHeardBy(Myself))
  Global("BP_PlotMan","LOCALS",0)
  !Class(Myself,INNOCENT)
  !Range(NearestEnemyOf(Myself),3)
  !GlobalTimerNotExpired("BUSY","LOCALS")
  OR(3)
    See(NearestEnemyOf(Myself))
    See(LastAttackerOf(LastHeardBy(Myself)))
    See(LastHitter(LastHeardBy(Myself)))
  !Allegiance(LastSeenBy(Myself),NEUTRAL)
THEN
  RESPONSE #60
    SetGlobalTimer("BUSY","LOCALS",TWO_ROUNDS)
    AttackReevaluate(LastSeenBy(Myself),180)
  RESPONSE #40
    SetGlobalTimer("BUSY","LOCALS",THREE_ROUNDS)
    AttackReevaluate(LastSeenBy(Myself),270)
  RESPONSE #40
    SetGlobalTimer("BUSY","LOCALS",FOUR_ROUNDS)
    MoveToObject(LastHeardBy(Myself))
    ProtectObject(LastHeardBy(Myself),5)
  RESPONSE #30
    SetGlobalTimer("BUSY","LOCALS",TWO_ROUNDS)
END

IF
  ActionListEmpty()
  !HaveAnySpells()
  Allegiance(Myself,EVILCUTOFF)
  OR(3)
    Heard(ThirdNearest([EVILCUTOFF]),111)
    Heard(SecondNearest([EVILCUTOFF]),111)
    Heard([EVILCUTOFF],111)
  !Range(LastHeardBy(Myself),1)
  See(LastHeardBy(Myself))
  Global("BP_PlotMan","LOCALS",0)
  !Class(Myself,INNOCENT)
  !GlobalTimerNotExpired("BUSY","LOCALS")
  !Range(NearestEnemyOf(Myself),3)
  OR(3)
    See(NearestEnemyOf(Myself))
    See(LastAttackerOf(LastHeardBy(Myself)))
    See(LastHitter(LastHeardBy(Myself)))
  !Allegiance(LastSeenBy(Myself),EVILCUTOFF)
THEN
  RESPONSE #60
    SetGlobalTimer("BUSY","LOCALS",TWO_ROUNDS)
    AttackReevaluate(LastSeenBy(Myself),180)
  RESPONSE #40
    SetGlobalTimer("BUSY","LOCALS",THREE_ROUNDS)
    AttackReevaluate(LastSeenBy(Myself),270)
  RESPONSE #40
    SetGlobalTimer("BUSY","LOCALS",FOUR_ROUNDS)
    MoveToObject(LastHeardBy(Myself))
    ProtectObject(LastHeardBy(Myself),5)
  RESPONSE #30
    SetGlobalTimer("BUSY","LOCALS",TWO_ROUNDS)
END

IF
  ActionListEmpty()
  Allegiance(Myself,NEUTRAL)
  OR(3)
    Heard(ThirdNearest([NEUTRAL]),124)
    Heard(SecondNearest([NEUTRAL]),124)
    Heard([NEUTRAL],124)
  !Range(LastHeardBy(Myself),1)
  Global("BP_PlotMan","LOCALS",0)
  !Class(Myself,INNOCENT)
  !HaveAnySpells()
  Range(LastHeardBy(Myself),15)
  !GlobalTimerNotExpired("BUSY","LOCALS")
  !Range(NearestEnemyOf(Myself),3)
  OR(3)
    See(ThirdNearestEnemyOf(LastHeardBy(Myself)))
    See(LastAttackerOf(LastHeardBy(Myself)))
    See(LastHitter(LastHeardBy(Myself)))
  HPGT(LastSeenBy(Myself),0)
  !Allegiance(LastSeenBy(Myself),NEUTRAL)
THEN
  RESPONSE #40
    SetGlobalTimer("BUSY","LOCALS",FOUR_ROUNDS)
    MoveToObject(LastHeardBy(Myself))
    AttackReevaluate(LastSeenBy(Myself),180)
  RESPONSE #30
    SetGlobalTimer("BUSY","LOCALS",FOUR_ROUNDS)
    AttackReevaluate(LastSeenBy(Myself),270)
  RESPONSE #30
    SetGlobalTimer("BUSY","LOCALS",TWO_ROUNDS)
    AttackOneRound(LastSeenBy(Myself))
  RESPONSE #20
    SetGlobalTimer("BUSY","LOCALS",TWO_ROUNDS)
END

IF
  ActionListEmpty()
  Allegiance(Myself,EVILCUTOFF)
  OR(3)
    Heard(ThirdNearest([EVILCUTOFF]),124)
    Heard(SecondNearest([EVILCUTOFF]),124)
    Heard([EVILCUTOFF],124)
  !Range(LastHeardBy(Myself),1)
  Global("BP_PlotMan","LOCALS",0)
  !Class(Myself,INNOCENT)
  !HaveAnySpells()
  Range(LastHeardBy(Myself),15)
  !GlobalTimerNotExpired("BUSY","LOCALS")
  !Range(NearestEnemyOf(Myself),3)
  OR(3)
    See(ThirdNearestEnemyOf(LastHeardBy(Myself)))
    See(LastAttackerOf(LastHeardBy(Myself)))
    See(LastHitter(LastHeardBy(Myself)))
  HPGT(LastSeenBy(Myself),0)
  !Allegiance(LastSeenBy(Myself),EVILCUTOFF)
THEN
  RESPONSE #40
    SetGlobalTimer("BUSY","LOCALS",FOUR_ROUNDS)
    MoveToObject(LastHeardBy(Myself))
    AttackReevaluate(LastSeenBy(Myself),180)
  RESPONSE #30
    SetGlobalTimer("BUSY","LOCALS",FOUR_ROUNDS)
    AttackReevaluate(LastSeenBy(Myself),270)
  RESPONSE #30
    SetGlobalTimer("BUSY","LOCALS",TWO_ROUNDS)
    AttackOneRound(LastSeenBy(Myself))
  RESPONSE #20
    SetGlobalTimer("BUSY","LOCALS",TWO_ROUNDS)
END

IF
  ActionListEmpty()
  Allegiance(Myself,NEUTRAL)
  OR(3)
    Heard(ThirdNearest([NEUTRAL]),66)
    Heard(SecondNearest([NEUTRAL]),66)
    Heard([NEUTRAL],66)
  !Range(LastHeardBy(Myself),1)
  Global("BP_PlotMan","LOCALS",0)
  !Class(Myself,INNOCENT)
  !HaveAnySpells()
  Range(LastHeardBy(Myself),15)
  !GlobalTimerNotExpired("BUSY","LOCALS")
  See(LastHitter(LastHeardBy(Myself)))
  HPGT(LastSeenBy(Myself),0)
  !Allegiance(LastSeenBy(Myself),NEUTRAL)
THEN
  RESPONSE #30
    SetGlobalTimer("BUSY","LOCALS",TWO_ROUNDS)
    DisplayStringHead(Myself,@6)
    AttackReevaluate(LastSeenBy(Myself),180)
  RESPONSE #10
    SetGlobalTimer("BUSY","LOCALS",THREE_ROUNDS)
    DisplayStringHead(Myself,@7)
    Attack(LastSeenBy(Myself))
  RESPONSE #60
    Wait(1)
    SetGlobalTimer("BUSY","LOCALS",TWO_ROUNDS)
END

IF
  ActionListEmpty()
  Allegiance(Myself,EVILCUTOFF)
  OR(3)
    Heard(ThirdNearest([EVILCUTOFF]),66)
    Heard(SecondNearest([EVILCUTOFF]),66)
    Heard([EVILCUTOFF],66)
  !Range(LastHeardBy(Myself),1)
  Global("BP_PlotMan","LOCALS",0)
  !Class(Myself,INNOCENT)
  !HaveAnySpells()
  Range(LastHeardBy(Myself),15)
  !GlobalTimerNotExpired("BUSY","LOCALS")
  See(LastHitter(LastHeardBy(Myself)))
  HPGT(LastSeenBy(Myself),0)
  !Allegiance(LastSeenBy(Myself),EVILCUTOFF)
THEN
  RESPONSE #30
    SetGlobalTimer("BUSY","LOCALS",TWO_ROUNDS)
    DisplayStringHead(Myself,@6)
    AttackReevaluate(LastSeenBy(Myself),180)
  RESPONSE #10
    SetGlobalTimer("BUSY","LOCALS",THREE_ROUNDS)
    DisplayStringHead(Myself,@7)
    Attack(LastSeenBy(Myself))
  RESPONSE #60
    Wait(1)
    SetGlobalTimer("BUSY","LOCALS",TWO_ROUNDS)
END

IF
  ActionListEmpty()
  !HaveAnySpells()
  Allegiance(Myself,NEUTRAL)
  CheckStatGT(Myself,9,INT)
  OR(3)
    Heard(ThirdNearest([NEUTRAL]),69)
    Heard(SecondNearest([NEUTRAL]),69)
    Heard([NEUTRAL],69)
  !Range(LastHeardBy(Myself),1)
  !Allegiance(LastHitter(LastHeardBy(Myself)),NEUTRAL)
  Range(LastHeardBy(Myself),25)
  !Range(NearestEnemyOf(Myself),3)
  HPPercentGT(Myself,50)
  !GlobalTimerNotExpired("BUSY","LOCALS")
  OR(3)
    See(ThirdNearestEnemyOf(LastHeardBy(Myself)))
    See(SecondNearestEnemyOf(LastHeardBy(Myself)))
    See(LastAttackerOf(LastHeardBy(Myself)))
  !Allegiance(LastSeenBy(Myself),NEUTRAL)
THEN
  RESPONSE #50
    AttackReevaluate(LastSeenBy(Myself),180)
    SetGlobalTimer("BUSY","LOCALS",THREE_ROUNDS)
  RESPONSE #30
    MoveToObject(LastHeardBy(Myself))
    ProtectObject(LastHeardBy(Myself),6)
    SetGlobalTimer("BUSY","LOCALS",THREE_ROUNDS)
  RESPONSE #20
    SetGlobalTimer("BUSY","LOCALS",TWO_ROUNDS)
END

IF
  ActionListEmpty()
  !HaveAnySpells()
  CheckStatGT(Myself,9,INT)
  OR(3)
    Heard(ThirdNearest([EVILCUTOFF]),69)
    Heard(SecondNearest([EVILCUTOFF]),69)
    Heard([EVILCUTOFF],69)
  !Range(LastHeardBy(Myself),1)
  Allegiance(Myself,EVILCUTOFF)
  !Allegiance(LastHitter(LastHeardBy(Myself)),EVILCUTOFF)
  !Range(NearestEnemyOf(Myself),3)
  Range(LastHeardBy(Myself),25)
  HPPercentGT(Myself,50)
  !GlobalTimerNotExpired("BUSY","LOCALS")
  OR(3)
    See(ThirdNearestEnemyOf(LastHeardBy(Myself)))
    See(SecondNearestEnemyOf(LastHeardBy(Myself)))
    See(LastAttackerOf(LastHeardBy(Myself)))
  !Allegiance(LastSeenBy(Myself),EVILCUTOFF)
THEN
  RESPONSE #50
    AttackReevaluate(LastSeenBy(Myself),180)
    SetGlobalTimer("BUSY","LOCALS",THREE_ROUNDS)
  RESPONSE #30
    MoveToObject(LastHeardBy(Myself))
    ProtectObject(LastHeardBy(Myself),6)
    SetGlobalTimer("BUSY","LOCALS",THREE_ROUNDS)
  RESPONSE #20
    SetGlobalTimer("BUSY","LOCALS",TWO_ROUNDS)
END
