Cleric Script

IF
       See([PC])
       !Range([PC],7)
THEN
       RESPONSE #100
              MoveToObject([PC])
END

IF
       HPPercentLT(Myself,50)
       HaveSpell(CLERIC_CURE_LIGHT_WOUNDS)
THEN
       RESPONSE #100
              Help()
              RunAwayFrom(NearestEnemyOf(Myself),75)
              Spell(Myself,CLERIC_CURE_LIGHT_WOUNDS)
END

IF
       HPPercentLT(MostDamagedOf(),25)
       Class(MostDamagedOf(),THIEF)
       HaveSpell(CLERIC_CURE_LIGHT_WOUNDS)
       RandomNum(2,1)
THEN
       RESPONSE #100
              Spell(MostDamagedOf(),CLERIC_CURE_LIGHT_WOUNDS)
END

IF
       HPPercentLT(MostDamagedOf(),25)
       Class(MostDamagedOf(),MAGE)
       HaveSpell(CLERIC_CURE_LIGHT_WOUNDS)
       RandomNum(2,1)
THEN
       RESPONSE #100
              Spell(MostDamagedOf(),CLERIC_CURE_LIGHT_WOUNDS)
END

IF
       HPPercentLT(MostDamagedOf(),50)
       Class(MostDamagedOf(),CLERIC)
       HaveSpell(CLERIC_CURE_LIGHT_WOUNDS)
       RandomNum(2,1)
THEN
       RESPONSE #100
              Spell(MostDamagedOf(),CLERIC_CURE_LIGHT_WOUNDS)
END

IF
       HPPercentLT(MostDamagedOf(),75)
       Class(MostDamagedOf(),FIGHTER)
       HaveSpell(CLERIC_CURE_LIGHT_WOUNDS)
       RandomNum(2,1)
THEN
       RESPONSE #100
              Spell(MostDamagedOf(),CLERIC_CURE_LIGHT_WOUNDS)
END

IF
       HPPercentLT(MostDamagedOf(),50)
       HaveSpell(CLERIC_CURE_LIGHT_WOUNDS)
THEN
       RESPONSE #100
              Spell(MostDamagedOf(),CLERIC_CURE_LIGHT_WOUNDS)
END

IF
       HPPercentLT(Myself,50)
THEN
       RESPONSE #100
              Help()
              RunAwayFrom(NearestEnemyOf(Myself),75)
END

IF
       See(NearestEnemyOf(Myself))
       HaveSpell(CLERIC_ENTANGLE)
       !Range(NearestEnemyOf(Myself),2)
       !StateCheck(NearestEnemyOf(Myself),STATE_SLEEPING)
       !StateCheck(NearestEnemyOf(Myself),STATE_HELPLESS)
       RandomNum(2,1)
THEN
       RESPONSE #100
              Spell(NearestEnemyOf(Myself),CLERIC_ENTANGLE)
END

IF
       See(NearestEnemyOf(Myself))
       HaveSpell(CLERIC_COMMAND)
       !Range(NearestEnemyOf(Myself),2)
       !StateCheck(NearestEnemyOf(Myself),STATE_SLEEPING)
       RandomNum(2,1)
THEN
       RESPONSE #100
              Spell(NearestEnemyOf(Myself),CLERIC_COMMAND)
END

IF
       See(NearestEnemyOf(Myself))
       Range(NearestEnemyOf(Myself),2)
THEN
       RESPONSE #100
              Help()
              RunAwayFrom(NearestEnemyOf(Myself),75)
END


1