IF
  HPPercentLT(Myself,75)
  CheckStatLT(Myself,100,RESISTSLASHING)
THEN
  RESPONSE #100
    SetGlobalTimer("xyxGasseousForm","LOCALS",6)
    ForceSpellRES("BODGASF",Myself)  // <Invalid Strref -1>
    Continue()
END

IF
  CheckStatLT(Myself,100,RESISTSLASHING)
  OR(4)
    CheckStat(LastAttackerOf(Myself),5,SCRIPTINGSTATE4)
    CheckStat(LastAttackerOf(Myself),4,SCRIPTINGSTATE4)
    CheckStat(NearestEnemyOf(Myself),5,SCRIPTINGSTATE4)
    CheckStat(NearestEnemyOf(Myself),4,SCRIPTINGSTATE4)
THEN
  RESPONSE #100
    SetGlobalTimer("xyxGasseousForm","LOCALS",6)
    ForceSpellRES("BODGASF",Myself)  // <Invalid Strref -1>
    RunAwayFrom(NearestEnemyOf(Myself),90)
END

IF
  AttackedBy("FINMEL",DEFAULT)  // FINMEL
  CheckStatLT(Myself,100,RESISTSLASHING)
THEN
  RESPONSE #100
    SetGlobalTimer("xyxGasseousForm","LOCALS",6)
    ForceSpellRES("BODGASF",Myself)  // <Invalid Strref -1>
    RunAwayFrom(NearestEnemyOf(Myself),90)
END

IF
  CheckStat(Myself,100,RESISTSLASHING)
  OR(2)
    HPPercentLT(Myself,100)
    GlobalTimerNotExpired("xyxGasseousForm","LOCALS")
  Exists(NearestEnemyOf(Myself))
THEN
  RESPONSE #100
    RunAwayFrom(NearestEnemyOf(Myself),45)
  RESPONSE #100
    MoveToObject(Player1)
END

IF
  !Exists(NearestEnemyOf(Myself))
  CheckStat(Myself,100,RESISTSLASHING)
  OR(2)
    HPPercentLT(Myself,100)
    GlobalTimerNotExpired("xyxGasseousForm","LOCALS")
THEN
  RESPONSE #100
    NoAction()
  RESPONSE #100
    MoveToObject(Player1)
END

IF
  !Range([PC],10)
  OR(2)
    !Exists(NearestEnemyOf(Myself))
    !Exists([PC])
THEN
  RESPONSE #100
    MoveToObjectFollow(Player1)
END

IF
  !Exists(NearestEnemyOf(Myself))
  CheckStat(Myself,100,RESISTSLASHING)
  HPPercent(Myself,100)
THEN
  RESPONSE #100
    ForceSpellRES("SPINKRVA",Myself)  // ~Gaseous Form~
END

IF
  !Exists(NearestEnemyOf(Myself))
THEN
  RESPONSE #5
    RandomWalk()
  RESPONSE #100
    NoAction()
END

IF
  CheckStatLT(Myself,100,RESISTSLASHING)
  Global("KRBODBAT","GLOBAL",0)
  !GlobalTimerNotExpired("xyxVampireFear","LOCALS")
  GlobalTimerExpired("xyxImmunity","LOCALS")
  See(SixthNearestEnemyOf(Myself))
  CheckStat(LastSeenBy(Myself),0,178)
  CheckStatLT(LastSeenBy(Myself),6,SAVEVSSPELL)
  See(NearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  See(LastSeenBy(Myself))
  CheckStatLT(Myself,100,RESISTSLASHING)
  Global("KRBODBAT","GLOBAL",0)
  !GlobalTimerNotExpired("xyxVampireFear","LOCALS")
  GlobalTimerExpired("xyxImmunity","LOCALS")
  !CheckStatLT(LastSeenBy(Myself),6,SAVEVSSPELL)
  !Range(LastSeenBy(Myself),0)
THEN
  RESPONSE #100
    SetGlobalTimer("xyxVampireFear","LOCALS",6)
    ForceSpell(LastSeenBy(Myself),VAMPIRE_FEAR)
END

IF
  See(SixthNearestEnemyOfType([0.0.0.MAGE_ALL]))
  OR(3)
    CheckStatGT(LastSeenBy(Myself),2,128)
    HasItem("FINABAZ",LastSeenBy(Myself))  // <Invalid Strref -1>
    Name("Imoen2",LastSeenBy(Myself))
  See(SixthNearestEnemyOf(Myself))
  OR(3)
    CheckStatGT(LastSeenBy(Myself),2,128)
    HasItem("FINABAZ",LastSeenBy(Myself))  // <Invalid Strref -1>
    Name("Imoen2",LastSeenBy(Myself))
  See(NearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  Exists("FINILLA")  // ~Illasera~
  !StateCheck("FINILLA",STATE_INVISIBLE)  // ~Illasera~
  !StateCheck("FINILLA",STATE_DEAD)  // ~Illasera~
  See("FINILLA")  // ~Illasera~
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  Exists("FINSEND")  // ~Sendai~
  CheckStatLT("FINSEND",3,128)  // ~Sendai~
  !StateCheck("FINSEND",STATE_DEAD)  // ~Sendai~
  See("FINSEND")  // ~Sendai~
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  CheckStat(Myself,100,RESISTSLASHING)
  OR(2)
    !GlobalTimerExpired("xyxImmunity","LOCALS")
    CheckStatLT(LastSeenBy(Myself),3,128)
  !Range(LastSeenBy(Myself),4)
  !Allegiance(LastSeenBy(Myself),GOODCUTOFF)
THEN
  RESPONSE #100
    MoveToObject(LastSeenBy(Myself))
    ForceSpellRES("SPINKRVA",Myself)  // ~Gaseous Form~
    AttackOneRound(LastSeenBy(Myself))
END

IF
  CheckStat(Myself,100,RESISTSLASHING)
  OR(2)
    !GlobalTimerExpired("xyxImmunity","LOCALS")
    CheckStatLT(LastSeenBy(Myself),3,128)
  !Allegiance(LastSeenBy(Myself),GOODCUTOFF)
THEN
  RESPONSE #100
    ForceSpellRES("SPINKRVA",Myself)  // ~Gaseous Form~
    AttackOneRound(LastSeenBy(Myself))
END

IF
  OR(2)
    !GlobalTimerExpired("xyxImmunity","LOCALS")
    CheckStatLT(LastSeenBy(Myself),3,128)
  !Allegiance(LastSeenBy(Myself),GOODCUTOFF)
THEN
  RESPONSE #100
    AttackOneRound(LastSeenBy(Myself))
END

IF
  True()
THEN
  RESPONSE #100
    RandomWalk()
END

