home *** CD-ROM | disk | FTP | other *** search
- // * Offensive mage -- intended for bards, possibly fighter mages
- // * Will only attack spells against 'stronger' creatures that do not have spell bouncing or protection
- // * Mostly low-level offsensive 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_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
- // * Disabling*
-
- IF
- ActionListEmpty()
- See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
- HaveSpell(WIZARD_POWER_WORD_SILENCE)
- !HasBounceEffects(LastSeenBy(Myself))
- !StateCheck(LastSeenBy(Myself),STATE_SILENCED)
- THEN
- RESPONSE #100
- Spell(LastSeenBy(Myself),WIZARD_POWER_WORD_SILENCE)
- 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
- 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*
-
- // * attack with melee
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- Range(NearestEnemyOf(Myself),4)
- THEN
- RESPONSE #100
- EquipMostDamagingMelee()
- AttackReevaluate(NearestEnemyOf(Myself),30)
- END
-
- // * attack with ranged weapons
- IF
- ActionListEmpty()
- See(NearestEnemyOf(Myself))
- !Range(NearestEnemyOf(Myself),4)
- THEN
- RESPONSE #100
- EquipRanged()
- AttackReevaluate(NearestEnemyOf(Myself),30)
- 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