home *** CD-ROM | disk | FTP | other *** search
- // * Defensive first and then offensive mage
- // * Will run away if doesn't have the spells, or can't use them
-
- // * Vocalize if silenced*
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- StateCheck(Myself,STATE_SILENCED)
- HaveSpell(WIZARD_VOCALIZE)
- THEN
- RESPONSE #100
- Spell(Myself,WIZARD_VOCALIZE)
- END
-
- // *Spell Defensive*
- IF
- ActionListEmpty()
- HaveSpell(WIZARD_MINOR_SPELL_DEFLECTION)
- OR(4)
- See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
- See(NearestEnemyOfType([0.0.0.CLERIC_ALL]))
- See(NearestEnemyOfType([0.0.0.BARD_ALL]))
- See(NearestEnemyOfType([0.0.0.DRUID_ALL]))
- !HasBounceEffects(Myself)
- !HasImmunityEffects(Myself)
- THEN
- RESPONSE #100
- Spell(Myself,WIZARD_MINOR_SPELL_DEFLECTION)
- END
-
- IF
- ActionListEmpty()
- OR(4)
- See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
- See(NearestEnemyOfType([0.0.0.CLERIC_ALL]))
- See(NearestEnemyOfType([0.0.0.BARD_ALL]))
- See(NearestEnemyOfType([0.0.0.DRUID_ALL]))
- HaveSpell(WIZARD_MINOR_SPELL_TURNING)
- !HasBounceEffects(Myself)
- !HasImmunityEffects(Myself)
- THEN
- RESPONSE #100
- Spell(Myself,WIZARD_MINOR_SPELL_TURNING)
- END
-
- IF
- ActionListEmpty()
- OR(4)
- See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
- See(NearestEnemyOfType([0.0.0.CLERIC_ALL]))
- See(NearestEnemyOfType([0.0.0.BARD_ALL]))
- See(NearestEnemyOfType([0.0.0.DRUID_ALL]))
- HaveSpell(WIZARD_SPELL_SHIELD)
- !HasBounceEffects(Myself)
- !HasImmunityEffects(Myself)
- THEN
- RESPONSE #100
- Spell(Myself,WIZARD_SPELL_SHIELD)
- END
-
-
- IF
- ActionListEmpty()
- OR(4)
- See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
- See(NearestEnemyOfType([0.0.0.CLERIC_ALL]))
- See(NearestEnemyOfType([0.0.0.BARD_ALL]))
- See(NearestEnemyOfType([0.0.0.DRUID_ALL]))
- HaveSpell(WIZARD_SPELL_TURNING)
- !HasBounceEffects(Myself)
- !HasImmunityEffects(Myself)
- THEN
- RESPONSE #100
- Spell(Myself,WIZARD_SPELL_TURNING)
- END
-
-
- //*Mid/High Level - Defensive*
- // * Only use these spells if needed, i.e., too high AC, or no mirror images
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HaveSpell(WIZARD_STONE_SKIN)
- CheckStatLT(Myself,1,STONESKINS)
- THEN
- RESPONSE #100
- Spell(Myself,WIZARD_STONE_SKIN)
- END
-
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HaveSpell(WIZARD_SPIRIT_ARMOR)
- CheckStatGT(Myself,1,ARMORCLASS)
- THEN
- RESPONSE #100
- Spell(Myself,WIZARD_SPIRIT_ARMOR)
- END
-
-
- //*Low-Level Defensive*
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HaveSpell(WIZARD_GHOST_ARMOR)
- CheckStatGT(Myself,2,ARMORCLASS)
- THEN
- RESPONSE #100
- Spell(Myself,WIZARD_GHOST_ARMOR)
- END
-
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HaveSpell(WIZARD_MIRROR_IMAGE)
- !StateCheck(Myself,STATE_MIRRORIMAGE)
- THEN
- RESPONSE #100
- Spell(Myself,WIZARD_MIRROR_IMAGE)
- END
-
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HaveSpell(WIZARD_INVISIBILITY)
- !StateCheck(Myself,STATE_INVISIBLE)
- THEN
- RESPONSE #100
- Spell(Myself,WIZARD_INVISIBILITY)
- END
-
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HaveSpell(WIZARD_SHIELD)
- CheckStatGT(Myself,4,ARMORCLASS)
- THEN
- RESPONSE #100
- Spell(Myself,WIZARD_SHIELD)
- END
-
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HaveSpell(WIZARD_ARMOR)
- CheckStatGT(Myself,6,ARMORCLASS)
- THEN
- RESPONSE #100
- Spell(Myself,WIZARD_ARMOR)
- 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_SPELL_THRUST)
- Global("pscript_SpellThrust","LOCALS",0)
- OR(2)
- HasBounceEffects(LastSeenBy(Myself))
- HasImmunityEffects(LastSeenBy(Myself))
- THEN
- RESPONSE #100
- Spell(LastSeenBy(Myself),WIZARD_SPELL_THRUST)
- 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 Offensive*
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HPLT(LastSeenBy(Myself),50)
- HPGT(LastSeenBy(Myself),20)
- !HasBounceEffects(LastSeenBy(Myself))
- HaveSpell(WIZARD_FINGER_OF_DEATH)
- THEN
- RESPONSE #100
- Spell(NearestEnemyOf(Myself),WIZARD_FINGER_OF_DEATH)
- END
-
- IF
- See(NearestEnemyOf(Myself))
- HaveSpell(WIZARD_ABI_DALZIMS_HORRID_WILTING)
- HPGT(LastSeenBy(Myself),20)
- THEN
- RESPONSE #100
- Spell(NearestEnemyOf(Myself),WIZARD_ABI_DALZIMS_HORRID_WILTING)
- END
-
- // * summon a Nishruu to combat an enemy mage
- IF
- ActionListEmpty()
- See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
- HaveSpell(WIZARD_SUMMON_NISHRUU)
- THEN
- RESPONSE #100
- Spell(Myself,WIZARD_SUMMON_NISHRUU)
- END
-
- // * cast maze on a strong opponent
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HPGT(LastSeenBy(Myself),50)
- !HasBounceEffects(LastSeenBy(Myself))
- HaveSpell(WIZARD_MAZE)
- THEN
- RESPONSE #100
- Spell(NearestEnemyOf(Myself),WIZARD_MAZE)
- END
-
- // * Mid-Level Offensive*
-
- // * cone of cold
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HPGT(LastSeenBy(Myself),20)
- !HasBounceEffects(LastSeenBy(Myself))
- HaveSpell(WIZARD_CONE_OF_COLD)
- THEN
- RESPONSE #100
- Spell(LastSeenBy(Myself),WIZARD_CONE_OF_COLD)
- END
-
- // * try to hold monsters
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HPGT(LastSeenBy(Myself),30)
- !HasBounceEffects(LastSeenBy(Myself))
- !General(LastSeenBy(Myself),HUMANOID)
- !StateCheck(LastSeenBy(Myself),STATE_HELPLESS)
- HaveSpell(WIZARD_HOLD_MONSTER)
- THEN
- RESPONSE #100
- Spell(LastSeenBy(Myself),WIZARD_HOLD_MONSTER)
- END
-
- // * death spell; very useful against hordes of summoned creatures
- // * will only use this spell if attacked by more than 4 enemy creatures
- IF
- ActionListEmpty()
- Delay(6)
- HaveSpell(WIZARD_DEATH_SPELL)
- See(NearestEnemyOf(Myself))
- HPGT(LastSeenBy(Myself),10)
- HPLT(LastSeenBy(Myself),50)
- !HasBounceEffects(LastSeenBy(Myself))
- NumCreatureVsPartyGT([ENEMY],4)
- THEN
- RESPONSE #100
- Spell(LastSeenBy(Myself),WIZARD_DEATH_SPELL)
- END
-
- // * try and disintegrate a really powerful opponent
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- HPGT(LastSeenBy(Myself),50)
- !HasBounceEffects(LastSeenBy(Myself))
- HaveSpell(WIZARD_DISINTEGRATE)
- THEN
- RESPONSE #100
- Spell(LastSeenBy(Myself),WIZARD_DISINTEGRATE)
- 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)
- ActionListEmpty()
- 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
-
- 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
-
-
- //*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