IF
  !Allegiance(Myself,ENEMY)
  Global("D0OgresHelpPaladins","AR1100",3)
  Dead("plshfg01")
  Dead("plshfg02")
  Dead("plshom01")
  CombatCounter(0)
  See([PC])
THEN
  RESPONSE #100
    SetGlobal("D0OgresHelpPaladins","AR1100",4)
    StartDialogNoSet([PC])
END

IF
  Global("OgronAttack","GLOBAL",1)
  AreaCheck("AR1100")
THEN
  RESPONSE #100
    SetGlobal("MadulfIsPresent","GLOBAL",1)
    ChangeAIScript("",CLASS)
    MoveBetweenAreas("AR1106",[711.1162],4)
END

IF
  OR(2)
    Global("OgronAttack","GLOBAL",5)
    Global("MadulfGroupLeaves","AR1100",1)
THEN
  RESPONSE #100
    DestroySelf()
END

IF
  Global("ogrealliance","GLOBAL",0)
  Global("rangerprotector","GLOBAL",6)
THEN
  RESPONSE #100
    DestroySelf()
END

IF
  Heard([ANYONE],99)
  OR(6)
    Name("madulf",LastHeardBy(Myself))
    Name("uhogre02",LastHeardBy(Myself))
    Name("uhogre03",LastHeardBy(Myself))
    Name("uhogre04",LastHeardBy(Myself))
    Name("uhogre05",LastHeardBy(Myself))
    Class(LastHeardBy(Myself),INNOCENT)
  Allegiance(Myself,NEUTRAL)
THEN
  RESPONSE #100
    Enemy()
END

IF
  Global("ogrealliance","GLOBAL",1)
  Allegiance(Myself,NEUTRAL)
THEN
  RESPONSE #100
    ChangeEnemyAlly(Myself,GOODBUTBLUE)
END

IF
  AttackedBy([GOODCUTOFF],DEFAULT)
  Allegiance(Myself,GOODBUTBLUE)
THEN
  RESPONSE #100
    Shout(89)
    Enemy()
END

IF
  Heard([ANYONE],89)
  OR(6)
    Name("madulf",LastHeardBy(Myself))
    Name("uhogre02",LastHeardBy(Myself))
    Name("uhogre03",LastHeardBy(Myself))
    Name("uhogre04",LastHeardBy(Myself))
    Name("uhogre05",LastHeardBy(Myself))
    Class(LastHeardBy(Myself),INNOCENT)
  Allegiance(Myself,GOODBUTBLUE)
THEN
  RESPONSE #100
    Enemy()
    MoveToObject(LastHeardBy(Myself))
END

IF
  Heard([ANYONE],89)
  OR(6)
    Name("madulf",LastHeardBy(Myself))
    Name("uhogre02",LastHeardBy(Myself))
    Name("uhogre03",LastHeardBy(Myself))
    Name("uhogre04",LastHeardBy(Myself))
    Name("uhogre05",LastHeardBy(Myself))
    Class(LastHeardBy(Myself),INNOCENT)
  Allegiance(Myself,GOODBUTBLUE)
THEN
  RESPONSE #100
    Enemy()
END
