home *** CD-ROM | disk | FTP | other *** search
- // * Date Created:Mar 21, 2000.
- // * Created by:Brent Knowles
- // * Purpose: A disabler mage whose intention is to cripple an enemy group
- // * using charm, hold, confusion type spells
-
- // * Vocalize if silenced*
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- StateCheck(Myself,STATE_SILENCED)
- HaveSpell(WIZARD_VOCALIZE)
- THEN
- RESPONSE #100
- Spell(Myself,WIZARD_VOCALIZE)
- END
-
- // *Magic Attack*
- // * attemps to remove spell protections from an enemy mage
- // * Must check to see if it was able to bring down the shield
- // * if not, it should stop using this spell.
-
- IF
- ActionListEmpty()
- See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
- HaveSpell(WIZARD_RUBY_RAY_OF_REVERSAL)
- Global("pscript_SpellThrust","LOCALS",0)
- OR(2)
- HasBounceEffects(LastSeenBy(Myself))
- HasImmunityEffects(LastSeenBy(Myself))
- THEN
- RESPONSE #100
- Spell(LastSeenBy(Myself),WIZARD_RUBY_RAY_OF_REVERSAL)
- Wait(2)
- SetGlobal("pscript_SpellThrust","LOCALS",1)
- END
-
- // *
- // * spellThrust=1 means to check to see if the shields went down
- // * if they didn't, it means this spell won't work against the level of shielding this mage has
- // * so set the local to 2
- IF
- Global("pscript_SpellThrust","LOCALS",1)
- See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
- OR(2)
- HasBounceEffects(LastSeenBy(Myself))
- HasImmunityEffects(LastSeenBy(Myself))
- THEN
- RESPONSE #100
- SetGlobal("pscript_SpellThrust","LOCALS",2)
- END
- // * If the spell did work then reset the local to 0
- IF
- Global("pscript_SpellThrust","LOCALS",1)
- See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
- !HasBounceEffects(LastSeenBy(Myself))
- !HasImmunityEffects(LastSeenBy(Myself))
- THEN
- RESPONSE #100
- SetGlobal("pscript_SpellThrust","LOCALS",0)
- END
-
- // *
- // Khelben's warding whip.
- // *
- IF
- ActionListEmpty()
- See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
- HaveSpell(WIZARD_WARDING_WHIP)
- Global("pscript_WHIP","LOCALS",0)
- OR(2)
- HasBounceEffects(LastSeenBy(Myself))
- HasImmunityEffects(LastSeenBy(Myself))
- THEN
- RESPONSE #100
- Spell(LastSeenBy(Myself),WIZARD_WARDING_WHIP)
- Wait(2)
- SetGlobal("pscript_WHIP","LOCALS",1)
- END
-
- // *
- // * WHIP=1 means to check to see if the shields went down
- // * if they didn't, it means this spell won't work against the level of shielding this mage has
- // * so set the local to 2
- IF
- Global("pscript_WHIP","LOCALS",1)
- See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
- OR(2)
- HasBounceEffects(LastSeenBy(Myself))
- HasImmunityEffects(LastSeenBy(Myself))
- THEN
- RESPONSE #100
- SetGlobal("pscript_WHIP","LOCALS",2)
- END
- // * If the spell did work then reset the local to 0
- IF
- Global("pscript_WHIP","LOCALS",1)
- See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
- !HasBounceEffects(LastSeenBy(Myself))
- !HasImmunityEffects(LastSeenBy(Myself))
- THEN
- RESPONSE #100
- SetGlobal("pscript_WHIP","LOCALS",0)
- END
-
- //*High-Level Disabling Spells*
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HaveSpell(WIZARD_MAZE)
- !HasBounceEffects(LastSeenBy(Myself))
- THEN
- RESPONSE #100
- Spell(NearestEnemyOf(Myself),WIZARD_MAZE)
- END
-
- IF
- ActionListEmpty()
- See(SixthNearestEnemyOf(Myself))
- HaveSpell(WIZARD_SYMBOL_DEATH)
- !HasBounceEffects(LastSeenBy(Myself))
- !Range(LastSeenBy(Myself),20)
- HPGT(LastSeenBy(Myself),20)
- THEN
- RESPONSE #100
- Spell(LastSeenBy(Myself),WIZARD_SYMBOL_DEATH)
- END
-
- IF
- ActionListEmpty()
- See(SixthNearestEnemyOf(Myself))
- HaveSpell(WIZARD_SYMBOL_FEAR)
- !HasBounceEffects(LastSeenBy(Myself))
- !Range(LastSeenBy(Myself),20)
- HPGT(LastSeenBy(Myself),20)
- THEN
- RESPONSE #100
- Spell(LastSeenBy(Myself),WIZARD_SYMBOL_FEAR)
- END
- // * target spell around myself because it won't affect party members
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HaveSpell(WIZARD_SPHERE_OF_CHAOS)
- Range(LastSeenBy(Myself),10)
- !StateCheck(LastSeenBy(Myself),STATE_CONFUSED)
- THEN
- RESPONSE #100
- Spell(Myself,WIZARD_SPHERE_OF_CHAOS)
- END
-
- IF
- ActionListEmpty()
- See(FifthNearestEnemyOf(Myself))
- HaveSpell(WIZARD_SYMBOL_STUN)
- !StateCheck(LastSeenBy(Myself),STATE_HELPLESS)
- !HasBounceEffects(LastSeenBy(Myself))
- !Range(LastSeenBy(Myself),20)
- HPGT(LastSeenBy(Myself),20)
- THEN
- RESPONSE #100
- Spell(LastSeenBy(Myself),WIZARD_SYMBOL_STUN)
- END
-
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HaveSpell(WIZARD_FLESH_TO_STONE)
- !HasBounceEffects(LastSeenBy(Myself))
- HPGT(LastSeenBy(Myself),20)
- THEN
- RESPONSE #100
- Spell(LastSeenBy(Myself),WIZARD_FLESH_TO_STONE)
- END
-
- // * destroy stone creature
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HaveSpell(WIZARD_MAGIC_MISSILE)
- StateCheck(LastSeenBy(Myself),STATE_STONE_DEATH)
- THEN
- RESPONSE #100
- Spell(LastSeenBy(Myself),WIZARD_MAGIC_MISSILE)
- END
-
- //*Mid-Level Disabling*
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- !HasBounceEffects(LastSeenBy(Myself))
- HaveSpell(WIZARD_CHAOS)
- HPGT(LastSeenBy(Myself),20)
- !StateCheck(LastSeenBy(Myself),STATE_CONFUSED)
- THEN
- RESPONSE #100
- Spell(NearestEnemyOf(Myself),WIZARD_CHAOS)
- END
-
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HaveSpell(WIZARD_FEEBLEMIND)
- !HasBounceEffects(LastSeenBy(Myself))
- HPGT(LastSeenBy(Myself),20)
- THEN
- RESPONSE #100
- Spell(NearestEnemyOf(Myself),WIZARD_FEEBLEMIND)
- END
-
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HaveSpell(WIZARD_DOMINATION)
- !HasBounceEffects(LastSeenBy(Myself))
- HPGT(LastSeenBy(Myself),20)
- THEN
- RESPONSE #100
- Spell(NearestEnemyOf(Myself),WIZARD_DOMINATION)
- END
-
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HaveSpell(WIZARD_EMOTION_HOPELESSNESS)
- !HasBounceEffects(LastSeenBy(Myself))
- HPGT(LastSeenBy(Myself),20)
- THEN
- RESPONSE #100
- Spell(NearestEnemyOf(Myself),WIZARD_EMOTION_HOPELESSNESS)
- END
-
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HaveSpell(WIZARD_CONFUSION)
- HPGT(LastSeenBy(Myself),20)
- !StateCheck(LastSeenBy(Myself),STATE_CONFUSED)
- THEN
- RESPONSE #100
- Spell(NearestEnemyOf(Myself),WIZARD_CONFUSION)
- END
-
-
- //*Low-Level Disabling*
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HaveSpell(WIZARD_DIRE_CHARM)
- !HasBounceEffects(LastSeenBy(Myself))
- HPGT(LastSeenBy(Myself),20)
- !StateCheck(LastSeenBy(Myself),STATE_CONFUSED)
- THEN
- RESPONSE #100
- Spell(NearestEnemyOf(Myself),WIZARD_DIRE_CHARM)
- END
-
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HaveSpell(WIZARD_RAY_OF_ENFEEBLEMENT)
- !HasBounceEffects(LastSeenBy(Myself))
- HPGT(LastSeenBy(Myself),20)
- THEN
- RESPONSE #100
- Spell(Myself,WIZARD_RAY_OF_ENFEEBLEMENT)
- END
-
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HPGT(LastSeenBy(Myself),30)
- !HasBounceEffects(LastSeenBy(Myself))
- General(LastSeenBy(Myself),HUMANOID)
- !StateCheck(LastSeenBy(Myself),STATE_HELPLESS)
- HaveSpell(WIZARD_CHARM_PERSON)
- THEN
- RESPONSE #100
- Spell(LastSeenBy(Myself),WIZARD_CHARM_PERSON)
- END
-
- //*Low-Level Offensive*
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HPGT(LastSeenBy(Myself),20)
- !HasBounceEffects(LastSeenBy(Myself))
- HaveSpell(WIZARD_BURNING_HANDS)
- THEN
- RESPONSE #100
- Spell(LastSeenBy(Myself),WIZARD_BURNING_HANDS)
- END
-
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HPGT(LastSeenBy(Myself),20)
- !HasBounceEffects(LastSeenBy(Myself))
- HaveSpell(WIZARD_COLOR_SPRAY)
- THEN
- RESPONSE #100
- Spell(LastSeenBy(Myself),WIZARD_COLOR_SPRAY)
- END
-
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HPGT(LastSeenBy(Myself),20)
- !HasBounceEffects(LastSeenBy(Myself))
- HaveSpell(WIZARD_MAGIC_MISSILE)
- THEN
- RESPONSE #100
- Spell(LastSeenBy(Myself),WIZARD_MAGIC_MISSILE)
- END
-
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- !HasBounceEffects(LastSeenBy(Myself))
- HaveSpell(WIZARD_SLEEP)
- !StateCheck(LastSeenBy(Myself),STATE_SLEEPING)
- THEN
- RESPONSE #100
- Spell(LastSeenBy(Myself),WIZARD_SLEEP)
- END
-
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HPGT(LastSeenBy(Myself),20)
- !HasBounceEffects(LastSeenBy(Myself))
- HaveSpell(WIZARD_CHROMATIC_ORB)
- THEN
- RESPONSE #100
- Spell(LastSeenBy(Myself),WIZARD_CHROMATIC_ORB)
- END
-
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HPGT(LastSeenBy(Myself),20)
- !HasBounceEffects(LastSeenBy(Myself))
- HaveSpell(WIZARD_LARLOCH_MINOR_DRAIN)
- THEN
- RESPONSE #100
- Spell(LastSeenBy(Myself),WIZARD_LARLOCH_MINOR_DRAIN)
- END
-
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HPGT(LastSeenBy(Myself),20)
- !HasBounceEffects(LastSeenBy(Myself))
- HaveSpell(WIZARD_BLINDNESS)
- !StateCheck(LastSeenBy(Myself),STATE_BLIND)
- THEN
- RESPONSE #100
- Spell(LastSeenBy(Myself),WIZARD_BLINDNESS)
- END
-
-
- //*Combat*
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- Range(NearestEnemyOf(Myself),6)
- THEN
- RESPONSE #100
- RunAwayFrom(NearestEnemyOf(Myself),90)
- END
-
- // * reset locals*
- // * if no enemies are around
- IF
- !See(NearestEnemyOf(Myself))
- CombatCounter(0)
- OR(2)
- GlobalGT("pscript_SpellThrust","LOCALS",0)
- GlobalGT("pscript_WHIP","LOCALS",0)
- THEN
- RESPONSE #100
- SetGlobal("pscript_SpellThrust","LOCALS",0)
- SetGlobal("pscript_WHIP","LOCALS",0)
- END