;; BatMUD ;; Triggers for use with mage guild ;; Also incorporates psionic offensive spells ;; Jenny@bat.org 1998 ;; ;; Needs this file to run spell casting triggers /require -q bat-generic.tf ;; This is the tick reporting mode, spell points only /set sp_report=on ;; Auto caster ;; To use this type /set auto_cast on ;; This casts of avoid ambush messages, if you doing get message, doesn't cast ;; If you wish to use this, put your damtypes here ;; If you have more than 4 useable damtypes, make your own trigs. /set damtype1=fire /set damtype2=poison /set damtype3=acid /set damtyype4=magical ;; Ambush trig /def -F -p9 -mregexp -t"(Your small size avoids a nasty ambush.|Your marvelous intellect avoids a nasty ambush.|Your keen senses note a disturbance seconds before the ambush!|Your knowledge about [A-Za-z' ]* tactics enables you to avoid the ambush.|You superb intelligence enables you to avoif the ambush.)" auto_caster =\ /if ({auto_cast}=~"on")\ ;; Triggered to cast best spell, if you don't have that, change ;; to something you do /ex .%;\ /endif ;; ;; Triggers to automatically change damtype in auto_cast mode /def -F -p19 -t"* writhes in agony." dam_writhe_agony=/change_damtype /def -F -p19 -t"* grunts from the pain." dam_grunt_pain=/change_damtype /def -F -p19 -t"* shudders from the force of the attack." dam_shudder=/change_damtype /def -F -p19 -t"* shrugs off the attack." dam_shrug=/change_damtype /def -F -p19 -t"* winces a little from the pain." dam_winces=/change_damtype ;; ;; Auto change damtype, make sure they are defined in the list above /def change_damtype=\ /if ({auto_cast}=~"on")\ /if ({spells}=~$(/eval /_echo %%{%{damtype1}}))/dam %{damtype2}%;/ex%;\ /elseif ({spells}=~$(/eval /_echo %%{%{damtype2}}))/dam %{damtype3}%;/ex%;\ /elseif ({spells}=~$(/eval /_echo %%{%{damtype3}}))/dam %{damtype4}%;/ex%;\ /elseif ({spells}=~$(/eval /_echo %%{%{damtype4}}))/dam %{damtype4}%;/ex%;\ /endif%;\ /endif ;; ;; Auto cast cheaper spell when sp are low /def -F -p9 -t"You do not have enough spell points to cast the spell." low_sp=\ /if ({auto_cast}=~"on")@party say low on sp%;\ /if ({sp}>100)/vg .%;\ /elseif ({sp}>55)/gd .%;\ /elseif ({sp}>31)/av .%;\ /elseif ({sp}>17)/pr .%;\ /else @party say outa sp%;\ /endif%;\ /endif ;; ;; Dead recognition trig, changes damtype to 1st /def -F -p5 -aCred -mregexp -t"(\ moves on to happier hunting grounds.|\ staggers for a moment|\ dies in a massive fit of convulsions.|\ You get bad vibrations as|\ dies in a massive pool of blood.|\ stops existing in this reality.|\ loses the privilege to live.|\ gets an acute case of iron-poisoning.|\ A large hole replaces|\ You hear the horrendous death-cry of the|\ is dogfood.|\ A large cavity replaces|\ skull splits wide open|\ entrails spill all over the place|\ suddenly stops breathing and jerks a couple of times\ )" monster_is_dead= save%;/dam %{damtype1} ;; ;; Heal self /def -F -p12 -t"You clap your hands and whisper 'judicandus littleee'" hs=\ ;; This part of the trig won't work if you aren't running bat-generic.tf /if ({hp}<{hpmax})\ cast heal self%;\ /set spell=heal self%;\ /endif ;; ;; Select your damtype ;; /dam [acid|asphyxiation|cold|electricity|fire|magical|poison|psionic] /def dam=\ /if (regmatch("acid|asphyxiation|cold|electricity|fire|magical|poison|psionic", {1}))\ /set spells=$(/eval /_echo %%{%{1}})%;\ /echo -aB (Tinyfugue) damtype is now $[toupper({1})]%;\ /else \ /echo -aB TF info: valid damage types are acid, asphyxiation, \ cold, electricity, fire, magical and poison.%;\ /endif ;; ;; Table of spells ;; Psionic /set psionic=mind_blast psibolt psi_blast mind_disruption psychic_crush psychic_shout psychic_storm /eval /set off_spell_stack=%{off_spell_stack}|mind_blast|psibolt|psi_blast|mind_disruption|psychic_crush|psychic_shout|psyhcic_storm ;; Acid /set acid=disruption acid_wind acid_arrow acid_ray acid_blast acid_rain acid_storm /eval /set off_spell_stack=%{off_spell_stack}|disruption|acid_wind|acid_arrow|acid_ray|acid_blast|acid_rain|acid_storm ;; Asphyxiation /set asphyxiation=vacuumbolt suffocation chaos_bolt strangulation blast_vacuum vacuum_ball vacuum_globe /eval /set off_spell_stack=%{off_spell_stack}|vacuumbolt|suffocation|chaos_bolt|strangulation|blast_vacuum|vacuum_ball|vacuum_globe ;; Cold /set cold=chill_touch flaming_ice darkfire icebolt cold_ray cone_of_cold hailstorm /eval /set off_spell_stack=%{off_spell_stack}|chill_touch|flaming_ice|darkfire|icebolt|cold_ray|cone_of_cold|hailstorm ;; Electricity /set electricity=shocking_grasp lightning_bolt blast_lightning forked_lightning electrocution chain_lightning lightning_storm /eval /set off_spell_stack=%{off_spell_stack}|shocking_grasp|lightning_bolt|blast_lightning|forked_lightning|electrocution|chain_lightning|lightning_storm ;; Fire /set fire=flame_arrow firebolt fire_blast meteor_blast lava_blast meteor_swarm lava_storm /eval /set off_spell_stack=%{off_spell_stack}|flame_arrow|firebolt|fire_blast|meteor_blast|lava_blast|meteor_swarm|lava_storm ;; Magical /set magical=magic_missile summon_lesser_spores levin_bolt summon_greater_spores golden_arrow magic_wave magic_eruption /eval /set off_spell_stack=%{off_spell_stack}|magic_missile|summon_lesser_spores|levin_bolt|summon_greater_spores|golden_arrow|magic_wave|magic_eruption ;; Poison /set poison=thorn_spray poison_blast venom_strike power_blast summon_carnal_spores poison_spray killing_cloud /eval /set off_spell_stack=%{off_spell_stack}|thorn_spray|poison_blast|venom_strike|power_blast|summon_carnal_spores|poison_spray|killing_cloud ;; ;; Get the spell name and cast it /def get_spell=\ /set spell=$(/nth %{spell_number} %{spells})%;\ /set targettype=off%;/do_spell %{*} ;; ;; Your input trigs....based on spell performance ;; Poor /def pr=/set spell_number=1%;/set spell_rounds=1%;/get_spell %{*} ;; Average /def av=/set spell_number=2%;/set spell_rounds=2%;/get_spell %{*} ;; Good /def gd=/set spell_number=3%;/set spell_rounds=3%;/get_spell %{*} ;; Very good /def vg=/set spell_number=4%;/set spell_rounds=3%;/get_spell %{*} ;; Excellent /def ex=/set spell_number=5%;/set spell_rounds=4%;/get_spell %{*} ;; Good area /def ga=/set spell_number=6%;/set spell_rounds=4%;/get_spell %{*} ;; Excellent area /def ea=/set spell_number=7%;/set spell_rounds=6%;/get_spell %{*} ;; Pisonic /def -F -p20 -t"You clench your fists and yell 'tora tora tora'" psychic_crush_recast= /set spell=NOTHING%; /set spell_number=5%; /do_spell %{victim} ;; ;; Concealed /def -F -p15 -t"You surreptitiously conceal your spell casting." concealed= @party say casting concealed ;; ;; Hi-lites /def -F -aCbgred -aBCblack -p15 -t"* screams in pain." scream_pain= @party say 0% resist /def -F -aCbgred -aBCblack -p15 -t"* writhes in agony." writhe_agony= @party say 20% resist /def -F -aCbgred -aBCblack -p15 -t"* grunts from the pain." grunt_pain= @party say 40% resist /def -F -aCbgred -aBCblack -p15 -t"* shudders from the force of the attack." shudder= @party say 60% resist /def -F -aCbgblack -aBCred -p15 -t"* shrugs off the attack." shrug= @party say 100% resist /def -F -aCbgblack -aBCred -p15 -t"* winces a little from the pain." winces= @party say 80% resist /def -F -aCbgyellow -aBCred -p15 -t"You feel like your spell gained additional power." power= @party say additional power! /def -F -aCbgyellow -aBCred -p15 -t"You feel like you managed to channel additional POWER to your spell." power2= @party say additional POWER! /def -F -aCbgyellow -aBCred -p15 -t'Your fingertips are surrounded with swirling ENERGY as you cast the spell.' power3= @party say swirling ENERGY!! /def -F -p1 -aCbgcyan -aBCmagenta -t'You hit * with your psychic storm.' psychic_storm_cast /def -F -p1 -aCbgcyan -aBCmagenta -t'You hit * with your psychic shout.' psychic_shout_cast /def -F -p1 -aCbgcyan -aBCmagenta -t'You crush * mind with your psychic attack!' psychic_crush_cast