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

IF
  Global("BPCHARM","LOCALS",1)
  !StateCheck(Myself,STATE_CHARMED)
THEN
  RESPONSE #100
    SetGlobal("BPCHARM","LOCALS",0)
    ClearActions(Myself)
    Continue()
END

IF
  Heard([ANYONE],124)
  Allegiance(Myself,NEUTRAL)
  !Global("BP_PlotMan","LOCALS",1)
THEN
  RESPONSE #100
    Enemy()
END

IF
  AttackedBy([GOODCUTOFF],DEFAULT)
  !Allegiance(Myself,ENEMY)
  !Allegiance(Myself,PC)
THEN
  RESPONSE #100
    Enemy()
    Shout(125)
END

IF
  Allegiance(Myself,EVILCUTOFF)
  Heard([EVILCUTOFF],125)
  !See([GOODCUTOFF])
  !TargetUnreachable(LastHeardBy(Myself))
THEN
  RESPONSE #100
    MoveToObject(LastHeardBy(Myself))
END

IF
  OR(2)
    !Allegiance(Myself,EVILCUTOFF)
    !Detect([GOODCUTOFF])
THEN
  RESPONSE #100
END

IF
  See(NearestEnemyOf(Myself))
  Global("SHOUT","LOCALS",0)
THEN
  RESPONSE #100
    SetGlobal("SHOUT","LOCALS",1)
    Shout(125)
END

IF
  TargetUnreachable(LastSeenBy(Myself))
  Delay(6)
THEN
  RESPONSE #100
    ClearActions(Myself)
    Continue()
END

IF
  General(Myself,UNDEAD)
  OR(2)
    TurnedBy([GOODCUTOFF.0.0.CLERIC_ALL])
    TurnedBy([GOODCUTOFF.0.0.PALADIN_ALL])
THEN
  RESPONSE #100
END

IF
  ActionListEmpty()
  CheckStat(Myself,1,SCRIPTINGSTATE4)
  See(NearestEnemyOf(Myself))
THEN
  RESPONSE #100
    AttackOneRound(NearestEnemyOf(Myself))
END

IF
  HasItem("potn55",Myself)
  !GlobalTimerNotExpired("POT","LOCALS")
  HPPercentLT(Myself,60)
THEN
  RESPONSE #100
    DisplayStringHead(Myself,46150)
    SetGlobalTimer("POT","LOCALS",6)
    UseItem("potn55",Myself)
END

IF
  HasItem("potn52",Myself)
  !GlobalTimerNotExpired("POT","LOCALS")
  HPPercentLT(Myself,60)
THEN
  RESPONSE #100
    DisplayStringHead(Myself,46150)
    SetGlobalTimer("POT","LOCALS",6)
    UseItem("potn52",Myself)
END

IF
  HasItem("SCRL56",Myself)
  HPPercentLT(Myself,65)
  !GlobalTimerNotExpired("BPT","LOCALS")
  CheckStatGT(Myself,11,INT)
THEN
  RESPONSE #100
    SetGlobalTimer("BPT","LOCALS",6)
    DisplayStringHead(Myself,46153)
    UseItem("SCRL56",Myself)
END

IF
  HasItem("POTN08",Myself)
  !GlobalTimerNotExpired("POT","LOCALS")
  HPPercentLT(Myself,85)
  RandomNumLT(201,80)
THEN
  RESPONSE #100
    SetGlobalTimer("POT","LOCALS",6)
    UseItem("POTN08",Myself)
    DisplayStringHead(Myself,46150)
END

IF
  ActionListEmpty()
  HPPercentLT(Myself,35)
  OR(2)
    General(Myself,HUMANOID)
    General(Myself,GIANTHUMANOID)
  !HasItem("POTN55",Myself)
  !HasItem("POTN52",Myself)
  !GlobalTimerNotExpired("BPW","LOCALS")
  See([EVILCUTOFF])
THEN
  RESPONSE #80
    SetGlobalTimer("BPW","LOCALS",6)
    DisplayStringHead(Myself,72808)
    Shout(123)
  RESPONSE #20
    Continue()
END

IF
  ActionListEmpty()
  HitBy([ANYONE],POISON)
  !StateCheck(Myself,STATE_POISONED)
  !HasItem("DAGG16",LastAttackerOf(Myself))
  !HasItem("SPER10",LastAttackerOf(Myself))
  !HasItem("ETTERC2",LastAttackerOf(Myself))
  !HasItem("Wyvern2",LastAttackerOf(Myself))
  !Kit(LastAttackerOf(Myself),ASSASIN)
  !HasItem("DAGG16",LastHitter(Myself))
  !HasItem("SPER10",LastHitter(Myself))
  !HasItem("HALB05",LastHitter(Myself))
  !HasItem("ETTERC2",LastHitter(Myself))
  !HasItem("Wyvern2",LastHitter(Myself))
  !Kit(LastHitter(Myself),ASSASIN)
THEN
  RESPONSE #100
    DisplayStringHead(Myself,@900)
    Shout(123)
    RandomWalk()
END

IF
  StateCheck(Myself,STATE_POISONED)
  HasItem("potn17",Myself)
  !GlobalTimerNotExpired("POT","LOCALS")
THEN
  RESPONSE #100
    SetGlobalTimer("POT","LOCALS",6)
    DisplayStringHead(Myself,46150)
    UseItem("potn17",Myself)
END

IF
  StateCheck(Myself,STATE_POISONED)
  HasItem("potn20",Myself)
  !GlobalTimerNotExpired("POT","LOCALS")
THEN
  RESPONSE #100
    SetGlobalTimer("POT","LOCALS",6)
    DisplayStringHead(Myself,46150)
    UseItem("potn20",Myself)
END

IF
  ActionListEmpty()
  StateCheck(Myself,STATE_POISONED)
  OR(2)
    General(Myself,HUMANOID)
    General(Myself,GIANTHUMANOID)
  See([EVILCUTOFF])
  !GlobalTimerNotExpired("POIS","LOCALS")
  !HasItem("POTN17",Myself)
  !HasItem("POTN20",Myself)
THEN
  RESPONSE #100
    Shout(123)
    DisplayStringHead(Myself,@901)
    SetGlobalTimer("POIS","LOCALS",6)
END

IF
  ActionListEmpty()
  HasItem("ring05",Myself)
  !GlobalTimerNotExpired("BPT","LOCALS")
  !StateCheck(Myself,STATE_IMPROVEDINVISIBILITY)
  !StateCheck(Myself,STATE_INVISIBLE)
  RandomNumLT(40,27)
THEN
  RESPONSE #100
    SetGlobalTimer("BPT","LOCALS",6)
    DisplayStringHead(Myself,47318)
    UseItem("ring05",Myself)
END

IF
  ActionListEmpty()
  HasItem("potn14",Myself)
  !GlobalTimerNotExpired("BPT","LOCALS")
  !StateCheck(Myself,STATE_HASTED)
  RandomNumLT(42,27)
THEN
  RESPONSE #100
    SetGlobalTimer("BPT","LOCALS",6)
    DisplayStringHead(Myself,46150)
    UseItem("potn14",Myself)
END

IF
  ActionListEmpty()
  HasItem("POTN45",Myself)
  !GlobalTimerNotExpired("BPT","LOCALS")
  CheckStat(Myself,0,0)
  OR(4)
    RandomNumLT(3,3)
    StateCheck(Myself,STATE_HELPLESS)
    !CheckStat(Myself,0,WEB)
    !CheckStat(Myself,0,ENTANGLE)
THEN
  RESPONSE #100
    SetGlobalTimer("BPT","LOCALS",6)
    DisplayStringHead(Myself,46150)
    UseItem("POTN45",Myself)
END

IF
  ActionListEmpty()
  HasItem("potn34",Myself)
  !GlobalTimerNotExpired("BPT","LOCALS")
  OR(5)
    See([GOODCUTOFF.0.0.CLERIC_ALL])
    See([GOODCUTOFF.0.0.BARD_ALL])
    See([GOODCUTOFF.0.0.DRUID_ALL])
    See([GOODCUTOFF.0.0.MAGE_ALL])
    See([GOODCUTOFF.0.0.SORCERER])
  RandomNumLT(50,28)
THEN
  RESPONSE #100
    SetGlobalTimer("BPT","LOCALS",6)
    DisplayStringHead(Myself,46150)
    UseItem("potn34",Myself)
END

IF
  ActionListEmpty()
  HasItem("WAND16",Myself)
  !GlobalTimerNotExpired("BPT","LOCALS")
  CheckStatGT(Myself,8,INT)
  OR(3)
    RandomNum(4,1)
    HitBy([ANYONE],FIRE)
    HitBy([ANYONE],MAGICFIRE)
THEN
  RESPONSE #100
    SetGlobalTimer("BPT","LOCALS",6)
    DisplayStringHead(Myself,31971)
    UseItem("WAND16",Myself)
END

IF
  ActionListEmpty()
  HasItem("POTN02",Myself)
  !GlobalTimerNotExpired("BPT","LOCALS")
  CheckStatGT(Myself,8,INT)
  OR(4)
    RandomNum(4,1)
    HitBy([ANYONE],FIRE)
    HitBy([ANYONE],MAGICFIRE)
    CheckStatLT(Myself,40,RESISTMAGICFIRE)
THEN
  RESPONSE #100
    SetGlobalTimer("BPT","LOCALS",6)
    DisplayStringHead(Myself,46150)
    UseItem("POTN02",Myself)
END

IF
  ActionListEmpty()
  HasItem("potn06",Myself)
  !GlobalTimerNotExpired("BPT","LOCALS")
  CheckStatLT(Myself,23,STR)
  RandomNum(44,23)
THEN
  RESPONSE #100
    SetGlobalTimer("BPT","LOCALS",6)
    DisplayStringHead(Myself,46150)
    UseItem("potn12",Myself)
END

IF
  ActionListEmpty()
  HasItem("POTN05",Myself)
  !GlobalTimerNotExpired("BPT","LOCALS")
  CheckStatLT(Myself,22,STR)
  RandomNum(43,22)
THEN
  RESPONSE #100
    SetGlobalTimer("BPT","LOCALS",6)
    UseItem("POTN05",Myself)
    DisplayStringHead(Myself,46150)
END

IF
  ActionListEmpty()
  HasItem("POTN09",Myself)
  !GlobalTimerNotExpired("BPT","LOCALS")
  RandomNumLT(47,24)
THEN
  RESPONSE #100
    SetGlobalTimer("BPT","LOCALS",6)
    UseItem("POTN09",Myself)
    DisplayStringHead(Myself,46150)
END

IF
  ActionListEmpty()
  HasItem("potn11",Myself)
  !GlobalTimerNotExpired("BPT","LOCALS")
  OR(5)
    See([GOODCUTOFF.0.0.CLERIC_ALL])
    See([GOODCUTOFF.0.0.BARD_ALL])
    See([GOODCUTOFF.0.0.DRUID_ALL])
    See([GOODCUTOFF.0.0.MAGE_ALL])
    See([GOODCUTOFF.0.0.SORCERER])
  RandomNumLT(48,25)
THEN
  RESPONSE #100
    SetGlobalTimer("BPT","LOCALS",6)
    DisplayStringHead(Myself,46150)
    UseItem("potn11",Myself)
END

IF
  ActionListEmpty()
  HasItem("POTN21",Myself)
  !GlobalTimerNotExpired("BPT","LOCALS")
  OR(5)
    See([0.0.MIND_FLAYER])
    See([0.0.UMBERHULK])
    See([0.UNDEAD.VAMPIRE])
    StateCheck([EVILCUTOFF],STATE_CONFUSED)
    StateCheck([EVILCUTOFF],STATE_CHARMED)
  RandomNumLT(55,25)
THEN
  RESPONSE #100
    SetGlobalTimer("BPT","LOCALS",6)
    DisplayStringHead(Myself,46150)
    UseItem("POTN21",Myself)
END

IF
  ActionListEmpty()
  HasItem("POTN37",Myself)
  !GlobalTimerNotExpired("BPT","LOCALS")
  OR(2)
    CheckStatLT(Myself,8,DEX)
    CheckStatGT(Myself,10,DEX)
  RandomNumLT(49,28)
THEN
  RESPONSE #100
    SetGlobalTimer("BPT","LOCALS",6)
    UseItem("POTN37",Myself)
    DisplayStringHead(Myself,46150)
END

IF
  ActionListEmpty()
  HasItem("POTN28",Myself)
  !GlobalTimerNotExpired("BPT","LOCALS")
  CheckStatLT(Myself,18,CON)
  RandomNumLT(51,28)
THEN
  RESPONSE #100
    SetGlobalTimer("BPT","LOCALS",6)
    UseItem("POTN28",Myself)
    DisplayStringHead(Myself,46150)
END

IF
  ActionListEmpty()
  HasItem("POTN36",Myself)
  !GlobalTimerNotExpired("BPT","LOCALS")
  RandomNumLT(52,13)
THEN
  RESPONSE #100
    SetGlobalTimer("BPT","LOCALS",6)
    UseItem("POTN36",Myself)
    DisplayStringHead(Myself,46150)
END

IF
  ActionListEmpty()
  HasItem("POTN29",Myself)
  !GlobalTimerNotExpired("BPT","LOCALS")
  OR(3)
    Class(Myself,BARD_ALL)
    Class(Myself,MAGE_ALL)
    Class(Myself,SORCERER)
  RandomNumLT(53,22)
THEN
  RESPONSE #100
    SetGlobalTimer("BPT","LOCALS",6)
    UseItem("POTN29",Myself)
    DisplayStringHead(Myself,46150)
END

IF
  ActionListEmpty()
  HasItem("POTN30",Myself)
  !GlobalTimerNotExpired("BPT","LOCALS")
  TimeOfDay(NIGHT)
  OR(3)
    Race(Myself,HUMAN)
    Race(Myself,HALFLING)
    Race(Myself,HALFORC)
  RandomNumLT(56,16)
THEN
  RESPONSE #100
    SetGlobalTimer("BPT","LOCALS",6)
    DisplayStringHead(Myself,46150)
    UseItem("POTN30",Myself)
END

IF
  ActionListEmpty()
  HasItem("POTN36",Myself)
  !GlobalTimerNotExpired("BPT","LOCALS")
  RandomNumLT(14,6)
THEN
  RESPONSE #100
    SetGlobalTimer("BPT","LOCALS",6)
    UseItem("POTN36",Myself)
    DisplayStringHead(Myself,46150)
END

IF
  ActionListEmpty()
  HitBy([GOODCUTOFF],CRUSHING)
  !GlobalTimerNotExpired("RANG","LOCALS")
  OR(2)
    General(Myself,GIANTHUMANOID)
    General(Myself,HUMANOID)
  !StateCheck(Myself,STATE_POISONED)
  OR(2)
    See(LastAttackerOf(Myself))
    See(LastHitter(Myself))
  !Range(LastSeenBy(Myself),7)
  Exists(LastSeenBy(Myself))
  !TargetUnreachable(LastSeenBy(Myself))
  !InWeaponRange(LastSeenBy(Myself))
  HPGT(LastSeenBy(Myself),0)
THEN
  RESPONSE #50
    DisplayStringHead(Myself,@902)
    SetGlobalTimer("RANG","LOCALS",6)
  RESPONSE #50
    DisplayStringHead(Myself,@903)
    SetGlobalTimer("RANG","LOCALS",6)
  RESPONSE #25
    DisplayStringHead(Myself,@904)
    SetGlobalTimer("RANG","LOCALS",6)
  RESPONSE #25
    DisplayStringHead(Myself,@905)
    SetGlobalTimer("RANG","LOCALS",6)
  RESPONSE #50
    DisplayStringHead(Myself,@905)
    SetGlobalTimer("RANG","LOCALS",6)
    MoveToObject(LastSeenBy(Myself))
    AttackReevaluate(LastSeenBy(Myself),180)
END

IF
  ActionListEmpty()
  HaveSpell(0)
  OR(3)
    Heard(ThirdNearest([EVILCUTOFF]),123)
    Heard(SecondNearest([EVILCUTOFF]),123)
    Heard([EVILCUTOFF],123)
  !GlobalTimerNotExpired("BPT","LOCALS")
  HPGT(LastHeardBy(Myself),0)
  HPPercentGT(Myself,75)
  Range(LastHeardBy(Myself),10)
  !Range([EVILCUTOFF.0.0.CLERIC_ALL],10)
  !HasItem("POTN55",LastHeardBy(Myself))
  !HasItem("POTN52",LastHeardBy(Myself))
THEN
  RESPONSE #100
    SetGlobalTimer("BPT","LOCALS",6)
    Spell(LastHeardBy(Myself),0)
END

IF
  ActionListEmpty()
  NumItemsGT("POTN55",Myself,1)
  OR(3)
    Heard(ThirdNearest([EVILCUTOFF]),123)
    Heard(SecondNearest([EVILCUTOFF]),123)
    Heard([EVILCUTOFF],123)
  Range(LastHeardBy(Myself),10)
  !GlobalTimerNotExpired("GAVE","LOCALS")
  HPGT(LastHeardBy(Myself),0)
  HPPercentGT(Myself,75)
  !Range([EVILCUTOFF.0.0.CLERIC_ALL],10)
  !NumItemsGT("POTN55",LastHeardBy(Myself),0)
  !NumItemsGT("POTN52",LastHeardBy(Myself),0)
THEN
  RESPONSE #100
    SetGlobalTimer("GAVE","LOCALS",6)
    DisplayStringHead(Myself,@906)
    GiveItem("POTN55",LastHeardBy(Myself))
    SmallWait(2)
    ActionOverride(LastHeardBy(Myself),DisplayStringHead(Myself,@907))
END

IF
  ActionListEmpty()
  NumItemsGT("POTN52",Myself,1)
  OR(3)
    Heard(ThirdNearest([EVILCUTOFF]),123)
    Heard(SecondNearest([EVILCUTOFF]),123)
    Heard([EVILCUTOFF],123)
  !GlobalTimerNotExpired("GAVE","LOCALS")
  HPGT(LastHeardBy(Myself),0)
  HPPercentGT(Myself,75)
  Range(LastHeardBy(Myself),10)
  !Range([EVILCUTOFF.0.0.CLERIC_ALL],10)
  !NumItemsGT("POTN55",LastHeardBy(Myself),0)
  !NumItemsGT("POTN52",LastHeardBy(Myself),0)
THEN
  RESPONSE #100
    SetGlobalTimer("GAVE","LOCALS",6)
    DisplayStringHead(Myself,@906)
    GiveItem("POTN52",LastHeardBy(Myself))
    SmallWait(2)
    ActionOverride(LastHeardBy(Myself),DisplayStringHead(Myself,@907))
END

IF
  ActionListEmpty()
  HasItem("POTN20",Myself)
  OR(3)
    Heard(ThirdNearest([EVILCUTOFF]),124)
    Heard(SecondNearest([EVILCUTOFF]),124)
    Heard([EVILCUTOFF],124)
  Range(LastHeardBy(Myself),10)
  !GlobalTimerNotExpired("GAVE","LOCALS")
  !StateCheck(Myself,STATE_POISONED)
THEN
  RESPONSE #100
    SetGlobalTimer("GAVE","LOCALS",6)
    GiveItem("POTN20",LastHeardBy(Myself))
END

IF
  ActionListEmpty()
  !HaveAnySpells()
  OR(3)
    Heard(ThirdNearest([EVILCUTOFF]),125)
    Heard(SecondNearest([EVILCUTOFF]),125)
    Heard([EVILCUTOFF],125)
  !GlobalTimerNotExpired("BPSB","LOCALS")
  Range(LastHeardBy(Myself),20)
  HPPercentGT(Myself,50)
THEN
  RESPONSE #60
    DisplayStringHead(Myself,@908)
    AttackReevaluate(LastAttackerOf(LastHeardBy(Myself)),180)
    SetGlobalTimer("BPSB","LOCALS",6)
  RESPONSE #50
    DisplayStringHead(Myself,@908)
    AttackReevaluate(SecondNearestEnemyOf(LastHeardBy(Myself)),180)
    SetGlobalTimer("BPSB","LOCALS",6)
  RESPONSE #50
    DisplayStringHead(Myself,@908)
    AttackReevaluate(ThirdNearestEnemyOf(LastHeardBy(Myself)),180)
    SetGlobalTimer("BPSB","LOCALS",6)
  RESPONSE #30
    DisplayStringHead(Myself,@908)
    MoveToObject(LastHeardBy(Myself))
    ProtectObject(LastHeardBy(Myself),6)
    SetGlobalTimer("BPSB","LOCALS",6)
  RESPONSE #50
    SetGlobalTimer("BPSB","LOCALS",6)
END

IF
  See(NearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  RandomNumLT(32,21)
  OR(3)
    Heard(ThirdNearest([EVILCUTOFF]),124)
    Heard(SecondNearest([EVILCUTOFF]),124)
    Heard([EVILCUTOFF],124)
  HPGT(LastHeardBy(Myself),1)
  Range(LastHeardBy(Myself),20)
  HPGT(LastHitter(LastHeardBy(Myself)),1)
  !See(LastHitter(LastHeardBy(Myself)))
  HPGT(LastAttackerOf(LastHeardBy(Myself)),1)
  !See(LastAttackerOf(LastHeardBy(Myself)))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  RandomNumLT(31,21)
  OR(6)
    See(NearestEnemyOf(Myself))
    See(WeakestOf)
    See(WorstAC)
    See(MostDamagedOf)
    See(LastAttackerOf(Myself))
    See(LastHitter(Myself))
  RandomNumLT(28,22)
  OR(3)
    See([GOODCUTOFF.0.0.0.0.SUMMONED_DEMON])
    See([GOODCUTOFF.0.0.0.0.SUMMONED])
    See([GOODCUTOFF.0.0.0.0.ILLUSIONARY])
  RandomNumLT(29,23)
  OR(7)
    See([PC.0.0.RANGER_ALL])
    See([PC.0.0.PALADIN_ALL])
    See([PC.0.0.BARD_ALL])
    See([PC.0.0.DRUID_ALL])
    See([PC.0.0.CLERIC_ALL])
    See([PC.0.0.MAGE_ALL])
    See([PC.0.0.SORCERER])
  RandomNumLT(30,16)
  See(Protagonist)
  RandomNumLT(26,10)
  OR(4)
    See([GOODCUTOFF.0.0.RANGER_ALL])
    See([GOODCUTOFF.0.0.DRUID_ALL])
    See([GOODCUTOFF.0.0.PALADIN_ALL])
    See([GOODCUTOFF.0.0.CLERIC_ALL])
  RandomNumLT(27,10)
  OR(3)
    See([GOODCUTOFF.0.0.MONK])
    See([GOODCUTOFF.0.0.BARD_ALL])
    See([GOODCUTOFF.0.0.THIEF_ALL])
  RandomNumLT(24,9)
  OR(3)
    See(StrongestOf)
    See(BestAC)
    See(LeastDamagedOf)
  RandomNumLT(25,9)
  See(WeakestOf)
  RandomNumLT(23,8)
  See(WorstAC)
  RandomNumLT(21,8)
  See(MostDamagedOf)
  RandomNumLT(32,11)
  OR(2)
    See(TenthNearest([GOODCUTOFF.0.0.MAGE_ALL]))
    See(TenthNearest([GOODCUTOFF.0.0.SORCERER]))
  RandomNumLT(20,8)
  See(TenthNearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  OR(3)
    Allegiance(LastSeenBy(Myself),ENEMY)
    Allegiance(LastSeenBy(Myself),EVILCUTOFF)
    Allegiance(LastSeenBy(Myself),GOODBUTRED)
THEN
  RESPONSE #100
END

IF
  Allegiance(LastSeenBy(Myself),EVILCUTOFF)
THEN
  RESPONSE #80
    Continue()
  RESPONSE #20
END

IF
  ActionListEmpty()
  StateCheck(Myself,STATE_INVISIBLE)
  Class(Myself,THIEF_ALL)
  HPPercentGT(Myself,25)
THEN
  RESPONSE #100
    SetGlobalTimer("BPT","LOCALS",0)
    EquipMostDamagingMelee()
    MoveToObject(LastSeenBy(Myself))
    AttackOneRound(LastSeenBy(Myself))
END

IF
  ActionListEmpty()
  CheckStatGT(Myself,0,SCRIPTINGSTATE4)
THEN
  RESPONSE #100
    EquipMostDamagingMelee()
    AttackOneRound(LastSeenBy(Myself))
END

IF
  ActionListEmpty()
  HasItem("SCRL9G",Myself)
  !GlobalTimerNotExpired("BPT","LOCALS")
  CheckStatLT(LastSeenBy(Myself),70,RESISTMAGIC)
  RandomNumLT(43,29)
THEN
  RESPONSE #100
    SetGlobalTimer("BPT","LOCALS",0)
    DisplayStringHead(Myself,@909)
    UseItem("SCRL9G",LastSeenBy(Myself))
END

IF
  ActionListEmpty()
  HasItem("bhghand",Myself)
  !GlobalTimerNotExpired("BPT","LOCALS")
  RandomNumLT(58,40)
THEN
  RESPONSE #100
    SetGlobalTimer("BPT","LOCALS",0)
    DisplayStringHead(Myself,@910)
    ReallyForceSpell(LastSeenBy(Myself),WIZARD_HOLD_PERSON)
END

IF
  ActionListEmpty()
  HasItem("bhwand1",Myself)
  !GlobalTimerNotExpired("BPT","LOCALS")
  RandomNumLT(58,41)
THEN
  RESPONSE #100
    SetGlobalTimer("BPT","LOCALS",0)
    DisplayStringHead(Myself,@910)
    UseItem("bhwand1",LastSeenBy(Myself))
END

IF
  ActionListEmpty()
  HPPercentLT(Myself,25)
  Range(LastHitter(Myself),10)
  OR(2)
    General(Myself,HUMANOID)
    General(Myself,GIANTHUMANOID)
  !GlobalTimerNotExpired("BPW","LOCALS")
THEN
  RESPONSE #30
    DisplayStringHead(Myself,@911)
    Shout(124)
    SetGlobalTimer("BPW","LOCALS",10)
    RunAwayFrom(LastHitter(Myself),40)
  RESPONSE #30
    DisplayStringHead(Myself,@912)
    Shout(124)
    SetGlobalTimer("BPW","LOCALS",10)
    AttackReevaluate(LastHitter(Myself),15)
  RESPONSE #40
    DisplayStringHead(Myself,@913)
    Shout(123)
    SetGlobalTimer("BPW","LOCALS",10)
    AttackReevaluate(LastSeenBy(Myself),15)
  RESPONSE #25
    DisplayStringHead(Myself,@914)
    SetGlobalTimer("BPW","LOCALS",10)
    Attack(LastHitter(Myself))
END

IF
  ActionListEmpty()
  !Range(LastSeenBy(Myself),8)
THEN
  RESPONSE #90
    EquipMostDamagingMelee()
    AttackOneRound(NearestEnemyOf(Myself))
  RESPONSE #90
    EquipMostDamagingMelee()
    AttackReevaluate(LastSeenBy(Myself),150)
END

IF
  ActionListEmpty()
THEN
  RESPONSE #100
    EquipMostDamagingMelee()
    AttackOneRound(LastSeenBy(Myself))
END

