IF
HasItem("spidgi1",Myself) // Attack
!Global("DW#Spider_Override","GLOBAL",1)
THEN
RESPONSE #100
DestroyItem("spidgi1") // Attack
GiveItemCreate("dw#spbit",Myself,0,0,0) // No such index
FillSlot(SLOT_WEAPON)
EquipMostDamagingMelee()
Continue()
END
IF
GlobalTimerNotExpired("DMWWTimeStopRunning","GLOBAL")
!GlobalTimerNotExpired("timestopreset","LOCALS")
THEN
RESPONSE #100
SetGlobalTimer("castspell","LOCALS",22)
SetGlobalTimer("timestopreset","LOCALS",THREE_ROUNDS)
END
IF
AttackedBy([ENEMY.UNDEAD],DEFAULT)
Allegiance(LastAttackerOf(Myself),ENEMY)
General(LastAttackerOf(Myself),UNDEAD)
Allegiance(Myself,ENEMY)
THEN
RESPONSE #100
ClearActions(LastAttackerOf(Myself))
Continue()
END
IF
OR(2)
!Global("inafight","LOCALS",1)
!Allegiance(Myself,ENEMY)
!Gender(Myself,20)
!Gender(Myself,20)
OR(14)
AttackedBy([GOODCUTOFF.0.0.0.0.20],DEFAULT)
AttackedBy([PC],DEFAULT)
AttackedBy([FAMILIAR],DEFAULT)
AttackedBy([ALLY],DEFAULT)
AttackedBy([CONTROLLED],DEFAULT)
AttackedBy([CHARMED],DEFAULT)
SpellCastOnMe([GOODCUTOFF.0.0.0.0.20],0)
SpellCastOnMe([GOODCUTOFF],WIZARD_BLINDNESS)
SpellCastOnMe([GOODCUTOFF],WIZARD_FEEBLEMIND)
SpellCastOnMe([GOODCUTOFF],WIZARD_CHARM_PERSON)
SpellCastOnMe([GOODCUTOFF],WIZARD_DIRE_CHARM)
SpellCastOnMe([GOODCUTOFF],CLERIC_CHARM_PERSON)
SpellCastOnMe([GOODCUTOFF],CLERIC_MENTAL_DOMINATION)
SpellCastOnMe([GOODCUTOFF],WIZARD_RAY_OF_ENFEEBLEMENT)
THEN
RESPONSE #100
Enemy()
SetGlobal("inafight","LOCALS",1)
SetGlobalTimer("stayontarget","LOCALS",TWO_ROUNDS)
SetGlobalTimer("seedefences","LOCALS",ONE_ROUND)
Continue()
END
IF
!Global("inafight","LOCALS",1)
OR(9)
See(NearestEnemyOf(Myself))
Heard([ANYONE],404)
Heard([ANYONE],405)
Heard([ANYONE],406)
Heard([ANYONE],407)
Heard([ANYONE],408)
Heard([ANYONE],409)
Heard([ANYONE],410)
Heard([ANYONE],411)
THEN
RESPONSE #100
SetGlobal("inafight","LOCALS",1)
SetGlobalTimer("stayontarget","LOCALS",TWO_ROUNDS)
SetGlobalTimer("seedefences","LOCALS",ONE_ROUND)
Continue()
END
IF
See(NearestEnemyOf(Myself))
Global("rest","LOCALS",0)
THEN
RESPONSE #100
SetGlobalTimer("rtime","LOCALS",2000)
SetGlobal("rest","LOCALS",1)
Continue()
END
IF
Global("rest","LOCALS",1)
!GlobalTimerNotExpired("rtime","LOCALS")
!See(NearestEnemyOf(Myself))
THEN
RESPONSE #100
SetGlobal("rest","LOCALS",0)
ApplySpell(Myself,RESTORE_FULL_HEALTH)
Rest()
END
IF
Allegiance(Myself,ENEMY)
!See(NearestEnemyOf(Myself))
OR(2)
!GlobalTimerNotExpired("DMWWCuringBlindness","GLOBAL")
!StateCheck(Myself,STATE_BLIND)
OR(13)
AttackedBy([GOODCUTOFF.0.0.0.0.20],DEFAULT)
AttackedBy([PC],DEFAULT)
AttackedBy([FAMILIAR],DEFAULT)
AttackedBy([ALLY],DEFAULT)
AttackedBy([CONTROLLED],DEFAULT)
AttackedBy([CHARMED],DEFAULT)
SpellCastOnMe([GOODCUTOFF.0.0.0.0.20],0)
SpellCastOnMe([PC],0)
SpellCastOnMe([FAMILIAR],0)
SpellCastOnMe([ALLY],0)
SpellCastOnMe([CONTROLLED],0)
SpellCastOnMe([CHARMED],0)
StateCheck([ENEMY],STATE_DISABLED)
!GlobalTimerNotExpired("whatthe","LOCALS")
THEN
RESPONSE #100
SetGlobalTimer("whatthe","LOCALS",TWO_ROUNDS)
Continue()
END
IF
!See(NearestEnemyOf(Myself))
!GlobalTimerNotExpired("seencloud","LOCALS")
GlobalTimerNotExpired("whatthe","LOCALS")
THEN
RESPONSE #100
RandomWalkContinuous()
END
IF
OR(2)
Heard([ANYONE],405)
Heard([ANYONE],409)
Range(LastHeardBy(Myself),20)
!CheckStatGT(Myself,99,RESISTFIRE)
OR(2)
!CheckStatGT(Myself,80,RESISTMAGIC)
!See(NearestEnemyOf(Myself))
!Range([PC],
THEN
RESPONSE #100
SetGlobalTimer("seencloud","LOCALS",FOUR_MINUTES)
MoveToObject([PC])
END
IF
Heard([ANYONE],408)
Range(LastHeardBy(Myself),20)
!CheckStatGT(Myself,99,RESISTACID)
OR(2)
!CheckStatGT(Myself,80,RESISTMAGIC)
!See(NearestEnemyOf(Myself))
!Range([PC],
THEN
RESPONSE #100
SetGlobalTimer("seencloud","LOCALS",FOUR_MINUTES)
MoveToObject([PC])
END
IF
OR(2)
Heard([ANYONE],411)
Heard([ANYONE],404)
Range(LastHeardBy(Myself),20)
!General(Myself,UNDEAD)
!Race(Myself,RAKSHASA)
!Race(Myself,DEMONIC)
OR(2)
!CheckStatGT(Myself,80,RESISTMAGIC)
!See(NearestEnemyOf(Myself))
!Range([PC],
THEN
RESPONSE #100
SetGlobalTimer("seencloud","LOCALS",FOUR_MINUTES)
MoveToObject([PC])
END
IF
See(Myself)
!Kit(Myself,UNDEADHUNTER)
!Kit(Myself,INQUISITOR)
!CheckStatGT(Myself,0,CLERIC_FREE_ACTION)
OR(2)
!CheckStatGT(Myself,0,DW_ITEM_HOLD)
GlobalTimerNotExpired("seedefences","LOCALS")
OR(2)
!CheckStatGT(Myself,0,DW_ITEM_HOLD)
GlobalTimerNotExpired("seedefences","LOCALS")
OR(2)
!CheckStatGT(Myself,0,DW_ITEM_HOLD)
GlobalTimerNotExpired("seedefences","LOCALS")
Heard([ANYONE],410)
Range(LastHeardBy(Myself),20)
!HasItem("antiweb",Myself) // No such index
OR(2)
!CheckStatGT(Myself,80,RESISTMAGIC)
!See(NearestEnemyOf(Myself))
!Range([PC],
THEN
RESPONSE #100
SetGlobalTimer("seencloud","LOCALS",FOUR_MINUTES)
MoveToObject([PC])
END
IF
See(NearestEnemyOf(Myself))
!Global("chasing","LOCALS",0)
THEN
RESPONSE #100
SetGlobal("chasing","LOCALS",0)
ClearActions(Myself)
END
IF
!GlobalTimerNotExpired("chasetarget","LOCALS")
Allegiance(Myself,ENEMY)
See(Player1)
THEN
RESPONSE #100
SetGlobalTimer("chasetarget","LOCALS",FIVE_TURNS)
SetGlobal("chasePC","LOCALS",1)
Continue()
END
IF
!GlobalTimerNotExpired("chasetarget","LOCALS")
Allegiance(Myself,ENEMY)
See(Player2)
THEN
RESPONSE #100
SetGlobalTimer("chasetarget","LOCALS",FIVE_TURNS)
SetGlobal("chasePC","LOCALS",2)
Continue()
END
IF
!GlobalTimerNotExpired("chasetarget","LOCALS")
Allegiance(Myself,ENEMY)
See(Player3)
THEN
RESPONSE #100
SetGlobalTimer("chasetarget","LOCALS",FIVE_TURNS)
SetGlobal("chasePC","LOCALS",3)
Continue()
END
IF
!GlobalTimerNotExpired("chasetarget","LOCALS")
Allegiance(Myself,ENEMY)
See(Player4)
THEN
RESPONSE #100
SetGlobalTimer("chasetarget","LOCALS",FIVE_TURNS)
SetGlobal("chasePC","LOCALS",4)
Continue()
END
IF
!GlobalTimerNotExpired("chasetarget","LOCALS")
Allegiance(Myself,ENEMY)
See(Player5)
THEN
RESPONSE #100
SetGlobalTimer("chasetarget","LOCALS",FIVE_TURNS)
SetGlobal("chasePC","LOCALS",5)
Continue()
END
IF
!GlobalTimerNotExpired("chasetarget","LOCALS")
Allegiance(Myself,ENEMY)
See(Player6)
THEN
RESPONSE #100
SetGlobalTimer("chasetarget","LOCALS",FIVE_TURNS)
SetGlobal("chasePC","LOCALS",6)
Continue()
END
IF
Global("chasePC","LOCALS",1)
StateCheck(Player1,STATE_REALLY_DEAD)
THEN
RESPONSE #100
SetGlobal("chasePC","LOCALS",0)
Continue()
END
IF
Global("chasePC","LOCALS",2)
StateCheck(Player2,STATE_REALLY_DEAD)
THEN
RESPONSE #100
SetGlobal("chasePC","LOCALS",0)
Continue()
END
IF
Global("chasePC","LOCALS",3)
StateCheck(Player3,STATE_REALLY_DEAD)
THEN
RESPONSE #100
SetGlobal("chasePC","LOCALS",0)
Continue()
END
IF
Global("chasePC","LOCALS",4)
StateCheck(Player4,STATE_REALLY_DEAD)
THEN
RESPONSE #100
SetGlobal("chasePC","LOCALS",0)
Continue()
END
IF
Global("chasePC","LOCALS",5)
StateCheck(Player5,STATE_REALLY_DEAD)
THEN
RESPONSE #100
SetGlobal("chasePC","LOCALS",0)
Continue()
END
IF
Global("chasePC","LOCALS",6)
StateCheck(Player6,STATE_REALLY_DEAD)
THEN
RESPONSE #100
SetGlobal("chasePC","LOCALS",0)
Continue()
END
IF
OR(2)
Heard([ANYONE],405)
Heard([ANYONE],409)
Range(LastHeardBy(Myself),20)
!CheckStatGT(Myself,99,RESISTFIRE)
OR(2)
!CheckStatGT(Myself,80,RESISTMAGIC)
!See(NearestEnemyOf(Myself))
!Range([PC],
THEN
RESPONSE #100
SetGlobalTimer("seencloud","LOCALS",FOUR_MINUTES)
MoveToObject([PC])
END
IF
Heard([ANYONE],408)
Range(LastHeardBy(Myself),20)
!CheckStatGT(Myself,99,RESISTACID)
OR(2)
!CheckStatGT(Myself,80,RESISTMAGIC)
!See(NearestEnemyOf(Myself))
!Range([PC],
THEN
RESPONSE #100
SetGlobalTimer("seencloud","LOCALS",FOUR_MINUTES)
MoveToObject([PC])
END
IF
OR(2)
Heard([ANYONE],411)
Heard([ANYONE],404)
Range(LastHeardBy(Myself),20)
!General(Myself,UNDEAD)
!Race(Myself,RAKSHASA)
!Race(Myself,DEMONIC)
OR(2)
!CheckStatGT(Myself,80,RESISTMAGIC)
!See(NearestEnemyOf(Myself))
!Range([PC],
THEN
RESPONSE #100
SetGlobalTimer("seencloud","LOCALS",FOUR_MINUTES)
MoveToObject([PC])
END
IF
See(Myself)
!Kit(Myself,UNDEADHUNTER)
!Kit(Myself,INQUISITOR)
!CheckStatGT(Myself,0,CLERIC_FREE_ACTION)
OR(2)
!CheckStatGT(Myself,0,DW_ITEM_HOLD)
GlobalTimerNotExpired("seedefences","LOCALS")
OR(2)
!CheckStatGT(Myself,0,DW_ITEM_HOLD)
GlobalTimerNotExpired("seedefences","LOCALS")
OR(2)
!CheckStatGT(Myself,0,DW_ITEM_HOLD)
GlobalTimerNotExpired("seedefences","LOCALS")
Heard([ANYONE],410)
Range(LastHeardBy(Myself),20)
!HasItem("antiweb",Myself) // No such index
OR(2)
!CheckStatGT(Myself,80,RESISTMAGIC)
!See(NearestEnemyOf(Myself))
!Range([PC],
THEN
RESPONSE #100
SetGlobalTimer("seencloud","LOCALS",FOUR_MINUTES)
MoveToObject([PC])
END
IF
!See(NearestEnemyOf(Myself))
OR(
Heard([ANYONE],404)
Heard([ANYONE],405)
Heard([ANYONE],406)
Heard([ANYONE],407)
Heard([ANYONE],408)
Heard([ANYONE],409)
Heard([ANYONE],410)
Heard([ANYONE],411)
THEN
RESPONSE #100
NoAction()
END
IF
Global("inafight","LOCALS",1)
Global("RR#NOPND","GLOBAL",0)
!AreaType(OUTDOOR)
!Range(NearestEnemyOf(Myself),30)
Range(NearestDoor,15)
OpenState(NearestDoor,FALSE)
THEN
RESPONSE #100
MoveToObject(NearestDoor)
OpenDoor(NearestDoor)
END
IF
!Global("chasing","LOCALS",0)
See(NearestEnemyOf(Myself))
THEN
RESPONSE #100
SetGlobal("chasing","LOCALS",0)
Continue()
END
IF
ActionListEmpty()
Global("inafight","LOCALS",1)
Allegiance(Myself,ENEMY)
!See(NearestEnemyOf(Myself))
Global("chasing","LOCALS",0)
!Global("chasePC","LOCALS",0)
THEN
RESPONSE #100
SetGlobalTimer("chasetimer","LOCALS",
SetGlobal("chasing","LOCALS",1)
END
IF
!See(NearestEnemyOf(Myself))
GlobalTimerExpired("chasetimer","LOCALS")
!Global("inafight","LOCALS",0)
!Global("chasePC","LOCALS",0)
THEN
RESPONSE #100
SetGlobal("inafight","LOCALS",0)
SetGlobal("chasePC","LOCALS",0)
END
IF
!See(NearestEnemyOf(Myself))
!Detect(Player1)
!StateCheck(Player1,STATE_INVISIBLE)
!CheckStatGT(Player1,0,SANCTUARY)
ActionListEmpty()
GlobalTimerNotExpired("chasetimer","LOCALS")
Global("chasePC","LOCALS",1)
THEN
RESPONSE #100
MoveToObject(Player1)
END
IF
!See(NearestEnemyOf(Myself))
!Detect(Player2)
!StateCheck(Player2,STATE_INVISIBLE)
!CheckStatGT(Player2,0,SANCTUARY)
ActionListEmpty()
GlobalTimerNotExpired("chasetimer","LOCALS")
Global("chasePC","LOCALS",2)
THEN
RESPONSE #100
MoveToObject(Player2)
END
IF
!See(NearestEnemyOf(Myself))
!Detect(Player3)
!StateCheck(Player3,STATE_INVISIBLE)
!CheckStatGT(Player3,0,SANCTUARY)
ActionListEmpty()
GlobalTimerNotExpired("chasetimer","LOCALS")
Global("chasePC","LOCALS",3)
THEN
RESPONSE #100
MoveToObject(Player3)
END
IF
!See(NearestEnemyOf(Myself))
!Detect(Player4)
!StateCheck(Player4,STATE_INVISIBLE)
!CheckStatGT(Player4,0,SANCTUARY)
ActionListEmpty()
GlobalTimerNotExpired("chasetimer","LOCALS")
Global("chasePC","LOCALS",4)
THEN
RESPONSE #100
MoveToObject(Player4)
END
IF
!See(NearestEnemyOf(Myself))
!Detect(Player5)
!StateCheck(Player5,STATE_INVISIBLE)
!CheckStatGT(Player5,0,SANCTUARY)
ActionListEmpty()
GlobalTimerNotExpired("chasetimer","LOCALS")
Global("chasePC","LOCALS",5)
THEN
RESPONSE #100
MoveToObject(Player5)
END
IF
!See(NearestEnemyOf(Myself))
!Detect(Player6)
!StateCheck(Player6,STATE_INVISIBLE)
!CheckStatGT(Player6,0,SANCTUARY)
ActionListEmpty()
GlobalTimerNotExpired("chasetimer","LOCALS")
Global("chasePC","LOCALS",6)
THEN
RESPONSE #100
MoveToObject(Player6)
END
IF
!Global("DW#Spider_Override","GLOBAL",1)
!StateCheck(Myself,STATE_DISABLED)
!GlobalTimerNotExpired("web","LOCALS")
See(NearestEnemyOf(Myself))
THEN
RESPONSE #100
SetGlobalTimer("web","LOCALS",TWO_ROUNDS)
ReallyForceSpellRES("dw#web",NearestEnemyOf(Myself)) // Web Tangle
Continue()
RESPONSE #100
SetGlobalTimer("web","LOCALS",TWO_ROUNDS)
ReallyForceSpellRES("dw#web",SecondNearestEnemyOf(Myself)) // Web Tangle
Continue()
RESPONSE #100
SetGlobalTimer("web","LOCALS",FOUR_ROUNDS)
ReallyForceSpellRES("dw#web",ThirdNearestEnemyOf(Myself)) // Web Tangle
Continue()
RESPONSE #100
SetGlobalTimer("web","LOCALS",THREE_ROUNDS)
ReallyForceSpellRES("dw#web",FourthNearestEnemyOf(Myself)) // Web Tangle
Continue()
RESPONSE #500
SetGlobalTimer("web","LOCALS",ONE_ROUND)
Continue()
END
IF
See(NearestEnemyOf(Myself))
!StateCheck(NearestEnemyOf(Myself),STATE_POISONED)
CheckStat(NearestEnemyOf(Myself),1,HELD)
Range(NearestEnemyOf(Myself),4)
THEN
RESPONSE #100
SetGlobal("validtarget","LOCALS",1)
SetGlobal("melee","LOCALS",1)
EquipMostDamagingMelee()
AttackOneRound(NearestEnemyOf(Myself))
END
IF
See(SecondNearestEnemyOf(Myself))
!StateCheck(SecondNearestEnemyOf(Myself),STATE_POISONED)
CheckStat(SecondNearestEnemyOf(Myself),1,HELD)
Range(SecondNearestEnemyOf(Myself),4)
THEN
RESPONSE #100
SetGlobal("validtarget","LOCALS",1)
SetGlobal("melee","LOCALS",1)
EquipMostDamagingMelee()
AttackOneRound(SecondNearestEnemyOf(Myself))
END
IF
See(ThirdNearestEnemyOf(Myself))
!StateCheck(ThirdNearestEnemyOf(Myself),STATE_POISONED)
CheckStat(ThirdNearestEnemyOf(Myself),1,HELD)
Range(ThirdNearestEnemyOf(Myself),4)
THEN
RESPONSE #100
SetGlobal("validtarget","LOCALS",1)
SetGlobal("melee","LOCALS",1)
EquipMostDamagingMelee()
AttackOneRound(ThirdNearestEnemyOf(Myself))
END
IF
See(NearestEnemyOf(Myself))
Range(NearestEnemyOf(Myself),4)
THEN
RESPONSE #100
SetGlobal("validtarget","LOCALS",1)
SetGlobal("melee","LOCALS",1)
EquipMostDamagingMelee()
AttackOneRound(NearestEnemyOf(Myself))
END
IF
See(SecondNearestEnemyOf(Myself))
Range(SecondNearestEnemyOf(Myself),4)
THEN
RESPONSE #100
SetGlobal("validtarget","LOCALS",1)
SetGlobal("melee","LOCALS",1)
EquipMostDamagingMelee()
AttackOneRound(SecondNearestEnemyOf(Myself))
END
IF
See(ThirdNearestEnemyOf(Myself))
Range(ThirdNearestEnemyOf(Myself),4)
THEN
RESPONSE #100
SetGlobal("validtarget","LOCALS",1)
SetGlobal("melee","LOCALS",1)
EquipMostDamagingMelee()
AttackOneRound(ThirdNearestEnemyOf(Myself))
END
IF
ActionListEmpty()
See(NearestEnemyOf(Myself))
Range(NearestEnemyOf(Myself),20)
CheckStat(NearestEnemyOf(Myself),1,HELD)
THEN
RESPONSE #100
MoveToObject(NearestEnemyOf(Myself))
END
IF
ActionListEmpty()
See(SecondNearestEnemyOf(Myself))
Range(SecondNearestEnemyOf(Myself),20)
CheckStat(SecondNearestEnemyOf(Myself),1,HELD)
THEN
RESPONSE #100
MoveToObject(SecondNearestEnemyOf(Myself))
END
IF
ActionListEmpty()
See(ThirdNearestEnemyOf(Myself))
Range(ThirdNearestEnemyOf(Myself),20)
CheckStat(ThirdNearestEnemyOf(Myself),1,HELD)
THEN
RESPONSE #100
MoveToObject(ThirdNearestEnemyOf(Myself))
END
IF
ActionListEmpty()
See(FourthNearestEnemyOf(Myself))
Range(FourthNearestEnemyOf(Myself),20)
CheckStat(FourthNearestEnemyOf(Myself),1,HELD)
THEN
RESPONSE #100
MoveToObject(FourthNearestEnemyOf(Myself))
END
IF
ActionListEmpty()
See(FifthNearestEnemyOf(Myself))
Range(FifthNearestEnemyOf(Myself),20)
CheckStat(FifthNearestEnemyOf(Myself),1,HELD)
THEN
RESPONSE #100
MoveToObject(FifthNearestEnemyOf(Myself))
END
IF
ActionListEmpty()
See(SixthNearestEnemyOf(Myself))
Range(SixthNearestEnemyOf(Myself),20)
CheckStat(SixthNearestEnemyOf(Myself),1,HELD)
THEN
RESPONSE #100
MoveToObject(SixthNearestEnemyOf(Myself))
END
IF
ActionListEmpty()
See(SeventhNearestEnemyOf(Myself))
Range(SeventhNearestEnemyOf(Myself),20)
CheckStat(SeventhNearestEnemyOf(Myself),1,HELD)
THEN
RESPONSE #100
MoveToObject(SeventhNearestEnemyOf(Myself))
END
IF
ActionListEmpty()
See(EighthNearestEnemyOf(Myself))
Range(EighthNearestEnemyOf(Myself),20)
CheckStat(EighthNearestEnemyOf(Myself),1,HELD)
THEN
RESPONSE #100
MoveToObject(EighthNearestEnemyOf(Myself))
END
IF
ActionListEmpty()
See(NearestEnemyOf(Myself))
THEN
RESPONSE #100
MoveToObject(NearestEnemyOf(Myself))
END
IF
See(Player4)
Allegiance(Myself,ENEMY)
THEN
RESPONSE #100
SetGlobal("validtarget","LOCALS",1)
SetGlobal("melee","LOCALS",1)
EquipMostDamagingMelee()
AttackOneRound(Player4)
END
IF
See(Player5)
Allegiance(Myself,ENEMY)
THEN
RESPONSE #100
SetGlobal("validtarget","LOCALS",1)
SetGlobal("melee","LOCALS",1)
EquipMostDamagingMelee()
AttackOneRound(Player5)
END
IF
See(Player6)
Allegiance(Myself,ENEMY)
THEN
RESPONSE #100
SetGlobal("validtarget","LOCALS",1)
SetGlobal("melee","LOCALS",1)
EquipMostDamagingMelee()
AttackOneRound(Player6)
END
IF
See(Player3)
Allegiance(Myself,ENEMY)
THEN
RESPONSE #100
SetGlobal("validtarget","LOCALS",1)
SetGlobal("melee","LOCALS",1)
EquipMostDamagingMelee()
AttackOneRound(Player3)
END
IF
See(Player2)
Allegiance(Myself,ENEMY)
THEN
RESPONSE #100
SetGlobal("validtarget","LOCALS",1)
SetGlobal("melee","LOCALS",1)
EquipMostDamagingMelee()
AttackOneRound(Player2)
END
IF
See(Player1)
Allegiance(Myself,ENEMY)
THEN
RESPONSE #100
SetGlobal("validtarget","LOCALS",1)
SetGlobal("melee","LOCALS",1)
EquipMostDamagingMelee()
AttackOneRound(Player1)
END
IF
Global("inafight","LOCALS",1)
Global("RR#NOPND","GLOBAL",0)
!AreaType(OUTDOOR)
!Range(NearestEnemyOf(Myself),30)
Range(NearestDoor,15)
OpenState(NearestDoor,FALSE)
THEN
RESPONSE #100
MoveToObject(NearestDoor)
OpenDoor(NearestDoor)
END
IF
!Global("chasing","LOCALS",0)
See(NearestEnemyOf(Myself))
THEN
RESPONSE #100
SetGlobal("chasing","LOCALS",0)
Continue()
END
IF
ActionListEmpty()
Global("inafight","LOCALS",1)
Allegiance(Myself,ENEMY)
!See(NearestEnemyOf(Myself))
Global("chasing","LOCALS",0)
!Global("chasePC","LOCALS",0)
THEN
RESPONSE #100
SetGlobalTimer("chasetimer","LOCALS",
SetGlobal("chasing","LOCALS",1)
END
IF
!See(NearestEnemyOf(Myself))
GlobalTimerExpired("chasetimer","LOCALS")
!Global("inafight","LOCALS",0)
!Global("chasePC","LOCALS",0)
THEN
RESPONSE #100
SetGlobal("inafight","LOCALS",0)
SetGlobal("chasePC","LOCALS",0)
END
IF
!See(NearestEnemyOf(Myself))
!Detect(Player1)
!StateCheck(Player1,STATE_INVISIBLE)
!CheckStatGT(Player1,0,SANCTUARY)
ActionListEmpty()
GlobalTimerNotExpired("chasetimer","LOCALS")
Global("chasePC","LOCALS",1)
THEN
RESPONSE #100
MoveToObject(Player1)
END
IF
!See(NearestEnemyOf(Myself))
!Detect(Player2)
!StateCheck(Player2,STATE_INVISIBLE)
!CheckStatGT(Player2,0,SANCTUARY)
ActionListEmpty()
GlobalTimerNotExpired("chasetimer","LOCALS")
Global("chasePC","LOCALS",2)
THEN
RESPONSE #100
MoveToObject(Player2)
END
IF
!See(NearestEnemyOf(Myself))
!Detect(Player3)
!StateCheck(Player3,STATE_INVISIBLE)
!CheckStatGT(Player3,0,SANCTUARY)
ActionListEmpty()
GlobalTimerNotExpired("chasetimer","LOCALS")
Global("chasePC","LOCALS",3)
THEN
RESPONSE #100
MoveToObject(Player3)
END
IF
!See(NearestEnemyOf(Myself))
!Detect(Player4)
!StateCheck(Player4,STATE_INVISIBLE)
!CheckStatGT(Player4,0,SANCTUARY)
ActionListEmpty()
GlobalTimerNotExpired("chasetimer","LOCALS")
Global("chasePC","LOCALS",4)
THEN
RESPONSE #100
MoveToObject(Player4)
END
IF
!See(NearestEnemyOf(Myself))
!Detect(Player5)
!StateCheck(Player5,STATE_INVISIBLE)
!CheckStatGT(Player5,0,SANCTUARY)
ActionListEmpty()
GlobalTimerNotExpired("chasetimer","LOCALS")
Global("chasePC","LOCALS",5)
THEN
RESPONSE #100
MoveToObject(Player5)
END
IF
!See(NearestEnemyOf(Myself))
!Detect(Player6)
!StateCheck(Player6,STATE_INVISIBLE)
!CheckStatGT(Player6,0,SANCTUARY)
ActionListEmpty()
GlobalTimerNotExpired("chasetimer","LOCALS")
Global("chasePC","LOCALS",6)
THEN
RESPONSE #100
MoveToObject(Player6)
END