<?xml version="1.0" encoding="iso-8859-1"?>
<muclient>
<plugin
 name="AlterAeon"
 author="Oriol Gomez"
 id="553a883096da345ce6897740"
 language="Lua"
 purpose="Alter Aeon utilities. Don't import this into other muds"
 save_state="y"
 date_written="2009-05-26 07:21:17"
 requires="4.37"
 version="1000000.0"
 >

</plugin>


<!-- Get our standard constants -->

<include name="constants.lua"/>
<!-- stuff -->
<triggers>
  <trigger
   enabled="y"
   match="Your reflexes trigger and you instantly wake to battle!"
   omit_from_output="y"
   script="cgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/skills/fastwake.ogg")</send>
  </trigger>
</triggers>
<triggers>
  <trigger
   enabled="y"
   match="You put * in * shell."
   send_to="14"
   sequence="1"
  >
  <send>Sound(GetInfo(67).."/sounds/bombs/put in shell.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You construct an empty grenade shell."
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/bombs/shell1.ogg")
DoAfterSpecial(0.2,'Sound(GetInfo(67).."/sounds/bombs/shell2.ogg")',12)</send>
  </trigger>
</triggers>
<triggers>
  <trigger
   enabled="y"
   match="* suddenly explodes!"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/bombs/explode.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="A ring of icy fog surges outward!"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/bombs/ice ring.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="Burning liquid sprays through the air, sticking to everything it touches!"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/bombs/fire liquid.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You carefully construct a bladebomb."
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/bombs/make bladebomb.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You carefully construct a fire bomb."
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/bombs/make firebomb.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You carefully construct a frostring."
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/bombs/make frostring.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You construct a fuse."
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/bombs/makefuse.ogg")</send>
  </trigger>
</triggers>
<triggers>
  <trigger
   enabled="y"
   match="Your wounds accumulate, and your rage starts to build!"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/skills/usebrage.ogg")</send>
  </trigger>
</triggers>
<triggers>
  <trigger
   enabled="y"
   match="You are rescued from the brink of death, and suddenly find yourself in your recall!"
   send_to="14"
   sequence="100"
  >
  <send>prevhp = 0
prevmn = 0
rct={}
Sound(sdir.."/sounds/combat/deathcard.ogg")</send>
  </trigger>
</triggers>
<aliases>
  <alias
   match="cg *"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>Execute("c %1 group")</send>
  </alias>
  <alias
   match="unv"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>
if rooms==nil then
Note("Can't get room table information.")
elseif rooms[k_room]==nil then
Note("There is no information for this room.")
else
unexplored={}
doors={}
for k,v in pairs(rooms[k_room]) do
if v=="unexplored" then
table.insert(unexplored,walkdirs[k])
elseif v=="door" then
table.insert(unexplored,walkdirs[k])
end --unexplored
end --for
if (#unexplored>1) then
count=#unexplored-1
end --count
if #unexplored==1 then
Note("There is an unexplored exit "..table.concat(unexplored, ", "))
elseif #unexplored>1 then
Note("There are unexplored exits "..table.concat(unexplored, ", ", 1, count)..", and "..unexplored[#unexplored]..".")
else
nearest()
end --count
end --nil
</send>
  </alias>
</aliases>
<triggers>
  <trigger
   enabled="y"
   match="^kxwt_walkdir (\d+)"
   omit_from_output="y"
   regexp="y"
   send_to="14"
   sequence="100"
  >
  <send>
lastdir=walkdirs["%1"]
pmap()
</send>
  </trigger>
  <trigger
   enabled="y"
   match="^kxwt_rvnum (\d+)"
   omit_from_output="y"
   regexp="y"
   send_to="14"
   sequence="100"
  >
  <send>
k_room="%1"
if rooms==nil then
rooms={}
end
if rooms[k_room]==nil then
rooms[k_room]={}
end
</send>
  </trigger>

  <trigger
   enabled="y"
   match="Weapon damage: * to * *, * strength to use."
   omit_from_output="y"
   send_to="14"
   sequence="100"
  >
<send>
if (gs("shortid")==1) then
Note("%0")
return
end
if (gs("shortid")==3) then
Note("%0")
end
if iidflags==nil then
iidflags=", damage %1 to %2 %3 needs %4 str. "
else
iidflags=iidflags..", damage %1 to %2 %3 needs %4 str. "
end
</send>
  </trigger>
</triggers>
<triggers>
  <trigger
   enabled="y"
   match="Three more spinning wheels appear in the air before you!"
   send_to="14"
   sequence="100"
  >
  <send>
swheel=0
</send>
  </trigger>
  <trigger
   enabled="y"
   match="You are beset upon by bandits, and flee with only your life!"
   send_to="14"
   sequence="100"
  >
  <send>
Sound(GetInfo(67).."/sounds/slots/bandit1.ogg")
DoAfterSpecial(1.3,'Sound(GetInfo(67).."/sounds/slots/bandit2.ogg")',12)
DoAfterSpecial(3.3,'Sound(GetInfo(67).."/sounds/slots/losemerchant.ogg")',12)</send>
  </trigger>
  <trigger
   enabled="y"
   match="You must take * to *!"
   send_to="14"
   sequence="100"
  >
  <send>
ppi.stop(wheel1)
ppi.stop(wheel2)
Sound(GetInfo(67).."/sounds/slots/travel.ogg")
Sound(GetInfo(67).."/sounds/slots/wagon.ogg")
</send>
  </trigger>
</triggers>
<triggers>
  <trigger
   enabled="y"
   match="The black aura about your body fades."
   omit_from_output="n"
   send_to="14"
   sequence="100"
  >
  <send>rc("darken")
if kspells["darken"]==1 then
rct["darken"]=true
end
Sound(GetInfo(67).."/sounds/spells/darken off.ogg")</send>
  </trigger>

  <trigger
   enabled="y"
   group="compare"
   match="* looks * than *"
   omit_from_output="y"
   sequence="100"
  >
  </trigger>
</triggers>
<triggers>
<trigger 
match="Type: * Composition: * Defense: * ac-apply *Requires * strength to use."
 enabled="y"
script="idnote"
 omit_from_output="y"
 send_to="14"
 sequence="100"
>
 <send>
if gs("shortid")==1 then return end
if ("%1"~="weapon") then
iacapply="%3 min str %5"
Note("This item is a %2 %1.")
else
iacapply=nil
Note("This item is a %2 weapon.")
end
</send>
</trigger>
<trigger 
match="^Type: (.*?)\s*Composition: (.*?)"
 enabled="y"
script="idnote"
regexp="y"
 omit_from_output="y"
 send_to="14"
 sequence="100"
>
 <send>
if gs("shortid")==1 then return end
if "%1"=="LIQUID CONTAINER" then
Send("lecho liquid_id")
elseif ("%1"=="SPELLCOMP" or "%1"=="HERB" or "%1"=="FOOD") then
Send("lecho spellcomp_id")
else
if "%1"~="weapon" then
Note("This item is a %1")
else
iacapply=nil
Note("This item is a %3 weapon.")
end
end
</send>
</trigger>
<trigger
match="spellcomp_id"
omit_from_output="y"
enabled="y"
send_to="14"
 sequence="100"
>
<send>
print("A "..idlevel.." brew component.")
</send>
</trigger>
<trigger
match="liquid_id"
omit_from_output="y"
enabled="y"
send_to="14"
 sequence="100"
>
<send>
Note("this is a %2 liquid container")
</send>
</trigger>
<trigger
match="This item is bound to you."
 enabled="y"
script="idnote"
 omit_from_output="y"
 send_to="14"
 sequence="100"
>
<send>
if gs("shortid")==1 then return end
if iidflags==nil then
iidflags=" bound"
else
iidflags=iidflags.." bound"
end
</send>
</trigger>
<trigger
match="This item is bound to your account."
script="idnote"
 enabled="y"
 omit_from_output="y"
 send_to="14"
 sequence="100"
>
<send>
if gs("shortid")==1 then return end
if iidflags==nil then
iidflags=" account bound"
else
iidflags=iidflags.." account bound"
end

</send>
</trigger>
 <trigger
 enabled="y"
 match="Object is: *"
 omit_from_output="y"
 send_to="14"
 sequence="90"
 >
 <send>
if settings.shortid.status==1 then
Note("Flags: %1")
return
end
if (gs("shortid")==3) then
Note("Flags: %1")
end
iidflags="%1"
</send>
 </trigger>

  <trigger
   enabled="y"
   match="movingYou can't just walk away from a fight!"
   omit_from_output="y"
   send_to="14"
   sequence="100"
  >
  <send>EnableTimer("maptimer",true)</send>
  </trigger>
</triggers>
<aliases>
<alias
match="known"
enabled="y"
send_to="14"
sequence="5"
>
<send>
--print(#kspells..", "..kspells)

</send>
</alias>
  <alias
   match="sfc *"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>Execute("storage fcapture -wearable %1")</send>
  </alias>
</aliases>
<aliases>
  <alias
   match="sfc *"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>Execute("storage fcapture -wearable %1")</send>
  </alias>
  <alias
   match="storage fclear"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>storefilter={}
Note("ok, cleared")</send>
  </alias>
</aliases>
<triggers>
  <trigger
   enabled="y"
   keep_evaluating="y"
   match="Weight: *  Size: *  *"
script="idnote"
omit_from_output="y"
   sequence="1"
send_to="14"
  >
  <send>
if gs("shortid")==1 then return end
if string.match("%3","Level: ") then
idlevel="level "..string.sub("%3",7)
elseif string.match("%3","Total levels: ") then
idlevel="total "..string.sub("%3",15)
end
</send>
  </trigger>
</triggers>
<triggers>
  <trigger
   enabled="y"
   match="Item has other effects:"
   omit_from_output="y"
   send_to="14"
   sequence="100"
  >
  <send>
if gs("shortid")==1 then return end
Send("lecho affects_done")
iaffects=""</send>
  </trigger>

</triggers>
<triggers>
  <trigger
   enabled="y"
   match="movingAlas, you cannot go that way."
   send_to="14"
omit_from_output="y"
   sequence="100"
  >
  <send>Note("map interrupted unexpectedly, can't find next exit. use zmap resume or zmr to resume.")

</send>
  </trigger>
</triggers>

<timers>
  <timer name="maptimer" script="procmap" enabled="y" second="1.00" offset_second="0.00" >

  </timer>
</timers>

<aliases>
  <alias
   match="zmg *"
   enabled="y"
   send_to="10"
   sequence="100"
  >
  <send>zmap go %1</send>
  </alias>
  <alias
   match="zmd *"
   enabled="y"
   send_to="10"
   sequence="100"
  >
  <send>zmap door %1</send>
  </alias>

  <alias
   match="zms"
   enabled="y"
   send_to="10"
   sequence="100"
  >
  <send>zmap start</send>
  </alias>
  <alias
   match="zmst"
   enabled="y"
   send_to="10"
   sequence="100"
  >
  <send>zmap stop</send>
  </alias>
  <alias
   match="zmgb"
   enabled="y"
   send_to="10"
   sequence="100"
  >
  <send>zmap goback</send>
  </alias>
  <alias
   match="zmp"
   enabled="y"
   send_to="10"
   sequence="100"
  >
  <send>zmap pause</send>
  </alias>

  <alias
   match="zmr"
   enabled="y"
   send_to="10"
   sequence="100"
  >
  <send>zmap resume</send>
  </alias>

  <alias
   match="zmu"
   enabled="y"
   send_to="10"
   sequence="100"
  >
  <send>zmap undo</send>
  </alias>
</aliases>

<triggers>
  <trigger
   enabled="y"
   match="mapmove*"
   omit_from_output="y"
   send_to="14"
   sequence="99"
  >
  <send>
if "%1"~=curmap[1] then
Note("you are in the wrong room for this map! You should be in "..curmap[1])
else
mvtime=true
adir=0
table.remove(curmap,1)
table.remove(curmap,1)
maxdir=#curmap
Send(curmap[1].." | tail 1 | prefix moving")
table.insert(mapback,1,ldir[curmap[1]])
end
</send>
  </trigger>
  <trigger
   enabled="y"
   match="mapmove"
   omit_from_output="y"
   sequence="98"
  >
  </trigger>
  <trigger
   enabled="y"
   match="mapmoveYou dream a dream..."
   omit_from_output="y"
   sequence="100"
  >
  <send>stand
l | head 1 | prefix mapmove</send>
  </trigger>
  <trigger
   enabled="y"
   match="mapstart*"
   omit_from_output="y"
   send_to="14"
   sequence="99"
  >
  <send>
mtime=true
curmap={}
table.insert(curmap,"%1")
table.insert(curmap,true)
Note("starting new map at "..curmap[1]..". To stop, type zmap stop.")
Note("Please note that you will need to use the movement pad or the one letter  direction aliases so the direction is recorded properly. Refer to the readme for more details.")
</send>
  </trigger>
</triggers>
<triggers>
  <trigger
   enabled="y"
   match="mapstart"
   omit_from_output="y"
   sequence="98"
  >
  </trigger>
  <trigger
   enabled="y"
   match="mapstartYou dream a dream..."
   omit_from_output="y"
   sequence="100"
  >
  <send>stand
l | head 1 | prefix mapstart</send>
  </trigger>
  <trigger
   enabled="y"
   match="No-one in your group is in need of healing."
   omit_from_output="y"
   sequence="100"
  >
  </trigger>
</triggers>
<aliases>
 <alias
 script="zmap"
 match="zmap *"
 enabled="y"
 sequence="100"
 >
 </alias>
  <alias
   match="a1"
   enabled="y"
   sequence="100"
  >
  <send>em exclaims, 'Ich bringe das Feuer!;a</send>
  </alias>
  <alias
   match="zmap"
   enabled="y"
   sequence="100"
send_to="2"
  >
  <send>
Zmap commands are:
zmap start or zms - start a map
zmap door or zmd name - add a door to a map.
zmap undo or zmu - remove last direction you went to.
zmap pause - stop logging directions, for example if you're not sure which direction is next then go back to where you were and resume.
zmap stop or zmst - complete a map
zmap list - list all your maps
zmap go or zmg mapname go to a given map
zmap resume or zmr - resume an unexpectedly interrupted map or paused map creation.
zmap goback or zmgb - go the last map backwards
</send>
  </alias>
</aliases>
<aliases>
  <alias
   match="track *"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>trackarea=""
trackconflict=0
trackdistn=0
trackdist=""
trackdir=""
Send("nearby | grep %1 | prefix trk")
Send("lecho tracking_start")</send>
  </alias>
  <alias
   match="ptrack *"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>
trackconflict=0
Send("nearby | grep %1 | prefix trk")
</send>
  </alias>

</aliases>
<triggers>
  <trigger
   enabled="y"
   match="tracking_start"
omit_from_output="y"
   send_to="14"
   sequence="100"
  >
  <send>if trackarea=="" then
Note("No area with such name was found! Please make sure you capitalize it correctly.")
end
if trackconflict==1 then
trackarea=""
end
</send>
  </trigger>
</triggers>
<triggers>
  <trigger
   enabled="y"
   match="^trk\[.*\] (.*) (is|are) (.*) to the (\w+)\.$"
   omit_from_output="y"
   regexp="y"
   script="tracktime"
   sequence="100"
  >
  </trigger>
</triggers>
<triggers>
  <trigger
   enabled="y"
   match="^storeprev.*?\(\s*(\d+)\).*$"
   script="prevadd"
   sequence="100"
  >
  </trigger>
  <trigger
   enabled="y"
   match="storeprevNothing matching those arguments found."
   omit_from_output="y"
   sequence="100"
  >
  </trigger>
</triggers>
<triggers>
  <trigger
   enabled="y"
   match="* visible players out of * connected (max was *)."
   send_to="14"
omit_from_output="y"
   sequence="100"
  >
  <send>Note("%1/%2 visible max was %3")</send>
  </trigger>
  <trigger
   enabled="y"
   match="storecapNothing matching those arguments found."
   omit_from_output="y"
   send_to="14"
   sequence="100"
  >
  <send>Note("There are no items to capture.")</send>
  </trigger>
</triggers>
<triggers>
  <trigger
   enabled="y"
   match="Welcome back! Thanks for playing Alter Aeon!"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/notifications/daygift.ogg")</send>
  </trigger>
</triggers>

<aliases>
  <alias
   match="storage fcapture *"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>
filtering=true
if gs("container")~=nil then
Note("Now filter capturing %1")
Send("storage llist %1 -insult | prefix storecap")
else
Note("You haven't set your container! Look for the container used for item keeping in config.")
end
</send>
  </alias>
  <alias
   match="storage capture *"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>
filtering=false
if gs("container")~=nil then
Note("Now capturing %1")
Send("storage llist %1 -insult | prefix storecap")
else
Note("You haven't set your container! Look for the container used for item keeping in config.")
end
</send>
  </alias>

  <alias
   match="storage preview *"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>
Note("Testing capture of %1")
previtems=0
prevweight=0
Send("storage llist %1 -w | prefix storeprev")
Send("lecho preview_done")
</send>
  </alias>
</aliases>
<triggers>
  <trigger
   enabled="y"
   match="^storeprev.*?\(\s*(\d+)\).*$"
   script="prevadd"
   sequence="100"
regexp="y"
omit_from_output="y"
  >
  </trigger>
</triggers>

<triggers>
  <trigger
   enabled="y"
   match="ccNothing."
   omit_from_output="y"
   sequence="100"
  >
  </trigger>
</triggers>

<triggers>
  <trigger
   enabled="y"
   match="preview_done"
   omit_from_output="y"
script="prevdone"
   send_to="14"
   sequence="100"
  >
</trigger>
  <trigger
   enabled="y"
   match="set_worn"
   omit_from_output="y"
   send_to="14"
   sequence="100"
  >
  <send>
for i,v in pairs(zapped) do
Send("wear "..v)
end
Sound(GetInfo(67).."/sounds/notifications/setcomplete.ogg")
Execute("eql change "..act[2].." "..eql[act[2]].container)
eql.lastset=act[2]
eql.wearing=false
Note("done!")
dbn("Took "..os.clock()-c1.."seconds")</send>
  </trigger>
</triggers>
<triggers>
  <trigger
   enabled="y"
   match="icheckYou are carrying */* items with weight *"
   omit_from_output="y"
   send_to="14"
   sequence="100"
  >
  <send>eql.items=tonumber("%1")
eql.maxitems=tonumber("%2")
eql.cancarry=eql.maxitems-eql.items
Send("lecho lightning_wear")
</send>
  </trigger>
</triggers>
<triggers>
  <trigger
   enabled="y"
   match="kxwt_expcap *"
   omit_from_output="y"
   send_to="14"
   sequence="100"
  >
  <send>k_cap=tonumber("%1")</send>
  </trigger>
  <trigger
   enabled="y"
   match="showcapYour experience cap is * exp."
   omit_from_output="y"
   send_to="14"
   sequence="100"
  >
  <send>k_cap=tonumber("%1")</send>
  </trigger>
  <trigger
   enabled="y"
   match="kxwt_obj_zap *"
   omit_from_output="y"
   send_to="14"
   sequence="100"
  >
  <send>
table.insert(zapped,"%1")
</send>
  </trigger>

</triggers>

<triggers>
  <trigger
   match="Recent tells:"
enabled="y"
   omit_from_output="y"
send_to="14"
   sequence="100"
  >
  <send>
EnableGroup("telltriggers",0)
DoAfterSpecial(1,'EnableGroup("telltriggers",1)',12)</send>
  </trigger>
</triggers>

<triggers>
  <trigger
   enabled="y"
   match="ccYou do not see that here."
   omit_from_output="y"
   send_to="14"
   sequence="100"
  >
  <send>
ecnum=ecnum-1
container=ecnum.."."..eql[act[2]].container
table.remove(containerstocheck,1)
if #containerstocheck>0 then
Send("lecho container_check 1")
else
Send("insult -all | prefix eqlc")
Send("lecho wearing_time")
end
</send>
  </trigger>
</triggers>
<triggers>
  <trigger
   enabled="y"
   match="cc(carried) * contains:"
   omit_from_output="y"
   send_to="14"
   sequence="100"
  >
  <send>Send("lecho container_check "..ecnum+1)
</send>
  </trigger>
</triggers>

<triggers>
  <trigger
   enabled="y"
   match="wearing_time"
   omit_from_output="y"
   script="weartime"
   sequence="100"
  >
  </trigger>
  <trigger
   enabled="y"
   match="affects_done"
   omit_from_output="y"
   script="idtime"
   sequence="100"
  >
  </trigger>

  <trigger
   enabled="y"
   match="lightning_wear"
   omit_from_output="y"
   script="wearlight"
   sequence="100"
  >
  </trigger>

  <trigger
   enabled="y"
   match="moving_time"
   omit_from_output="y"
   script="movetime"
   sequence="100"
  >
  </trigger>
  <trigger
   enabled="y"
   match="container_check *"
   omit_from_output="y"
   script="containertime"
   sequence="100"
  >
  </trigger>
  <trigger
   enabled="y"
   match="^cc.*Item\:\s*(\w+)\s*'.*'"
   omit_from_output="y"
   script="itemfoundtime"
regexp="y"
   sequence="100"
  >
  </trigger>
  <trigger
   enabled="y"
   match="^storecap.*Item\:\s*(\w+)\s*'.*'"
   omit_from_output="y"
   script="storecapture"
regexp="y"
   sequence="100"
  >
  </trigger>

</triggers>
<triggers>
  <trigger
   enabled="y"
   match="* lifts gently out of your hands and begins hovering in the air before you."
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/reforge/lift.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="Sending activity for channel *"
   omit_from_output="y"
   script="mgag"
   sequence="100"
  >
  </trigger>
  <trigger
   enabled="y"
   match="tnl                   even if it's not your main."
   omit_from_output="y"
   sequence="100"
  >
  </trigger>
  <trigger
   enabled="y"
   match="tnlClass     Level  Micro     Exp Cost  Percent"
   omit_from_output="y"
   sequence="100"
  >
  </trigger>
  <trigger
   enabled="y"
   match="tnlRemember that it's always a good idea to level your cheapest class,"
   omit_from_output="y"
   sequence="100"
  >
  </trigger>
</triggers>
<triggers>
  <trigger
   enabled="y"
   match="You stab *, then rip the wound open with your weapon!"
omit_from_output="y"
   script="cgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/skills/bls1.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="* wound keeps bleeding!"
omit_from_output="y"
   script="cgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/skills/bls2.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="A twisted bone shield fractures, splits, and abruptly crumbles to dust! (worn by you)"
   omit_from_output="y"
   script="ngag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/shield off.ogg")
rct["bone shield"]=true
rc("bone shield")</send>
  </trigger>
  <trigger
   enabled="y"
   lines_to_match="2"
   match="^Bloody bone armor suddenly cracks\, breaks\, and splits\, then falls off in\nlarge chunks\. \(worn by you\)$"
   multi_line="y"
   regexp="y"
send_to="12"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/barmor off.ogg")
rct["bone armor"]=true
rc("bone armor")</send>
  </trigger>
  <trigger
   enabled="y"
   match="The tooth melts and forms a pinkish mass, which you quickly pull and shape into a bone shield."
   omit_from_output="y"
   script="ngag"
   send_to="14"
   sequence="100"
  >
  <send>rct["bone shield"]=nil
Sound(GetInfo(67).."/sounds/necromancer/bone shield.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You are already affected by that spell."
   send_to="14"
   sequence="100"
  >
  <send>rct={}</send>
  </trigger>
  <trigger
   enabled="y"
   match="You begin to feel a little sick to your stomach."
   omit_from_output="y"
   script="ngag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/barmor2.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You collapse to the ground while the spell takes hold!"
   omit_from_output="y"
   script="ngag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/barmor4.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You feel new bones and flesh forming a protective armor plate over your body."
   omit_from_output="y"
   script="ngag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/barmor6.ogg")
</send>
  </trigger>
  <trigger
   enabled="y"
   match="You feel new bones forming and bursting through your torso!"
   omit_from_output="y"
   script="ngag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/barmor5.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You prick a finger and dip a tooth in your blood, then utter a quick invocation..."
   omit_from_output="y"
   script="ngag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/shield invoque.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You quickly place a hand on the inside of a bone shield to bind it to you."
   omit_from_output="y"
   script="ngag"
   send_to="14"
   sequence="100"
  >
  <send>Send("wear bone shield")
rct["bone shield"]=nil</send>
  </trigger>
  <trigger
   enabled="y"
   match="You suddenly feel stabbing pains in your chest and gut!"
   omit_from_output="y"
   script="ngag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/barmor3.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You utter an invocation over some teeth, then quickly swallow them."
   omit_from_output="y"
   script="ngag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/barmor11.ogg")
rct["bone armor"]=nil
DoAfterSpecial(0.2,'Sound(GetInfo(67).."/sounds/necromancer/barmor12.ogg")',12)</send>
  </trigger>
</triggers>

<triggers>
  <trigger
   enabled="y"
   match="You are already affected by that spell."
   send_to="14"
   sequence="100"
  >
  <send>rct={}</send>
  </trigger>
</triggers>
<triggers>
  <trigger
   enabled="y"
   match="Better luck next time."
   send_to="12"
   sequence="100"
  >
  <send>DoAfterSpecial(0.5,'Sound(GetInfo(67).."/sounds/slots/better luck.ogg")',12)</send>
  </trigger>
  <trigger
   enabled="y"
   match="Looks like you didn't hit the jackpot this time."
   send_to="12"
   sequence="100"
  >
  <send>DoAfterSpecial(0.5,'Sound(GetInfo(67).."/sounds/slots/no jackpot.ogg")',12)</send>
  </trigger>
  <trigger
   enabled="y"
   match="You hear a quiet 'ding' sound in the air."
   send_to="12"
   sequence="100"
  >
  <send>DoAfterSpecial(0.5,'Sound(GetInfo(67).."/sounds/slots/quiet bell.ogg")',12)</send>
  </trigger>
  <trigger
   enabled="y"
   match="You hear a loud 'ding' sound in the air."
   send_to="12"
   sequence="100"
  >
  <send>DoAfterSpecial(0.5,'Sound(GetInfo(67).."/sounds/slots/loud bell.ogg")',12)</send>
  </trigger>
  <trigger
   enabled="y"
   match="You hear a loud racket of bells and alarms that sound you as a winner!"
   send_to="12"
   sequence="100"
  >
  <send>DoAfterSpecial(0.5,'Sound(GetInfo(67).."/sounds/slots/winner.ogg")',12)</send>
  </trigger>

</triggers>
<triggers>
  <trigger
   enabled="y"
   match="( 5)A large pumpkin sits here, grinning up at you."
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/notifications/random.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="* has given you a gift!"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/notifications/you get gift.ogg")
  Execute("history_add all=%1 has given you a gift!")
  </send>
  </trigger>
  <trigger
   enabled="y"
   match="(friend) * has given * a newbie welcome gift!"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/notifications/friend gets gift.ogg")
    </send>
  </trigger>
  
  <trigger
   enabled="y"
   match="a flaming pumpkin tattoo in *."
   omit_from_output="y"
   sequence="100"
  >
  </trigger>
  <trigger
   enabled="y"
   match="a Halloween Pumpkin in * rack check."
   omit_from_output="y"
   sequence="100"
  >
  </trigger>
  <trigger
   enabled="y"
   match="a Halloween Pumpkin in Darken pumpkin spawning chamber."
   omit_from_output="y"
   sequence="100"
  >
  </trigger>
  <trigger
   enabled="y"
   match="a Halloween Pumpkin in Dragontooth rack check room."
   omit_from_output="y"
   sequence="100"
  >
  </trigger>
  <trigger
   enabled="y"
   match="Happy Holidays from the staff at Alter Aeon!"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/notifications/advent.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="The final wheel stops at '*'!"
   send_to="14"
omit_from_output="y"
   sequence="100"
  >
  <send>ppi.stop(wheel3)
Note("The final wheel stops at %1!")
wheel3s=ppi.play(sdir.."/sounds/slots/%1.ogg",0,100)
</send>
  </trigger>
  <trigger
   enabled="y"
   match="The first wheel stops at '*'!"
   send_to="14"
omit_from_output="y"
   sequence="100"
  >
  <send>ppi.stop(wheel1)
Note("The first wheel stops at %1!")
wheel1s=ppi.play(sdir.."/sounds/slots/%1.ogg",0,-100)
</send>
  </trigger>
  <trigger
   enabled="y"
   match="The second wheel comes to a stop..."
   send_to="14"
   sequence="100"
  >
  <send>

swheel=2
</send>
  </trigger>
  <trigger
   enabled="y"
   match="The first wheel comes to a stop..."
   send_to="14"
   sequence="100"
  >
  <send>
swheel=1
</send>
  </trigger>
  <trigger
   enabled="y"
   match="The third wheel comes to a stop..."
   send_to="14"
   sequence="100"
  >
  <send>
swheel=3
</send>
  </trigger>
  <trigger
   enabled="y"
   match="The second wheel stops at '*'!"
   send_to="14"
omit_from_output="y"
   sequence="100"
  >
  <send>ppi.stop(wheel2)
Note("The second wheel stops at %1!")
wheel2s=ppi.play(sdir.."/sounds/slots/%1.ogg",0,0)
</send>
  </trigger>
  <trigger
   enabled="y"
   match="The numbered wheel stops at *!"
   send_to="14"
   sequence="100"
  >
  <send>ppi.stop(wheel4)
Sound(GetInfo(67).."/sounds/slots/wheelstop.ogg")
</send>
  </trigger>
  <trigger
   enabled="y"
   match="A fourth wheel containing numbers appears!"
   send_to="14"
   sequence="100"
  >
  <send>
wheel4=ppi.play(sdir.."/sounds/slots/jackpotwheel.ogg",0,0)
</send>
  </trigger>

  <trigger
   enabled="y"
   match="Three spinning wheels appear in the air before you!"
   send_to="12"
   sequence="100"
  >
  <send>ppi.play(GetInfo(67).."/sounds/slots/wheels appear.ogg",0,0,90)
wheel1=ppi.play(GetInfo(67).."sounds/slots/wheelsound.ogg",1,-100)
wheel2=ppi.play(GetInfo(67).."sounds/slots/wheelsound.ogg",1,0)
wheel3=ppi.play(GetInfo(67).."sounds/slots/wheelsound.ogg",1,100)
</send>
  </trigger>
  <trigger
   enabled="y"
   match="Three more spinning wheels appear in the air before you!"
   send_to="12"
   sequence="100"
  >
  <send>ppi.play(GetInfo(67).."/sounds/slots/wheels appear.ogg",0,0,90)
wheel1=ppi.play(GetInfo(67).."sounds/slots/wheelmore.ogg",1,-100)
wheel2=ppi.play(GetInfo(67).."sounds/slots/wheelmore.ogg",1,0)
wheel3=ppi.play(GetInfo(67).."sounds/slots/wheelmore.ogg",1,100)
</send>
  </trigger>


  <trigger
   enabled="y"
   match="Two spinning wheels appear in the air before you!"
   send_to="12"
   sequence="100"
  >
  <send>
wheel1=ppi.play(GetInfo(67).."sounds/slots/wheelmore.ogg",1,-100)
wheel2=ppi.play(GetInfo(67).."sounds/slots/wheelmore.ogg",1,100)
ppi.play(GetInfo(67).."/sounds/slots/wheels appear.ogg",0,0,90)
</send>
  </trigger>

  <trigger
   enabled="y"
   match="You offer * gold to the gods..."
   send_to="12"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/slots/offergold2.ogg")
DoAfterSpecial(0.2,'Sound(GetInfo(67).."/sounds/slots/offergold1.ogg")',12)</send>
  </trigger>
</triggers>

<aliases>
  <alias
   match="rank *"
   enabled="n"
   send_to="12"
   sequence="99"
  >
  <send>rankname="%1"
Send("who combat | prefix crank")

</send>
  </alias>
</aliases>
<triggers>
  <trigger	
   enabled="y"
   match="erank[Lvl Tot  Cl]  Name        Explorer Points"
   omit_from_output="y"
   send_to="14"
   sequence="100"
  >
  <send>epoints={}
DoAfterSpecial(0.2,[[
require "tprint"
ts = {} -- table to hold the keys
table.foreach (epoints, function (k, v) table.insert (ts, v) end )
table.sort(ts,
function (k,v)
if k>v then
return true
end
end
)
name=string.lower(rankname)
points=epoints[name]
if points==nil then
return
end
table.foreach(ts,
function(k,v)
if v==points then
rank=k
end
end
)
Note(name.." has "..points.." explorer points, rank "..rank)
]],12)
</send>
  </trigger>
  <trigger
   enabled="y"
   match="erank\[\s*\d+\s*\d+\s*\w+\]\s*(\w+)\s*(\d+)"
   omit_from_output="y"
   regexp="y"
   send_to="14"
   sequence="100"
  >
  <send>epoints[string.lower("%1")]=tonumber("%2")
</send>
  </trigger>
  <trigger
   enabled="y"
   match="crank[Lvl Tot  Cl]  Name          Combat Points"
   omit_from_output="y"
   send_to="14"
   sequence="100"
  >
  <send>
points={}

DoAfterSpecial(0.2,[[
require "tprint"
ts = {} -- table to hold the keys
table.foreach (points, function (k, v) table.insert (ts, v) end )
table.sort(ts,
function (k,v)
if k>v then
return true
end
end
)
name=string.lower(rankname)
points=points[name]
if points==nil then
Note("Something's gone awry! Make sure you entered a full character name.")
return
end
table.foreach(ts,
function(k,v)
if v==points then
rank=k
end
end
)
Note(name.." has "..points.." combat points, rank "..rank)
Send("who explorer | prefix erank")
]],12)
</send>
  </trigger>
  <trigger
   enabled="y"
   match="crank\[\s*\d+\s*\d+\s*\w+\]\s*(\w+)\s*(\d+)"
   omit_from_output="y"
   regexp="y"
   send_to="14"
   sequence="100"
  >
  <send>points[string.lower("%1")]=tonumber("%2")

</send>
  </trigger>
</triggers>

<triggers>
  <trigger
   enabled="y"
   match="You can now learn the * '*'!"
   sequence="100"
send_to="14"
  >
  <send>Execute("history_add all=You can now learn %2!")
Execute("history_add learn=You can now learn %2!")</send>
  </trigger>
</triggers>

<triggers>
  <trigger
   enabled="y"
   match="^kxwt_brew_start"
   omit_from_output="y"
   regexp="y"
   send_to="14"
   sequence="100"
  >
  <send>brewing=1
recipe={}
ritems=0
Note("nod")
DoAfterSpecial(0.2,"process_recipe()",12)
DoAfterSpecial(3,"brewing=0",12)
Sound(GetInfo(67).."/sounds/brewing/start.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="^kxwt_brew_end"
   omit_from_output="y"
   regexp="y"
   send_to="14"
   sequence="100"
  >
  <send>brewing=0
DoAfterSpecial(3,'Sound(GetInfo(67).."sounds/brewing/bell.ogg")',12)
if (gs("brewlog")==true) then
AppendToNotepad("brews", "Successful recipe of "..#recipe.." ingredients:\\r\\n")
for i,v in pairs(recipe) do
AppendToNotepad("brews",v.."\\r\\n")
end
end
</send>
  </trigger>
  <trigger
   enabled="y"
   match="Type: ARMOR*Defense: * ac-apply*"
   send_to="12"
   sequence="100"
  >
  <send>ac=" ac %2 "</send>
  </trigger>
  <trigger
   enabled="y"
   match="Type: CONTAINER   Composition: MAGIC   Weight capacity: * of * lbs."
   send_to="2"
omit_from_output="y"
   sequence="100"
  >
  <send>Has %1 of %2 pounds.</send>
  </trigger>
</triggers>

<triggers>
  <trigger
   enabled="y"
   match="* rips a bone from the corpse of * as a replacement."
   omit_from_output="y"
   script="ngag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/consume bone.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="* rips and tears into the corpse of *, devouring it!"
   omit_from_output="y"
   script="ngag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/misc/eat corpse.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="A flesh beast rips a chunk of flesh from the corpse of * and slowly eats it."
   omit_from_output="y"
   script="ngag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/consume flesh.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You tap your life, and a blood red winged demon flaps quickly toward *!"
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/mist2.ogg")</send>
  </trigger>
</triggers>

<triggers>
  <trigger
   enabled="y"
   match="* hits A metal construct and is stabbed by a flailing metal limb!"
   omit_from_output="y"
   script="cgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/mparry1.ogg")
DoAfterSpecial(0.2,'Sound(GetInfo(67).."/sounds/necromancer/mparry2.ogg")',12)</send>
  </trigger>
  <trigger
   enabled="y"
   match="* hits A wood woad and is stabbed by a wooden spike!"
   omit_from_output="y"
   script="cgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/wparry1.ogg")
DoAfterSpecial(0.2,'Sound(GetInfo(67).."/sounds/necromancer/wparry2.ogg")',12)</send>
  </trigger>
  <trigger
   enabled="y"
   match="* lend* you * strength for a moment..."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/turnf2.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="* pauses and looks about blankly."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/feeble mind.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="* unleashes a powerful psionic blast, turning your brain into jelly!"
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/psionic.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="A circle of roots and vines burst forth from the ground around *!"
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/roots start.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="A storm of thousands of * shards whirls about *, dragging the wind with them and slashing anything that gets in the way!"
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/storm2.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="A vampire bites *!"
   omit_from_output="y"
   script="cgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/vamp bite.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="A vampire shouts a ferocious warcry at *!"
   omit_from_output="y"
   script="cgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/vamp scream.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="A vampire's eyes take on an unsettling red glow, and it glares at *!"
   omit_from_output="y"
   script="cgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/vamp int.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="More roots sprout out of the ground to entangle *!"
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/roots more.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="REBOOT IMPENDING, EVERYONE PLEASE RECALL AND SAVE."
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/notifications/rebootnow.ogg")
Execute("history_add all=rebooting, everyone please recall and save")</send>
  </trigger>
  <trigger
   enabled="y"
   match="REBOOT IN APPROXIMATELY * MINUTES, FYI."
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/notifications/reboot.ogg")
Execute("history_add all=reboot in %1 minutes!")</send>
  </trigger>
  <trigger
   enabled="y"
   match="The sunlight suddenly becomes a hundred times brighter and hotter!"
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/sunstorm.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="Thousands of * shards whirl around you like a tornado!"
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/storm1.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="Thousands of * shards whirl around you like a tornado, slashing everything in their path!"
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/storm1.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="Translucent magical flames spring to life around *! *"
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/flameblade.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="With considerable effort, you focus your mana and grow a light crystal shield."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/crystal shield.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You are surrounded with a thick, black fog."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>
rct["darken"]=false
Sound(GetInfo(67).."/sounds/spells/darken on.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You call upon * to grant you the power of the sun!"
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/sunstorm.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You call upon * to strike down * with fire."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/flamestrike.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You cast a powerful spell on the corpse of *, slowing its decay."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/preserve.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You choke and gag on the water in your lungs, as your spell wears out."
   omit_from_output="n"
   send_to="14"
   sequence="100"
  >
  <send>rc("water breathing")
if kspells["waterbreathing"]==1 then
rct["water breathing"]=true
end
Sound(GetInfo(67).."/sounds/spells/water off.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You become unable to sense the presence of poison."
   omit_from_output="n"
   send_to="14"
   sequence="100"
  >
  <send>rc("detect poison")
if kspells["detectpoison"]==1 then
rct["detect poison"]=true
end
Sound(GetInfo(67).."/sounds/spells/dpoison off.ogg")</send>
  </trigger>
    <trigger
   enabled="y"
   match="You come out of your whirling attack ready to face another opponent."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/skills/whirl off.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You cry victory over your fallen enemy!"
   omit_from_output="y"
   script="skgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/skills/victory.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You drive your weapon into a nearby shadow."
   omit_from_output="y"
   script="skgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/shadow/strike1.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You feel a huge burst of power from the gods!"
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/turnf4.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You feel that * with you..."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/turnf1.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You feell a sudden burst of power from the gods!"
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/turnf3.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You hold your hands out in front of you, and will a dark cloud of magic into existence above them.  Staring into it, you see an image..."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/farsee.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You make a shallow cut on your arm, and paint yourself with the blood."
   omit_from_output="y"
   script="skgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/skills/valor1.ogg")
Sound(GetInfo(67).."/sounds/skills/valor2.ogg")
Sound(GetInfo(67).."/sounds/skills/valor3.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You make a shallow yet bloody cut and begin tapping your life."
   omit_from_output="y"
   script="skgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/tap begin.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You quench your thirst for blood and the red haze slowly clears from your vision."
   omit_from_output="y"
   script="skgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/skills/bquench.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You quickly bind your wound and stop tapping your life."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/tap stop.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You slowly part your hands, and * appears between them."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/holyweapon.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You stand in the center of a raging blizzard created by your own magic."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/blizzard.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You tap your life, and a swarm of blood red demons fly quickly toward *!"
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/mist2.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You whirl and fight in a flurry of attacks!"
   omit_from_output="y"
   script="skgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/skills/whirl on.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="Your lungs feel funny, kinda dry... water anyone?"
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>
rct["water breathing"]=nil
Sound(GetInfo(67).."/sounds/spells/water on.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="Your vision takes on a slightly greenish tinge."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>
rct["detect poison"]=nil
Sound(GetInfo(67).."/sounds/spells/dpoison on.ogg")</send>
  </trigger>
      <trigger
   enabled="y"
   match="Your weapon thrusts from a shadow to strike *!"
   omit_from_output="y"
   script="skgag"
   send_to="14"
   sequence="100"
  >
  <send>DoAfterSpecial(0.4,'Sound(GetInfo(67).."/sounds/shadow/strike2.ogg")',12)</send>
  </trigger>
</triggers>
<aliases>
  <alias
   match="eqw* *"
   enabled="y"
   sequence="100"
send_to="12"
  >
  <send>Execute("eql wear %2")</send>
  </alias>
  <alias
   match="eqr* *"
   enabled="y"
   sequence="100"
send_to="12"
  >
  <send>Execute("eql remove %2")</send>
  </alias>
  <alias
   match="eqc* *"
   enabled="y"
   sequence="100"
send_to="12"
  >
  <send>Execute("eql create %2")</send>
  </alias>

</aliases>
<triggers>
  <trigger
   enabled="y"
   match="* hits you squarely with a sneaky roundhouse kick!"
   omit_from_output="y"
   script="cgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/kick/kick1.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="* hits you with a stunningly strong mule kick!"
   omit_from_output="y"
   script="cgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/kick/kick3.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="* kick at you, but barely makes contact."
   omit_from_output="y"
   script="cgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/kick/kick2.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="* kicks you while you're down, what a low blow!"
   omit_from_output="y"
   script="cgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/kick/kick4.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You dodge a poorly placed kick from *."
   omit_from_output="y"
   script="cgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/kick/kickdodge.ogg")</send>
  </trigger>
</triggers>

<triggers>
  <trigger
   enabled="y"
   match="A fuzzy cloud of magic numbs your mind, making thinking really difficult."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/feeble you.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="A wall of ice quickly grows up around *, trapping him!"
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/ice prison.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
match="The fog in your mind slowly clears, you can think again!"
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/feeble off.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You cast the spell to merge * soulstone and * soulstone..."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/soulforge.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You gather energy from * and channel it towards *!"
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/tap.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You gather your power and store * spell in *."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/store.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You suddenly feel like a clumsy oaf."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/clums.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You throw a handful crushed leaves into the air, and a sudden gust of wind blows them all around you!"
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/mass conf.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You throw down a handful of teeth to create A tall prison of jagged bone teeth, trapping * inside!"
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/bone prison.ogg")</send>
  </trigger>
</triggers>

<triggers>
  <trigger
   enabled="y"
   match="* glows yellow for a moment, then the light fades into nothingness."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/enchantarmor.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="* is engulfed in a writhing mass of biting ethereal mouths!"
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/sphere3.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="* is made clumsy and uncoordinated by your curse."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/clums.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="A brilliant white light suddenly surrounds your hands."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/sacred1.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="A shimmering distortion surrounds * for a moment."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/leth.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="As you hit *, a burst of bright light surges from your hands to engulf it!"
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/sacred1.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="Everything around you suddenly speeds up, happening in a blur of motion."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/leth off.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="The bite marks on * ooze and rot!"
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/sphere4.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="The stake driven through * shadow falls free."
   omit_from_output="y"
   script="skgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/shadow/bindfree.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="The world abruptly slows down around you."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/leth.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You attempt to pin * shadow to the ground, but miss!"
   omit_from_output="y"
   script="skgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/shadow/bindmiss.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You begin casting Nar's famous spell..."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/sphere1.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You call upon * to remove the poison from you and heal you."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/rem poison.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You call upon * to sanctify and make this a place of healing."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/haven2.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You complete the spell, and hurl a ghastly looking ball of nether-energy at *!"
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/sphere2.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You concentrate and conjure forth a huge wall of ice!"
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/wall of ice.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You draw a mass of darkness from a nearby shadow, and shape it into a number of small blades."
   omit_from_output="y"
   script="skgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/shadow/blades.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You drive a stake through * shadow, pinning it in place!"
   omit_from_output="y"
   script="skgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/shadow/bind.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You feel slightly sick for a moment as a 'slow poison' spell takes hold."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/slow on.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You feel the thin yet potent presence of life flow around you into the room."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/haven3.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You feel your magically enhanced charisma fading."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/presence off.ogg")
rc("presence")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You pull at the shadows and shape a small hole in reality, then step through it."
   omit_from_output="y"
   script="skgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/shadow/asylum.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You raise your arms and begin the rituals required by the spell."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/haven1.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You suddenly feel better, but realize that your protection from poison has worn off."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/slow off.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You suddenly feel confident and more popular."
   omit_from_output="y"
   script="sgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/spells/presence on.ogg")
</send>
  </trigger>
</triggers>
<triggers>
  <trigger
   enabled="y"
   match="* soulstone shatters, and the freed soul howls as it is drawn into *!"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/soulbind.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You kick * but barely make contact."
   omit_from_output="y"
   script="cgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/kick/kick2.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You kick * while *'s down!"
   omit_from_output="y"
   script="cgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/kick/kick4.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You land a solid mule kick on *!"
   omit_from_output="y"
   script="cgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/kick/kick3.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You sneak a solid roundhouse kick in on *!"
   omit_from_output="y"
   script="cgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/kick/kick1.ogg")</send>
  </trigger>
</triggers>

<triggers>
  <trigger
   enabled="y"
   match="The red mist hovering near you gathers together and solidifies into a vampire."
   omit_from_output="y"
   script="sgag"
   sequence="100"
send_to="14"
  >
  <send>Sound(GetInfo(67).."/sounds/necromancer/vampire form.ogg")</send>
  </trigger>
</triggers>

<triggers>
  <trigger
   enabled="y"
omit_from_output="y"
script="sgag"
   match="You trace symbols in the air, which briefly spark and crackle..."
send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/channelcast/light.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
omit_from_output="y"
script="sgag"
   match="You trace invisible lines in the air, which begin to hum faintly..."
send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/channelcast/crystal.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
omit_from_output="y"
script="sgag"
   match="You trace symbols of power, momentarily leaving trails of frost hanging in the air..."
send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/channelcast/frost.ogg")</send>
  </trigger>

</triggers>

<triggers>
  <trigger
   enabled="y"
   match="* stomps on you and you hear something crunch!"
   send_to="14"
script="skgag"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/stomp/crunch.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You stomp on * and hear something crunch!"
omit_from_output="y"
   send_to="14"
script="skgag"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/stomp/crunch.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="* stomps on you but nearly misses!"
omit_from_output="y"
   send_to="14"
script="skgag"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/stomp/miss1.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You try to stomp on * but only barely make contact."
script="skgag"
omit_from_output="y"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/stomp/miss1.ogg")</send>
  </trigger>

  <trigger
   enabled="y"
   match="* stomps on your toes!  OW!"
script="skgag"
omit_from_output="y"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/stomp/toes.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You stomp on * toes!"
script="skgag"
omit_from_output="y"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/stomp/toes.ogg")</send>

  </trigger>

  <trigger
   enabled="y"
   match="* stomps on your toes!  OW!"
script="skgag"
omit_from_output="y"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/stomp/toes.ogg")</send>
  </trigger>
  <trigger
   enabled="y"
   match="You narrowly avoid getting an appendage stomped on by *!"
omit_from_output="y"
script="skgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/stomp/miss2.ogg")</send>
  </trigger>

  <trigger
   enabled="y"
   match="* narrowly avoids getting stomped on by you!"
omit_from_output="y"
script="skgag"
   send_to="14"
   sequence="100"
  >
  <send>Sound(GetInfo(67).."/sounds/stomp/miss2.ogg")</send>
  </trigger>
</triggers>
<triggers>
 <trigger
 keep_evaluating="y"
 match="^kxwt_(.*)"
enabled="y"
send_to="14"
 omit_from_output="y"
 regexp="y"
 sequence="101"
 >
<send>
table.insert(kxwts,"%1")
dbn("%1")
</send>
 </trigger>
</triggers>

<triggers>
 <trigger
 enabled="y"
 match="[mushznews] *: *"
 omit_from_output="y"
 send_to="14"
 sequence="1"
 >
 <send>Execute("history_add all=%2")
Note("Mush-z News! %2")
ppi.play(GetInfo(67).."/sounds/notifications/news.ogg",0,0,ppi.getVolume()+30)</send>
 </trigger>

 <trigger
 enabled="y"
 match="You have become more renowned!"
 send_to="14"
 sequence="100"
 >
 <send>Sound(GetInfo(67).."/sounds/notifications/fame.ogg")</send>
 </trigger>
</triggers>

<triggers>
 <trigger
 enabled="y"
 match="( 0)Hundreds of small crystals hang motionless in the air."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You begin casting a complex spell..."
 omit_from_output="y"
 script="sgag"
 send_to="14"
 sequence="100"
 >
 <send>Sound(GetInfo(67).."/sounds/channelcast/begin.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You complete your spell!"
 omit_from_output="y"
 script="sgag"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You trace fiery glowing symbols in the air before you..."
 omit_from_output="y"
 script="sgag"
 send_to="14"
 sequence="100"
 >
 <send>Sound(GetInfo(67).."/sounds/channelcast/fire.ogg")</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="You feel queasy as the spell takes root in your blood and bones."
 omit_from_output="y"
 send_to="14"
 sequence="100"
script="sgag"
 >
 <send>
rct["dying breath"]=nil
Sound(sdir.."/sounds/spells/dying breath on.ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="A vampire quietly hisses an unintelligible and foul sounding word..."
 omit_from_output="y"
 send_to="14"
 sequence="100"
script="cgag"
 >
 <send>
Sound(sdir.."/sounds/necromancer/vampire hiss.ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="know"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="^tnlClass\s*Current\s*Cost to level\s*Percent"
 omit_from_output="y"
regexp="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="scrYou will now see a *TICK* marker when ticks hit."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
</triggers>
<timers>
 <timer name="rctimer" script="rectimer" second="2.00" offset_second="0.00" >
 <send></send>

 </timer>
</timers>
<triggers>
 <trigger
 enabled="y"
 match="You will now see a *TICK* marker when ticks hit."
 sequence="100"
 >
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="knowCleric"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="knowMage"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="knowNecromancer"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="knowThief"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="knowWarrior"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="You use your faith in * as a shield to protect you."
 omit_from_output="y"
 script="sgag"
send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/faith on.ogg")
rct["faith shield"]=nil
</send>
 </trigger>
 <trigger
 enabled="y"
 match="Your shield of faith dissipates, and you no longer feel as protected by *."
 omit_from_output="y"
 script="sgag"
 sequence="100"
send_to="14"
 >
 <send>Sound(sdir.."/sounds/spells/faith off.ogg")
rct["faith shield"]=true
rc("faith shield")
</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="tnlYou have spent * out of * total fame."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="You create a thick fog of icy particles from the air."
 omit_from_output="y"
script="sgag"
 send_to="14"
 sequence="100"
 >
 <send>Sound(GetInfo(67).."/sounds/spells/icefog.ogg")</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="You begin trying to pick *..."
 omit_from_output="y"
 script="mgag"
 send_to="14"
 sequence="100"
 >
 <send>Sound(GetInfo(67).."/sounds/pick/"..math.random(1,rpick)..".ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You continue to manipulate the lock..."
 omit_from_output="y"
 script="mgag"
 send_to="14"
 sequence="100"
 >
 <send>Sound(GetInfo(67).."/sounds/lock/"..math.random(1,rpick)..".ogg")</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="statAttributes*"
 omit_from_output="y"
 sequence="1"
 >
 </trigger>
 <trigger
 enabled="y"
match="You are surrounded by a flickering blue glow.  When it fades, *"
 omit_from_output="y"
 script="mgag"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/misc/blue glow self.ogg")</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="You scan the surrounding area..."
send_to="14"
 omit_from_output="y"
 sequence="100"
 >
<send>if not gag.misc then Note("You scan the surrounding area...") end
</send>
 </trigger>
</triggers>
<aliases>
 <alias
 match="cacc"
 enabled="y"
 sequence="100"
 >
 <send>contr all consume corpse</send>
 </alias>
 <alias
 match="set container *"
 enabled="y"
 send_to="12"
 sequence="100"
 >
 <send>ss("container","%1")
Note("Container set to %1")</send>
 </alias>
</aliases>
<triggers>
 <trigger
 enabled="y"
 match="You find a small bladder of green fluid, and carefully tie off the ends before removing it."
 send_to="14"
 sequence="100"
 >
 <send>if gs("dcomps")==true then
Send("drop bladder")
Send("sac bladder")
end</send>
 </trigger>
 <trigger
 enabled="y"
 match="You make a small incision and drain some fluid into a vial of bile."
 send_to="14"
 sequence="100"
 >
 <send>if gs("dcomps")==true then
Send("drop vial bile fluid yellow brown")
Send("sac bile")
end</send>
 </trigger>
 <trigger
 enabled="y"
 match="You feel a lump, so you cut open an organ and retrieve a * stone."
 send_to="14"
 sequence="100"
 >
 <send>if gs("dcomps")==true then
Send("drop stone")
Send("sac stone")
end</send>
 </trigger>
 <trigger
 enabled="y"
 match="You roughly hack out a small bladder of black fluid and tie off the ends with string."
 send_to="14"
 sequence="100"
 >
 <send>if gs("dcomps")==true then
Send("drop bladder bile black")
Send("sac bladd")
end</send>
 </trigger>
</triggers>
<aliases>
 <alias
 match="bsc"
 enabled="y"
 sequence="100"
 >
 <send>bsac corpse</send>
 </alias>
 <alias
 match="confset *"
 enabled="y"
 send_to="12"
 sequence="100"
 >
 <send>settings["%1"].status=true
Note("ok")</send>
 </alias>
</aliases>
<triggers>
 <trigger
 enabled="y"
 ignore_case="y"
 match="(friend) * completed quest *"
 send_to="14"
 sequence="100"
 >
 <send>Sound(GetInfo(67).."/sounds/notifications/friend quest.ogg")
Execute("history_add friends=%1 completed quest %2")
Execute("history_add all=%1 completed quest %2")
</send>
 </trigger>
</triggers>

<triggers>
 <trigger
 enabled="y"
 match="tnlClass Current Cost to level Percent"
omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="tnltnlYou have spent * out of * total fame."
omit_from_output="y"
 sequence="100"
 >
 </trigger>
</triggers>
<aliases>
 <alias
 match="config *"
 enabled="y"
 sequence="2"
send_to="12"
 >
 <send>
if "%1"=="release" then
sclear()
release()
return
elseif "%1"=="custom" then
sclear()
custom()
return
elseif "%1"=="clear" then
sclear()
return
elseif settings["%1"]==nil then
Note("Unrecognized setting - Type config for a list.")
return
else
settingtables()
confname="%1"
if settings["%1"].status==true then
settings["%1"].status=false
Note("%1 disabled.")
if "%1"=="areamusic" then
ppi.slideVol(0,areaid,2000)
DoAfterSpecial(3,'ppi.stop(areaid)',12)
end
if "%1"=="ambience" then
ppi.slideVol(0,ambid,2000)
DoAfterSpecial(3,'ppi.stop(ambid)',12)
end
return
elseif settings["%1"].status==false then
settings["%1"].status=true
Note("%1 on")
if "%1"=="areamusic" then
if (FileExists(sdir.."/sounds/music/area/"..area..".ogg")==true) then
areaid=ppi.playLooped(sdir.."/sounds/music/area/"..area..".ogg")
ppi.setVol(5,areaid)
resetvol()
end
end
return
end
edit_option("%1")
end
</send>
 </alias>
 <alias
 match="lin *"
 enabled="y"
 sequence="100"
 >
 <send>look in %1 | prefix contcheck</send>
 </alias>
 <alias
 match="lin * *"
 enabled="y"
 sequence="100"
send_to="12"
 >
 <send>
Send("look in %1 | prefix contcheck | grep %2")
checkfor="%2"
</send>
 </alias>

</aliases>
<triggers>
 <trigger
 enabled="y"
 match="contcheck*"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
if container["%1"]~=nil then
container["%1"]=container["%1"]+1
else
container["%1"]=1
end 
</send>
</trigger>
 <trigger
 enabled="y"
 match="contcheckYou do not see that here."
 omit_from_output="y"
 send_to="14"
 sequence="99"
 >
 <send>
Note("There is no container with such name.")
</send>
</trigger>
 <trigger
 enabled="y"
 match="contcheck(*) * contains:"
 omit_from_output="y"
 send_to="14"
 sequence="1"
 >
 <send>
require "wait"
wait.make(function()
container={}
wait.time(1)
Note("%2 has in it:")
for i,v in pairs(container) do
if not (checkfor=="") then
 if string.match (i,checkfor) then
if v>1 then
Note(v.."("..i..")") end
if v==1 then Note(i) end
end
else
if v>1 then
Note(v.."("..i..")") end
if v==1 then Note(i) end
end
end
container={}
checkfor=""
end)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="kxwt_sky *"
 omit_from_output="y"
 omit_from_log="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="^kxwt_time (-{0,1}\d+) (\w+) (\w+)"
 regexp="y"
script="k_time"
 sequence="100"
omit_from_output="y"
 omit_from_log="y"
 >
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="kxwt_fighting -1"
 omit_from_output="y"
 omit_from_log="y"
 send_to="14"
 sequence="100"
 >
 <send>
if gs("areamusic")==true then
if ppi.isPlaying(areaid)==1 then
if gs("vol_areaid")~= nil then
ppi.slideVol(tonumber(gs("vol_areaid")),areaid)
else
ppi.slideVol(ppi.getVolume(),areaid)
end
else
if (FileExists(sdir.."/sounds/music/area/"..area..".ogg")==true) then
areaid=ppi.playLooped(sdir.."/sounds/music/area/"..area..".ogg")
else
areaid=ppi.playLooped(sdir.."/sounds/music/area/global.ogg")
end
resetvol()
end
end
if (gs("music") == true) then
ppi.fadeout(battleid)
battleplaying=0
end
fight = 0
nfight=0
fnames={}
fc=0
EnableGroup("combat",0)
prevfc=0
mvalarm=0
dmg=0
</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="^kxwt_prompt (-{0,1}\d+) (-{0,1}\d+) (-{0,1}\d+) (-{0,1}\d+) (-{0,1}\d+) (-{0,1}\d+)"
 script="k_prompt"
sequence="1"
regexp="y"
 send_to="14"
omit_from_output="y"
 omit_from_log="y"
 >
 </trigger>
 <trigger
 enabled="y"
 match="^kxwt_area (-{0,1}\d+) (.*)"
 script="k_area"
sequence="2"
regexp="y"
 send_to="14"
omit_from_output="y"
 omit_from_log="y"
 >
 </trigger>
 <trigger
 enabled="y"
script="k_killarea"
 match="^kxwt_area -1\s*"
sequence="1"
regexp="y"
omit_from_output="y"
 omit_from_log="y"
 >
 </trigger>
 <trigger
 enabled="y"
 match="^kxwt_exp (-{0,1}\d+)"
 script="k_exp"
sequence="1"
regexp="y"
 send_to="14"
omit_from_output="y"
 omit_from_log="y"
 >
 </trigger>
 <trigger
 enabled="y"
 match="^kxwt_terrain (-{0,1}\d+)"
 script="k_terrain"
sequence="1"
regexp="y"
 send_to="14"
omit_from_output="y"
 omit_from_log="y"
 >
 </trigger>
 <trigger
 enabled="y"
 match="^kxwt_gold (-{0,1}\d+)"
sequence="1"
regexp="y"
omit_from_output="y"
omit_from_log="y"
send_to="14"
 >
<send>
gold=tonumber("%1")
if prevgold>gold then
if goldlog==1 then
Note("Your gold decreased from "..prevgold.." to "..gold)
end
end
prevgold=gold
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You are already standing."
sequence="1"
omit_from_output="y"
omit_from_log="y"
send_to="14"
 >
<send>
pose="stand"
</send>
</trigger>
 <trigger
 enabled="y"
 match="kxwt_position *"
sequence="1"
omit_from_output="y"
omit_from_log="y"
send_to="14"
 >
<send>
if nfight==1 then return end
if "%1"=="sitting" then pose="rest" 
elseif "%1"=="sleeping" then pose="sleep" 
elseif "%1"=="standing" then pose="stand" 
else Note("%1") end
</send>
</trigger>

</triggers>
<triggers>
 <trigger
 enabled="y"
 match="tnlYour experience cap is * exp."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="tnpYour experience cap is * exp."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>

</triggers>
<triggers>
 <trigger
 enabled="y"
 match="tnlYou have * experience and * total levels in your top four classes."
omit_from_output="y"
 sequence="100"
 >
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
keep_evaluating="y"
 match="You don't learn much from this battle, but still receive * experience."
 send_to="12"
 sequence="1"
omit_from_output="y"
 >
 <send>Sound(GetInfo(67).."/sounds/notifications/exp thwack1.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
keep_evaluating="y"
match="You are too high level, but still receive * experience."
 send_to="12"
 sequence="1"

 >
 <send>Sound(GetInfo(67).."/sounds/notifications/exp thwack2.ogg")
Execute("ggc")
gclear()
</send>
 </trigger>
</triggers>
<aliases>
 <alias
 match="volup"
 enabled="y"
 send_to="12"
 sequence="100"
 >
 <send>volup()</send>
 </alias>
 <alias
 match="voldown"
 enabled="y"
 send_to="12"
 sequence="100"
 >
 <send>voldown()</send>
 </alias>
</aliases>
<aliases>
 <alias
 match="voltoggle"
 enabled="y"
 send_to="12"
 sequence="100"
 >
 <send>voltoggle(areaid,ambid)</send>
 </alias>
</aliases>
<aliases>

 <alias
 match="automaticmove"
 enabled="y"
 sequence="100"
send_to="12"
 >
 <send>
if autogo==1 then
autogo=0
Note("auto move off.")
end
autogo=1
Send("look")
</send>
 </alias>
</aliases>
<triggers>
 <trigger
 enabled="y"
 match="Alter Aeon has support for the blind and visually impaired."
 omit_from_output="n"
 send_to="14"
 sequence="100"
 >
 <send>newchar=1
ss("me","new")
Note("Creating a new character. Please say yes when the game asks you if you want to enable screen reader mode.")</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="\s*You receive an explorer point!"
 send_to="14"
regexp="y"
 sequence="100"
 >
 <send>Sound(GetInfo(67).."/sounds/notifications/ep.ogg")</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="The tooth splits, unfolds, and grows into A skeleton."
 omit_from_output="y"
send_to="12"
 script="ngag"
 sequence="100"
 >
 <send>Sound(GetInfo(67).."/sounds/necromancer/mage form.ogg")</send>
 </trigger>
</triggers>
<triggers>
  <trigger
   enabled="y"
   match="Your*teeth grow restless.  It would be unwise to collect any more."
   send_to="14"
   sequence="100"
  >
  <send>if autosac==true then
autosac=false
Send("sac corpse")
end</send>
  </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="You don't see any usable teeth *."
 send_to="14"
omit_from_output="y"
 sequence="100"
 >
 <send>
if autosac==true then
autosac=false
Send("sac corpse")
end
if teeth~=0 then
if gs("dteeth")==true then
Send("drop "..teeth.." teeth")
end
Note("You extract "..teeth.." teeth.")
end
if dteeth~=0 then
Note("You extract "..dteeth.." dragon teeth.")
end

teeth=0
dteeth=0
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You can't safely carry any more teeth, and stop."
 send_to="14"
omit_from_output="y"
 sequence="100"
 >
 <send>
if autosac==true then
autosac=false
Send("sac corpse")
end
if teeth~=0 then
if gs("dteeth")==true then
Send("drop "..teeth.." teeth")
end
Note("You extract "..teeth.." teeth.")
end
if dteeth~=0 then
Note("You extract "..dteeth.." dragon teeth.")
end

teeth=0
dteeth=0
</send>
 </trigger>

 <trigger
 enabled="y"
 match="^ccheck\&lt;(.*)\&gt;\s*(.*)$"
 omit_from_output="y"
 regexp="y"
 sequence="2"
send_to="14"
 >
<send>
eql[act[2]]={}
eql[act[2]].container=act[3]
eql[act[2]].mode=creatingmode
Send("remove "..act[3])
Execute("eqlt")
Note("set created.")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="ccheckYou insult *"
 omit_from_output="y"
 send_to="14"
 sequence="2"
 >
 <send>
eql[act[2]]={}
eql[act[2]].mode=creatingmode
eql[act[2]].container=act[3]
Execute("eqlt")
Note("set created.")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You insult *"
 send_to="14"
 sequence="2"
 >
 <send>cmi=0
SetClipboard(cmistr)
cmistr=""
</send>
 </trigger>

 <trigger
 enabled="y"
 match="ccheckWho or what do you want to insult?"
 omit_from_output="y"
 send_to="14"
 sequence="2"
 >
 <send>Note("Error - You don't have "..act[3].." in your inventory.")
for i,v in pairs(eql.setnames) do
if v==act[2] then
table.remove(eql.setnames,i)
end
end
creatingset=false
creating=false</send>
 </trigger>
 <trigger
 enabled="y"
 match="eqlcWho or what do you want to insult?"
 omit_from_output="y"
 send_to="14"
 sequence="2"
 >
 <send>if eql.creating then
eql.creating=false
Note("You can't make a set out of nothing!")
eql[act[2]]=nil
return
else
if eql.wearing then
moving=false
weareq(moving)
end
end
</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="^eqlc(\w+)\s*-\s*(.*?)\s*?(\w+)$"
 omit_from_output="y"
 regexp="y"
 script="eqltrig"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="^eqlc(about body)\s*-\s*(.*?)\s*?(\w+)$"
 omit_from_output="y"
 regexp="y"
 script="eqltrig"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="^eqlc(on body)\s*-\s*(.*?)\s*?(\w+)$"
 omit_from_output="y"
 regexp="y"
 script="eqltrig"
 sequence="100"
 >
 </trigger>

</triggers>

<triggers>
 <trigger
 enabled="y"
 match="(You can only split gold with players, not minions.)"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="\s*You receive a combat point!"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(GetInfo(67).."/sounds/notifications/get point.ogg")</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="With the last soulstone, A prepared * corpse is fully prepared."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.spells then Note("With the last soulstone, A prepared %1 corpse is fully prepared.") end
Sound(GetInfo(67).."/sounds/necromancer/prepare full.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You chant a spell to magically bind * to A prepared * corpse."
omit_from_output="y"
 sequence="100"
send_to="12"
 >
 <send>
--if not gag.spells then Note("You chant a spell to magically bind %1 to A prepared %2 corpse.") end
Sound(GetInfo(67).."/sounds/necromancer/prepare soul.ogg")</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="A ghoul goes berserk in battle!"
script="ngag"
 send_to="14"
 sequence="30"
 >
 <send>
Sound(GetInfo(67).."/sounds/undead talk/ghoul/"..math.random(1,ghoultalk)..".ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="A ghoul jumps to your side in battle!"
script="ngag"
 send_to="14"
 sequence="30"
 >
 <send>
Sound(GetInfo(67).."/sounds/undead talk/ghoul/"..math.random(1,ghoultalk)..".ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="A skeleton jumps to your side in battle!"
 send_to="14"
 sequence="30"
 >
 <send>
Sound(GetInfo(67).."/sounds/undead/skw-assist.ogg")
</send>
 </trigger>

</triggers>
<triggers>
 <trigger
 enabled="y"
 match="A ghoul rips and tears into * with filthy, diseased claws!"
script="ngag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.minions then Note("A ghoul rips and tears into %1 with filthy, diseased claws!")
end
Sound(GetInfo(67).."/sounds/undead/ghoulclaws.ogg")
Sound(GetInfo(67).."/sounds/undead talk/ghoul/"..math.random(1,ghoultalk)..".ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="A ghoul bites * with diseased, razor sharp teeth!"
script="ngag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.minions then Note("A ghoul bites %1 with diseased, razor sharp teeth!")
end
Sound(GetInfo(67).."/sounds/undead/ghoulbite.ogg")
Sound(GetInfo(67).."/sounds/undead talk/ghoul/"..math.random(1,ghoultalk)..".ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="A ghoul bites * with diseased, razor sharp teeth!"
script="ngag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.minions then Note("A ghoul bites %1 with diseased, razor sharp teeth!")
end
Sound(GetInfo(67).."/sounds/undead talk/ghoul/"..math.random(1,ghoultalk)..".ogg")
Sound(GetInfo(67).."/sounds/undead/ghoulbite.ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="A ghoul jumps at * clawing and biting!"
script="ngag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.minions then Note("A ghoul jumps at %1 clawing and biting!")
end
Sound(GetInfo(67).."/sounds/undead/ghoulclaws2.ogg")
Sound(GetInfo(67).."/sounds/undead talk/ghoul/"..math.random(1,ghoultalk)..".ogg")</send>
 </trigger>
</triggers>

<triggers>
 <trigger
 enabled="y"
 match="A skeletal mage throws a bolt of fire at *!"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.spells then Note("A skeletal mage throws a bolt of fire at %1!") end
Sound(GetInfo(67).."/sounds/necromancer/magefire/"..math.random(1,magefire)..".ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="A skeletal mage throws a bolt of ice at *!"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.spells then Note("A skeletal mage throws a bolt of ice at %1!") end
Sound(GetInfo(67).."/sounds/necromancer/mageice/"..math.random(1,mageice)..".ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="A skeletal mage throws a bolt of lightning at *!"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.spells then Note("A skeletal mage throws a bolt of lightning at %1!") end
Sound(GetInfo(67).."/sounds/necromancer/magezap/"..math.random(1,magezap)..".ogg")</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="You set up a crude summoning circle and place * on the ground inside it."
 send_to="14"
 sequence="100"
 >
 <send>Sound(GetInfo(67).."/sounds/necromancer/s-circle.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Your offer of * is accepted."
 send_to="14"
 sequence="100"
 >
 <send>minion=true
DoAfterSpecial(2,'Sound(GetInfo(67).."/sounds/necromancer/accept offer.ogg")',12)</send>
 </trigger>
 <trigger
 enabled="y"
 match="An energetic green demon appears out of a flash of green light in the middle of the circle."
 send_to="14"
 sequence="100"
 >
 <send>minion=true
DoAfterSpecial(1,'Sound(GetInfo(67).."/sounds/necromancer/green demon.ogg")',12)</send>
 </trigger>

</triggers>
<triggers>
 <trigger
 enabled="y"
 match="* is near death!"
 send_to="14"
 sequence="100"
 >
 <send>
if gs("soulsteal")==true then
if kspells["soulsteal"]==1 then
stealnext=true
end
end
Sound(GetInfo(67).."/sounds/necromancer/near death.ogg")</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="You throw a ball of freezing unfire at *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.spells then Note("You throw a ball of freezing unfire at %1") end
yspell("coldfire")</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="A clay man forms from nearby dirt and clay to serve you."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.minions then Note("A clay man forms from nearby dirt and clay to serve you.") end
minion=true
noreclay=true
Sound(GetInfo(67).."/sounds/necromancer/clay man.ogg")</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 lines_to_match="2"
 match="^(.*) panics and attempts to flee!\n(.*) leaves (\w+).$"
 multi_line="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>if (grouped==1) and (Pose~="stand") then
PSend("stand")
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="Enter your message. Type *"
 send_to="14"
 sequence="100"
 >
 <send>afk=1</send>
 </trigger>
 <trigger
 enabled="y"
 match="kxwt_context *"
omit_from_output="y"
 send_to="14"
 sequence="99"
 >
 <send>afk=1
editing=1
</send>
 </trigger>
 <trigger
 enabled="y"
 match="kxwt_context none"
omit_from_output="y"
 send_to="14"
 sequence="98"
 >
 <send>afk=0
editing=0
</send>
 </trigger>

 <trigger
 enabled="y"
 match="The crystals in the air ring loudly as they are disturbed!"
 send_to="14"
 sequence="100"
 >
 <send>if pose~="stand" then
Send("stand")
end
Sound(GetInfo(67).."/sounds/spells/chimes.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Your hands take on a sickly green tint."
script="sgag"
omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(GetInfo(67).."/sounds/spells/sickening touch.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You lightly touch * hands, and they take on a sickly green tint."
script="sgag"
omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(GetInfo(67).."/sounds/spells/sickening touch.ogg")</send>
 </trigger>

</triggers>
<triggers>
 <trigger
 enabled="y"
 match="You cast the spell to separate soul from body, and pull * essence into a * soulstone!"
 send_to="14"
omit_from_output="y"
 sequence="100"
 >
 <send>if not gag.spells then Note("You cast the spell to separate soul from body, and pull %1 essence into a %2 soulstone!")
else
Note("You obtain %1 %2 soulstone!")
end
soulstone=true
if gs("container")~=nil then
Send("put soulstone "..gs("container"))
end
Sound(sdir.."/sounds/spells/soulsteal/"..math.random(1,rsoul)..".ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You struggle to pull * essence into a * soulstone!"
 send_to="14"
omit_from_output="n"
 sequence="100"
 >
 <send>
soulstone=true
Send("put soulstone "..gs("container"))
Sound(sdir.."/sounds/necromancer/soul struggle.ogg")
</send>
 </trigger>

</triggers>

<triggers>
 <trigger
 enabled="y"
 match="You down a small potion, cast the spell, and quickly lie down before it takes effect."
 send_to="14"
 sequence="100"
 >
 <send>Sound(GetInfo(67).."/sounds/spells/deathly sleep on.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You feel the deathly sleep leave your veins and begin sleeping normaly."
 send_to="14"
 sequence="100"
 >
 <send>Sound(GetInfo(67).."/sounds/spells/deathly sleep off.ogg")</send>
 </trigger>

 <trigger
 enabled="y"
 match="You feel your soul leaving your body..."
 send_to="14"
 sequence="100"
 >
 <send>Sound(GetInfo(67).."/sounds/spells/free spirit.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You quickly return to your body."
 send_to="14"
 sequence="98"
 >
 <send>Sound(GetInfo(67).."/sounds/spells/free return.ogg")
editing=0
afk=0
</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="You aren't currently in a group."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>grouped=0</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="Your friends * are logged in."
 omit_from_output="y"
 send_to="14"
script="friends"
 sequence="100"
 >
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="(friend) * was killed by *!"
 send_to="14"
 sequence="1"
 >
 <send>Sound(sdir.."/sounds/notifications/friend dies.ogg")
Execute("history_add all=(friend) %1 died to %2!")
Execute("history_add friends=(friend) %1 died to %2!")
</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="(notify) (player) The Lag Monster killed by Thantos the Executioner while in room [ 0] The Unholy Temple of Dentin"
 sequence="1"
 >
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="Title: mush-z *"
 omit_from_output="y"
 send_to="14"
 sequence="1"
 >
 <send>
newver="%1"
if gs("version")~=GetVariable("version") then
ss("version",GetVariable("version"))
end
if(newver==GetVariable("version")) then
Note("You are using the latest version of mush-z.")
else
utils.msgbox("It might be time to update! Your version doesn't match the version on the server. The server says "..newver..". Your current version is "..GetVariable("version")..".","Update time!")
--utils.msgbox("There's a new update for MUSH-Z!"..newver..". Your current version is "..GetVariable("version")..". To get the most up to date version, use the updater.","Wait a sec there buddy")
end
</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="tnl"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="^tnl You can train to get a practice, at a cost of (\d+) experience each."
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>tnl_prac=%1
</send>
 </trigger>
 <trigger
 enabled="y"
match="tnlClass Current Cost to level Percent"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="^tnlCleric\s*-{0,1}\d+.*\((.*)%\)"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>tnl_cleric=tonumber(removespaces("%1"))</send>
 </trigger>
 <trigger
 enabled="y"
 match="^tnlMage\s*-{0,1}\d+.*\((.*)%\)"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>
tnl_mage=tonumber(removespaces("%1"))</send>
 </trigger>
 <trigger
 enabled="y"
 match="^tnlNecromancer\s*-{0,1}\d+.*\((.*)%\)"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>tnl_necro=tonumber(removespaces("%1"))
tnl_exp=exp
arr_max={}
 if(tnl_prac==nil) then
tnl_prac=2000000
end
str=""
if tnl_mage&lt;100 then str=str.."m "..tnl_mage.." " end
if tnl_cleric&lt;100 then str=str.."c "..tnl_cleric.." " end
if tnl_thief&lt;100 then str=str.."t "..tnl_thief.." " end
if tnl_warrior&lt;100 then str=str.."w "..tnl_warrior.." " end
if tnl_necro&lt;100 then str=str.."n "..tnl_necro.." " end
if ((tnl_exp/tnl_prac*100)&lt;100) then
prac="prac "..(tnl_exp/tnl_prac*100) 
str=str..prac
end
Note(str)
</send>
 </trigger>

 <trigger
 enabled="y"
 match="^tnlThief\s*-{0,1}\d+.*\((.*)%\)"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>
tnl_thief=tonumber(removespaces("%1"))</send>
 </trigger>
 <trigger
 enabled="y"
 match="^tnlWarrior\s*-{0,1}\d+.*\((.*)%\)"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>
tnl_warrior=tonumber(removespaces("%1"))</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="rgs"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
</triggers>

<triggers>
 <trigger
 enabled="y"
 match="rgsEvent based regen is currently OFF."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>eventregen=0</send>
 </trigger>
 <trigger
 enabled="y"
 match="rgsEvent based regen is currently ON."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>eventregen=1</send>
 </trigger>
 <trigger
 enabled="y"
 match="rgsTo change it, use 'set regen on' or 'set regen off'."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="rgsYou may only do this once per login."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="scrYou will no longer see tick markers."
 omit_from_output="y"
 sequence="100"
 >
 <send>autotick | prefix scr</send>
 </trigger>
 <trigger
 enabled="y"
 match="WARNING - Your storage locker expires in *"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="You don't see anything named that in the corpse of *"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
</triggers>
<triggers>
<trigger 
match="Type: WEAPON   Composition: *"
script="idnote"
 enabled="y"
 omit_from_output="y"
 send_to="14"
 sequence="100"
>
 <send>
if gs("shortid")==1 then return end
iacapply=nil
Note("a %1 weapon.")
</send>
</trigger>
<trigger 
match="Type: * Composition: * Defense: * ac-apply"
script="idnote"
 enabled="y"
 omit_from_output="y"
 send_to="14"
 sequence="100"
>
 <send>
if gs("shortid")==1 then return end
if "%1"~="weapon" then
iacapply="%3"
Note ("a %1 made of %2")
else
iacapply=nil
Note("This item is a %2 weapon.")
end
</send>
</trigger>
 <trigger
 enabled="y"
 match="Type: WEAPON * Composition: * Requires * strength to wield."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Note("This weapon needs %3 strength to wield.")
</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="^\*TICK\*"
 omit_from_output="y"
regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>
if(afk==0) then
PSend("aff | grep Spell | grep minutes | prefix spfl")
end
if(gs("ticksounds")==true) then
Sound(sdir.."/sounds/notifications/tick.ogg")
DoAfterSpecial(25,'Sound(sdir.."/sounds/notifications/tick5.ogg")',12)
end
</send>
 </trigger>

</triggers>
<triggers>
 <trigger
 enabled="y"
 match="Weapon speed: *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Note("speed %1")
</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="You link hands with * to the right."
omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.spells then Note("You link hands with %1 to the right.") end
ppi.play(sdir.."/sounds/spells/gcast/link2.ogg",0,50)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You link hands with * to the left."
omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.spells then Note("You link hands with %1 to the left.") end
ppi.play(sdir.."/sounds/spells/gcast/link1.ogg",0,-50)
</send>
 </trigger>
<trigger
 match="* lead* the group in the casting of a spell..."
omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.spells then Note("%1 lead%2 the group in the casting of a spell...") end
DoAfterSpecial(0.4,'Sound(sdir.."/sounds/spells/gcast/circle.ogg")',12)
</send>
 </trigger>
<trigger
 match="You feel power coursing through your body as the spell is cast."
omit_from_output="y"
enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.spells then Note("You feel power coursing through your body as the spell is cast.") end
DoAfterSpecial(1.3,'Sound(sdir.."/sounds/spells/gcast/energy.ogg")',12)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="Someone suddenly stabs you in the back!"
 sequence="1"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You are affected by:"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="scrClosed doors will no longer be automatically displayed."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>PSend("autodoor")
Note("Configuring autodoor.")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You are affected by:"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
</triggers>

<triggers>
 <trigger
 enabled="y"
 match="^You try to .* (\w?)'s .* injuries."
regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>
PSend("condition %2")
</send>
 </trigger>

 <trigger
 enabled="y"
 match="You suddenly feel less tired and more refreshed!"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.spells then Note("You suddenly feel less tired and more refreshed!") end
play("skills/secondwind",0)</send>
 </trigger>
 <trigger
 enabled="y"
 match="The physical reserve deep within you feels replenished."
 send_to="14"
 sequence="100"
 >
 <send>play("skills/secondwind charge",0)</send>
 </trigger>
 <trigger
 enabled="y"
 match="Your body is still too exhausted from last time."
 send_to="14"
 sequence="100"
 >
 <send>play("skills/secondwind fail",0)</send>
 </trigger>

 <trigger
 enabled="y"
 match="You try to push beyond the boundries of your endurance, but nothing happens!"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.spells then Note("You try to push beyond the boundries of your endurance, but nothing happens!") end
play("skills/secondwind fail",0)</send>
 </trigger>
</triggers>

<triggers>
 <trigger
 enabled="y"
 match="You do not seem to be carrying anything named '$held'."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 group="show"
 match="^You need (-{0,1}\d+) experience to .* (\w+) to (.*) and have (-{0,1}\d+) experience\. \(.*\)"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>exptnl=tonumber("%1")
classtnl="%2"
Note("Next class you should level is "..classtnl.." for "..exptnl)
levtnl="%3"
EnableGroup("show",0)</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="[new line]"
 send_to="14"
 sequence="100"
 >
<send>
afk=1
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You are now AFK."
 send_to="14"
 sequence="100"
 >
 <send>afk=1
Note("timers disabled.")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Subject:"
 send_to="14"
 sequence="100"
 >
 <send>afk=1
</send>
 </trigger>
 <trigger
 enabled="y"
 match="Enter message one line at a time. '/help' for help."
 send_to="14"
 sequence="100"
 >
 <send>afk=1
</send>
 </trigger>
 <trigger
 enabled="y"
 match="Message written."
 send_to="14"
 sequence="100"
 >
 <send>afk=0
</send>
 </trigger>
 <trigger
 enabled="y"
 match="Whatever you were writing on, its gone now!"
 send_to="14"
 sequence="100"
 >
 <send>afk=0
</send>
 </trigger>
 <trigger
 enabled="y"
 match="Who is this note addressed to?"
 send_to="14"
 sequence="100"
 >
 <send>afk=1
</send>
 </trigger>
 <trigger
 enabled="y"
 match="Message posted."
 send_to="14"
 sequence="100"
 >
 <send>afk=0
</send>
 </trigger>
 <trigger
 enabled="y"
 match="What is the short title or subject of your note?"
 send_to="14"
 sequence="100"
 >
 <send>afk=1
</send>
 </trigger>

 <trigger
 enabled="y"
 match="You return to your keyboard."
 send_to="14"
 sequence="100"
 >
 <send>afk=0</send>
 </trigger>

</triggers>
<triggers>
 <trigger
 enabled="y"
 match="* stops resting, and stands up."
 sequence="99"
 >
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="spflSpell '*', * minutes remainin*"
 omit_from_output="y"
 omit_from_log="y"
 send_to="14"
 sequence="99"
 >
 <send>spell="%1"
mins=tonumber("%2")
if (mins==nil) then
return
end
if (mins&lt;21) then
if (mins==20) then
if (warned3[spell]~=1) then
Note("Warning - "..spell.." will fall in 3.")
warned3[spell]=1
DoAfterSpecial(45,"warned3[spell]=0",12)
warned2[spell]=0
warned1[spell]=0
end
elseif (mins==10) then
if (warned2[spell]~=1) then
Note("Warning - "..spell.." will fall in 2.")
warned2[spell]=1
warned1[spell]=0
DoAfterSpecial(45,"warned2[spell]=0",12)
end
elseif (mins==0) then
if (warned1[spell]~=1) then
warned1[spell]=1
Note("Warning - "..spell.." is about to fall.")
if (grouped==1) and (gs("swarn")==true) then
PSend("sub "..spell.." in 1.")
end

warned3[spell]=0
warned2[spell]=0
DoAfterSpecial(45,"warned1[spell]=0",12)
end
end
end</send>
 </trigger>
 <trigger
 enabled="y"
 match="Class Current Cost to level Percent"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="spfl*"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="You barely remember anything about that spell, but attempt to cast it anyway."
 send_to="14"
 sequence="100"
 >
 <send>casting=""</send>
 </trigger>
</triggers>

<triggers>
 <trigger
 enabled="y"
 match="statWeapon: *, damage type *"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="stat*|*Dex: */* | Zap: *|*"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>s_dex=tonumber("%3")
s_sz="%5"
if (s_dex~=s_prevdex) then
if (jli==0) then
if (gs("autostat")==true) then
Note("Your dex is now "..s_dex)
end
end
s_prevdex=s_dex
end
if (s_sz~=s_prevsz) then
if (jli==0) then
if (gs("autostat")==true) then

Note("Your zap save is now "..s_sz)
end
end
s_prevsz=s_sz
end</send>
 </trigger>
 <trigger
 enabled="y"
 match="stat-------------------+--------------+--------------+-----------------------"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="stat-------------------+--------------+--------------+-----------------------"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="statArmor: *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>s_ac="%1"
if (s_ac~=s_prevac) then
if (jli==0) then
if (gs("autostat")==true) then

Note("Armor: "..s_ac)
end
end
s_prevac=s_ac
end</send>
 </trigger>
 <trigger
 enabled="y"
 match="statCler: * | Chr: */* | Poison: * | *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>s_chr=tonumber("%2")
s_sp="%4"
if (s_chr~=s_prevchr) then
if (jli==0) then
if (gs("autostat")==true) then

Note("Your chr is now "..s_chr)
end
end
s_prevchr=s_chr
end
if (s_sp~=s_prevsp) then
if (jli==0) then
if (gs("autostat")==true) then
Note("Your poison save is now "..s_sp)
end
end
s_prevsp=s_sp
end</send>
 </trigger>
 <trigger
 enabled="y"
 match="^statHit Bonus:\s*(-{0,1}\d+)\s*Damage\/Time\:\s*(-{0,1}\d+)"
regexp="y"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
s_hit=tonumber("%1")
if (s_hit~=s_prevhit) then
if (jli==0) then
if (gs("autostat")==true) then

Note("Your hitroll is now "..s_hit)
end
end
s_prevhit=s_hit
end
s_dam=tonumber("%2")
if (s_dam~=s_prevdam) then
if (jli==0) then
if (gs("autostat")==true) then

Note("Your damage is now "..s_dam)
end
end
s_prevdam=s_dam
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="statHit Roll: * Attack speed: *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>s_hit="%1"
if (s_hit~=s_prevhit) then
if (jli==0) then
if (gs("autostat")==true) then

Note("your hitroll is now"..s_hit)
end
end
s_prevhit=s_hit
end
s_speed="%2"
if (s_speed~=s_prevspeed) then
if (jli==0) then
if (gs("autostat")==true) then

Note("your speed is now "..s_speed)
end
end
s_prevspeed=s_speed
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="statHp: */* | Str: */* | Spells: * | Experience: *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>s_str=tonumber("%3")
s_ss="%5"
if (s_str~=s_prevstr) then
if (jli==0) then
if (gs("autostat")==true) then

Note("Your strength is now "..s_str)
end
end
s_prevstr=s_str
end
if (s_ss~=s_prevss) then
if (jli==0) then
if (gs("autostat")==true) then

Note("Your spell save is now "..s_ss)
end
end
s_prevss=s_ss
end</send>
 </trigger>
 <trigger
 enabled="y"
 match="statMage: * | Con: */* | Breath: * | Age: *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>s_con=tonumber("%2")
s_sb="%4"
if (s_con~=s_prevcon) then
if (jli==0) then
if (gs("autostat")==true) then

Note("Your con is now "..s_con)
end
end
s_prevcon=s_con
end
if (s_sb~=s_prevsb) then
if (jli==0) then
if (gs("autostat")==true) then

Note("Your breath save is now "..s_sb)
end
end
s_prevsb=s_sb
end</send>
 </trigger>
 <trigger
 enabled="y"
 match="statMana: */* | Int: */* | Fire: * | Gold: *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>s_int=tonumber("%3")
s_sf="%5"
if (s_int~=s_prevint) then
if (jli==0) then
if (gs("autostat")==true) then

Note("Your intelligence is now "..s_int)
end
end
s_prevint=s_int
end
if (s_sf~=s_prevsf) then
if (jli==0) then
if (gs("autostat")==true) then

Note("Your fire save is now "..s_sf)
end
end
s_prevsf=s_sf
end</send>
 </trigger>
 <trigger
 enabled="y"
 match="statMove: */* | Wis: */* | Cold: * | Practices: *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>s_wis=tonumber("%3")
s_sc="%5"
if (s_wis~=s_prevwis) then
if (jli==0) then
if (gs("autostat")==true) then

Note("Your wisdom is now "..s_wis)
end
end
s_prevwis=s_wis
end
if (s_sc~=s_prevsc) then
if (jli==0) then
if (gs("autostat")==true) then

Note("Your cold save is now "..s_sc)
end
end
s_prevsc=s_sc
end</send>
 </trigger>
 <trigger
 enabled="y"
 match="statThie: * |*| Normal: * | Weight: *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>s_sn="%3"
if (s_sn~=s_prevsn) then
if (jli==0) then
if (gs("autostat")==true) then

Note("Your physical save is now "..s_sn)
end
end
s_prevsn=s_sn
end</send>
 </trigger>
 <trigger
 enabled="y"
 match="statWarr: * |*| Magic: * | Encumbrance: *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>s_sm="%3"
s_enc="%4"
if (s_sm~=s_prevsm) then
if (jli==0) then
if (gs("autostat")==true) then

Note("Your magic res is now "..s_sm)
end
end
s_prevsm=s_sm
end
if (s_enc~=s_prevenc) then
if (jli==0) then
if (gs("autostat")==true) then

Note("Your encumbrance is now "..s_enc)
end
end
s_prevenc=s_enc
end</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="* tries to disarm *."
 omit_from_output="y"
 sequence="100"
script="t_disarm"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You fail the rescue!"
 omit_from_output="y"
 sequence="100"
send_to="14"
 >
<send>
counters.frescue=counters.frescue+1
PSend("rescue "..res)
Sound(sdir.."/sounds/grouping/fail res.ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* rushes to aid *!"

 sequence="100"
send_to="14"
 >
<send>
Sound(sdir.."/sounds/combat/special/male/"..math.random(1,mspecial)..".ogg")
bfight("%2")
</send>
 </trigger>

 <trigger
 enabled="y"
 match="You heroically rescue *!"
 omit_from_output="y"
 sequence="100"
send_to="14"
 >
<send>if not gag.combat then Note("You heroically rescue %1!") end
Sound(sdir.."/sounds/grouping/rescue.ogg")
counters.rescue=counters.rescue+1
</send>
 </trigger>

 <trigger
 enabled="y"
 match="That character may not be disturbed from that place."
 send_to="12"
 sequence="100"
 >
 <send>if (grouped==1) then
end</send>
 </trigger>
 <trigger
 enabled="y"
 match="That player does not wish to be summoned."
 send_to="12"
 sequence="100"
 >
 <send>if (grouped==1) then
PSend("gt nosum.")
end</send>
 </trigger>
 <trigger
 enabled="y"
 match="tnpYou have * of the experience you need to level your cheapest class."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="* gestures towards you."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/dispel you.ogg")
</send>
</trigger>
 <trigger
 enabled="y"
 match="You feel the threads of magic about you begin to unravel."
 send_to="14"
omit_from_output="y"
 sequence="100"
 >
 <send>if not gag.spells then Note("You feel the threads of magic about you begin to unravel.") end
Sound(sdir.."/sounds/spells/dispel yourself.ogg")
</send>
</trigger>

 <trigger
 enabled="y"
 match="You gesture towards *."
 omit_from_output="y"
 send_to="14"
script="sgag"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/spells/dispel other.ogg")
if (dispelling==1) then
PSend("c dispel "..dtarget)
dispelled="%1"
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="The magic holding * together weakens."
 omit_from_output="y"
 send_to="14"
script="sgag"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/spells/dispel weaken.ogg")
</send>
 </trigger>

</triggers>
<triggers>
 <trigger
 enabled="y"
 match="^knw\s*(.+?)\s*(very bad|very good|bad|poor|fair|average|good|moderate|perfect|exceptional)\s*"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="99"
 >
 <send>
sk="%1"
sk=string.gsub(sk, " ", "", 50)
kskills[sk]=1
</send>
 </trigger>
 <trigger
 enabled="y"
 match="^know*"
 omit_from_output="y"
 sequence="1"
keep_evaluating="y"
 >
 </trigger>
 <trigger
 enabled="y"
 match="knw*"
 omit_from_output="y"
keep_evaluating="y"
 sequence="1"
 >
 </trigger>
 <trigger
 enabled="y"
match="^know\s*(.+?)\s*(very bad|very good|bad|poor|fair|average|good|moderate|perfect|exceptional)"
omit_from_output="y"
 regexp="y"
 send_to="14"
keep_evaluating="y"
 sequence="1"
 >
 <send>
sp="%1"
sp=string.gsub(sp, " ", "", 50)
kspells[sp]=1
--print("you know "..sp)
</send>
 </trigger>
</triggers>

<triggers>

 <trigger
 enabled="y"
 match="knowYou know the following spells:"
 omit_from_output="y"
 send_to="14"
 sequence="99"
 >
 <send>require "wait"
wait.make(function()
wait.time(2)
if (kspells["curelightwounds"]==1) then
spells["heal"]="cure light"
end
if (kspells["cureseriouswounds"]==1) then
spells["heal"]="cure serious"
end
if (kspells["curecriticalwounds"]==1) then
spells["heal"]="cure critical"
end
if (kspells["heal"]==1) then
spells["heal"]="heal"
end
end)
</send>
 </trigger>
</triggers>

<triggers>
 <trigger
 enabled="y"
 match="*'s displaced image abruptly rejoins * body."
 send_to="12"
 sequence="100"
 >
 <send>
spellfall("displace", "%1")</send>
 </trigger>
 <trigger
 enabled="y"
 match="*'s skin fades from grey stone to normal color."
 send_to="14"
 sequence="100"
 >
 <send>if (kspells["stoneskin"]==1) then
spellfall("stoneskin", "%1")
end</send>
 </trigger>

</triggers>
<triggers>
 <trigger
 enabled="y"
regexp="y"
 ignore_case="y"
 match="^setway(\s*)(-{0,1}\d+)\s*(->|-)\s*(.*)"
 omit_from_output="y"
script="wayadd"
 sequence="99"
 >
 <send>
</send>
 </trigger>
 <trigger
 enabled="y"
regexp="y"
 ignore_case="y"
 match="^setway(->\s*)(-{0,1}\d+)\s*(->|-)\s*(.*)"
 omit_from_output="y"
script="wayadd"
 sequence="99"
 >
 <send>
</send>
 </trigger>

 <trigger
 enabled="y"
 keep_evaluating="y"
 match="setway*"
 omit_from_output="y"
 sequence="100"
send_to="12"
 >
<send>
EnableGroup("ways", 1)</send>
 </trigger>
</triggers>
<triggers>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="lvlYou have * of the experience you need to level your cheapest class."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
</triggers>

<triggers>
 <trigger
 enabled="y"
 match="* beckons for you to follow."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/grouping/beckon.ogg")
if (gs("autofollow") == false) then
return
else
PSend("follow %1")
end
</send>
 </trigger>

 <trigger
 enabled="y"
 match="You do not seem to be wearing anything named '$held'."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="You * into your hiding spot."
 omit_from_output="y"
 send_to="12"
 sequence="100"
 >
 <send>if not gag.misc then Note("You * into your hiding spot.") end
Sound(sdir.."/sounds/skills/hide1.ogg")
Note("You %1.")</send>
 </trigger>
 <trigger
 enabled="y"
regexp="y"
 match="^You follow (.*) (\w+)."
group="group"
 omit_from_output="y"
 script="follow"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You throw your own personal rainbow at *, who is momentarily blinded and awestruck by its beauty."
 omit_from_output="y"
 send_to="12"
 sequence="100"
 >
 <send>if not gag.spells then Note("You throw your own personal rainbow at %1, who is momentarily blinded and awestruck by its beauty.") end
Sound(sdir.."/sounds/spells/colorspray.ogg")
Sound(sdir.."/sounds/spells/shower of sparks.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You create a * potion of * from *"
 send_to="12"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/brewing/bottle.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You fumble and ruin the potion."
 send_to="12"
 sequence="100"
 >
 <send>
require "wait"
wait.make(function()
Sound(sdir.."/sounds/brewing/fumble.ogg")
wait.time(0.6)
Sound(sdir.."/sounds/brewing/nasty mess.ogg")
end)
</send>
 </trigger>

 <trigger
 enabled="y"
 match="You try to move stealthily, but fail!"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.misc then Note("You try to move stealthily, but fail!") end
Sound(sdir.."/sounds/skills/fail stealth.ogg")
</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="mzc*"
 omit_from_output="y"
 sequence="1"
 >
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 group="group"
 match="* tells the group, 'stand'"
 send_to="14"
 sequence="1"
 >
<send>
if (leader~="%1") then
return
end
if (pose~="stand") then
PSend("stand")
prevpose=pose
end
</send>
 </trigger>
 <trigger
 enabled="y"
 group="group"
 match="* tells the group, 'sleep'"
 send_to="14"
 sequence="1"
 >
<send>
if (leader~="%1") then
return
end

if (pose~="sleep") then
PSend("sleep")
end
</send>
 </trigger>
 <trigger
 enabled="y"
 group="group"
 match="* tells the group, 'regen'"
 send_to="14"
 sequence="1"
 >
<send>
if (leader~="%1") then
return
end

if (pose~="sleep") then
PSend("sleep")
end
</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="* appears in the middle of the room."
 sequence="100"
send_to="14"
 >
 <send>Sound(sdir.."/sounds/movement/glow-appear.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* vanishes into a flickering red glow."
 sequence="100"
send_to="14"
 >
 <send>Sound(sdir.."/sounds/movement/glow vanish.ogg")</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 group="group"
 match="You will now try to protect * in battle."
send_to="14"
 sequence="1"
 >
<send>
PSend("sub I will now try to protect %1 in battle.")
</send>
</trigger>
 <trigger
 enabled="y"
 group="group"
 match="* tells the group, '!wake'"
send_to="14"
 sequence="1"
 >
 <send>
if (leader~="%1") then
return
end
Send("wake")
</send>
 </trigger>
 <trigger
 enabled="y"
 group="group"
 match="* tells the group, 'enter *'"
send_to="14"
 sequence="1"
 >
 <send>
if (gs("automove")==true) then
if ("%1"==leader) then
Send("enter %2")
end
end
</send>
 </trigger>
 <trigger
 enabled="y"
 group="group"
 match="* tells the group, 'look *'"
send_to="14"
 sequence="1"
 >
 <send>
if (gs("automove")==true) then
if ("%1"==leader) then
Send("look at %2")
end
end
</send>
 </trigger>

 <trigger
 enabled="y"
send_to="14"
 match="* begins * climb *ward*"
 sequence="1"
 >
 <send>
if (gs("automove")==true) then
if ("%1"==leader) then
Send("climb %3")
end
end
</send>
 </trigger>

 <trigger
 enabled="y"
 group="group"
 match="* tells the group, 'zerk'"
 send_to="14"
 sequence="1"
 >
 <send>if (job=="hitter") then
PSend("berserk")
end
</send>
 </trigger>
 <trigger
 enabled="y"
 group="group"
 match="* tells the group, 'flee'"
 send_to="14"
 sequence="1"
 >
 <send>
if (leader~="%1") then
return
end
PSend("run")
</send>
 </trigger>

</triggers>
<triggers>
 <trigger
 enabled="y"
 match="* goes to sleep."
send_to="14"
 sequence="100"
 >
 <send>
if (gs("autosleep")==true) then
if (grouped==1) then
string="%1"
if (leader~="%1") then
return
end --if not leader
if(pose~="sleep") then
PSend("sleep")
end --pose
end --group
end --auto sleep
</send>
 </trigger>
</triggers>
<triggers>
 <trigger
enabled="y"
 match="* tells you, '!playsound *'"
 omit_from_output="y"
group="telltriggers"
 send_to="14"
 sequence="1"
 >
<send>if (FileExists(sdir.."/sounds/%2.ogg")==true) then
Sound(sdir.."/sounds/%2.ogg")
PSend("tell %1 playing | prefix mzc")
else
PSend("tell %1 file not found! | prefix mzc")
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* tells you, '!setjob *'"
 omit_from_output="y"
 send_to="14"
 sequence="1"
 >
 <send>job="%1"</send>
 </trigger>

</triggers>
<triggers>
 <trigger

 match="^(\w+) tells you, '!show *'"
group="telltriggers"
enabled="y"
regexp="y"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Note("%2")</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="You are not yet advanced enough in your training."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
if (grouped==0) then
Note("You are not yet advanced enough in your training.")
return
else
if (spells["heal"]==nil) then
else
PSend("c "..spells["heal"].." "..gname)
casting=spells["heal"].." %2"
end
end</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="* has left the group."
 send_to="14"
 sequence="100"
 >
 <send>
string="%1"
for i, remove in pairs (group) do
 if string.match (remove, string) then
table.remove(group, i)
end
end
Sound(sdir.."/sounds/grouping/leave group.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* has been kicked out of the group!"
 send_to="14"
 sequence="100"
 >
 <send>
string="%1"
for i, remove in pairs (group) do
 if string.match (remove, string) then
table.remove(group, i)
end
end
Sound(sdir.."/sounds/grouping/leave group.ogg")</send>
 </trigger>

</triggers>
<triggers>
 <trigger
 enabled="y"
 match="(you can set this channel with the 'friend on' and 'friend off' commands)"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
match="^heal\[(.*?)\s*Lvl\s*(-{0,1}\d+).*hp\s*(-{0,1}\d+)\/(-{0,1}\d+)\s*mn\s*(-{0,1}\d+)\/(-{0,1}\d+)\s*mv\s*(-{0,1}\d+)\/(-{0,1}\d+) .*$"
 omit_from_output="y"
script="healer"
 regexp="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
match="^heal(.*?)\s*Lvl\s*(-{0,1}\d+).*hp\s*(-{0,1}\d+)\/(-{0,1}\d+)\s*mn\s*(-{0,1}\d+)\/(-{0,1}\d+)\s*mv\s*(-{0,1}\d+)\/(-{0,1}\d+) .*$"
 omit_from_output="y"
 regexp="y"
 sequence="101"
 >
 </trigger>

 <trigger
 enabled="y"
 match="^grm\[(.*?)\s*Lvl\s*(-{0,1}\d+)\s*(.*)\s*hp\s*(-{0,1}\d+)\/(-{0,1}\d+)\s*mn\s*(-{0,1}\d+)\/(-{0,1}\d+)\s*mv\s*(-{0,1}\d+)\/(-{0,1}\d+)\s*(.*)"
 omit_from_output="y"
 regexp="y"
script="leadercheck"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(group, "%1")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="^grm(.*?)\s*Lvl\s*(-{0,1}\d+)\s*(.*)\s*hp\s*(-{0,1}\d+)\/(-{0,1}\d+)\s*mn\s*(-{0,1}\d+)\/(-{0,1}\d+)\s*mv\s*(-{0,1}\d+)\/(-{0,1}\d+)\s*(.*)"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="101"
script="leadercheck"
 >
 <send>table.insert(group, "%1")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You sense the death of your comrade *!"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(group, "%1")
Sound(sdir.."/sounds/grouping/sense death.ogg")
Execute("history_add all=You sense the death of %1!")
Execute("history_add group=You sense the death of %1!")
</send>
 </trigger>

 <trigger
 enabled="y"
 match="* is now a member of the group."
 send_to="14"
 sequence="100"
 >
 <send>table.insert(group, "%1")
Sound(sdir.."/sounds/grouping/new member.ogg")
Execute("history_add group=%1 is now a member of the group.")
Execute("history_add all=%1 is now a member of the group.")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="The group is now open to new members."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/grouping/open.ogg")
Execute("history_add group=the group is now open to members")
Execute("history_add all=the group is now open to members")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* has summoned you into * group!"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/grouping/groupsum.ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="The group is now closed/noshow to new members."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/grouping/noshow.ogg")
Execute("history_add group=the group is now closed to members")
Execute("history_add all=the group is now closed to members")
</send>
 </trigger>

 <trigger
 enabled="y"
 match="^groupm\[(.*?)\s*Lvl\s*(-{0,1}\d+)\s*(.*)\s*hp\s*(-{0,1}\d+)\/(-{0,1}\d+)\s*mn\s*(-{0,1}\d+)\/(-{0,1}\d+)\s*mv\s*(-{0,1}\d+)\/(-{0,1}\d+)\s*(.*)"
 omit_from_output="y"
 regexp="y"
script="monitor"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="^groupm(.*?)\s*Lvl\s*(-{0,1}\d+)\s*(.*)\s*hp\s*(-{0,1}\d+)\/(-{0,1}\d+)\s*mn\s*(-{0,1}\d+)\/(-{0,1}\d+)\s*mv\s*(-{0,1}\d+)\/(-{0,1}\d+)\s*(.*)"
 omit_from_output="y"
 regexp="y"
script="monitor"
 sequence="101"
 >
 </trigger>
 <trigger
 enabled="y"
 match="grmMembers of your group:"
 omit_from_output="y"
 sequence="100"
 >
</trigger>
 <trigger
 enabled="y"
 match="groupmMembers of your group:"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>group={}
require "wait"
wait.make(function()
wait.time(1.2)
--PSend("gt now watching "..#group.." members: "..table.concat(group, ", "))
end)</send>
 </trigger>
 <trigger
 enabled="y"
 match="healMembers of your group:"
 omit_from_output="y"
 sequence="100"
 >
</trigger>

 <trigger
 enabled="y"
 match="tankonYou don't know enough about tanking to do that."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>notank=1</send>
 </trigger>
 <trigger
 enabled="y"
 match="You rush forward to * *!"
 send_to="14"
 sequence="100"
 >
 <send>
if (gs("tts") == true) then
Execute("tts_stop")
end
restime=1
Sound(sdir.."/sounds/skills/%1.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Your friends channel is currently turned ON."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="tankoffYou will no longer behave like a tank."
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>tank off.</send>
 </trigger>
 <trigger
 enabled="y"
 match="tankoffYou will no longer fight defensively in melee combat."
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>Defensive off</send>
 </trigger>
 <trigger
 enabled="y"
 match="tankoffYou will now attempt to tank in any groups you are in."
 omit_from_output="y"
 sequence="100"
 >
 <send>tank | prefix tankoff</send>
 </trigger>
 <trigger
 enabled="y"
 match="tankoffYou will now fight defensively in melee combat."
 omit_from_output="y"
 sequence="100"
 >
 <send>def | prefix tankoff</send>
 </trigger>
 <trigger
 enabled="y"
 match="tankonYou will no longer behave like a tank."
 omit_from_output="y"
 sequence="100"
 >
 <send>tank | prefix tankon</send>
 </trigger>
 <trigger
 enabled="y"
 match="tankonYou will no longer fight defensively in melee combat."
 omit_from_output="y"
 sequence="100"
 >
 <send>def | prefix tankon</send>
 </trigger>
 <trigger
 enabled="y"
 match="tankonYou will now attempt to tank in any groups you are in."
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>Tank on.</send>
 </trigger>
 <trigger
 enabled="y"
 match="tankonYou will now fight defensively in melee combat."
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>Defensive on.</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="* turns to attack you!"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.combat then Note("%1 turns to attack you!") end
Sound(sdir.."/sounds/skills/taunt/taunted2.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You taunt *, and * attacks you!"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.combat then Note("You taunt %1, and %2 attacks you!") end
Sound(sdir.."/sounds/skills/taunt/taunted.ogg")</send>
 </trigger>

 <trigger
 enabled="y"
 match="You attempt to goad * into attacking you."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.combat then Note("You attempt to goad %1 into attacking you.") end
Sound(sdir.."/sounds/skills/taunt/fail.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You shout a challenge to everyone nearby."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.combat then Note("You shout a challenge to everyone nearby.") end
Sound(sdir.."/sounds/skills/taunt/area.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* gives you * gold coins."
 send_to="14"
 sequence="99"
 >
 <send>Sound(sdir.."/sounds/items/get gold container.ogg")
</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="You get * gold coins from *."
 send_to="14"
 sequence="98"
 >
 <send>Sound(sdir.."/sounds/items/get gold container.ogg")
gg=tonumber(%1)
counters.steal=counters.steal+gg
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You get * gold coins."
 send_to="14"
 sequence="98"
 >
 <send>Sound(sdir.."/sounds/items/get gold container.ogg")
gg=tonumber(%1)
counters.steal=counters.steal+gg
</send>
 </trigger>

</triggers>
<triggers>
 <trigger
 enabled="y"
 match="invcheckYou are carrying:"
 omit_from_output="y"
 sequence="99"
 >
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="invcheck*"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(inv, "%1")</send>
 </trigger>
 <trigger
 enabled="y"
 match="invcheckNothing."
 omit_from_output="y"
 send_to="14"
 sequence="99"
 >
 </trigger>

 <trigger
 enabled="y"
 match="invcheck*a magical lantern (light)"
 omit_from_output="y"
 send_to="14"
 sequence="99"
 >
 <send>table.insert(inv, "the lantern")</send>
 </trigger>

</triggers>

<triggers>
 <trigger
 enabled="y"
 match="invcheck*abort*"
 omit_from_output="y"
 send_to="14"
 sequence="99"
 >
 <send >
 if (#inv&lt; 1) then
Note("You aren't carrying anything.")
else
Note("You are carrying the following "..#inv.." items:")
if (#inv>1) then
count=#inv-1
Note(table.concat(inv, ", ", 1, count)..", and "..inv[#inv]..".")
else
Note(table.concat(inv, ", "))
end
end
inv={}</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="^\*abort\*$"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/notifications/abort.ogg")</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 match="Ok."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="Welcome back!"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/notifications/welcome back.ogg")
Execute("tts_stop")</send>
 </trigger>
 <trigger
 enabled="y"
 match="( 8)A leaf and stick hut is floating here."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 group="fishing"
 match="You reel in an *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.misc then Note("You reel in an %1") end
if gs("donfish")==true then
PSend("don fish")
end
Sound(sdir.."/sounds/misc/fishcatch.ogg")</send>
 </trigger>
 <trigger
 group="lvl"
 match="^lvlCleric\s*\w++\:\s*\w+\s*(\w+)"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="99"
 >
 <send>cleric=%1</send>
 </trigger>
 <trigger
 enabled="y"
 match="Your skin returns to its normal texture."
 send_to="14"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/spells/stoneskin off.ogg")
if kspells["stoneskin"]==1 then
rct["stone skin"]=true
end
rc("stone")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You notice that the foul taste in your mouth seems to be gone."
 send_to="14"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/spells/foulblood off.ogg")
rct["foulblood"]=true
rc("foulblood")
</send>
</trigger>
 <trigger
 enabled="y"
 match="The air smells cleaner, and you realize your rancid flesh spell has expired."
 send_to="14"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/spells/rancid flesh off.ogg")
rc("rancid flesh")
rct["rancid flesh"]=true
</send>
</trigger>
 <trigger
 enabled="y"
 match="You find yourself no longer able to sense encroaching death."
 send_to="14"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/necromancer/dread portent off.ogg")
rc("dread portent")
rct["dread portent"]=true
</send>
</trigger>
 <trigger
 enabled="y"
 match="You feel the pent up vengeance in your blood dissipate."
 send_to="14"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/spells/dying breath off.ogg")
rc("dying breath")
rct["dying breath"]=true
</send>
</trigger>

 <trigger
 group="fishing"
 match="You reel in your line and recast it."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.misc then Note("You reel in your line and recast it.") end
Sound(sdir.."/sounds/misc/fishcast.ogg")</send>
 </trigger>
 <trigger
 group="lvl"
 match="^lvlMage\s*\w++\:\s*\w+\s*(\w+)"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="99"
 >
 <send>mage=%1</send>
 </trigger>
 <trigger
 enabled="y"
 match="Your skin turns to a stone like substance."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.spells then Note("Your skin turns to a stone like substance.") end
rct["stone skin"]=nil
Sound(sdir.."/sounds/spells/stone skin.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You * a * fireball at *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.spells then Note("You %1 a %2 fireball at %3"
) end
myspecial()
require "wait"
wait.make(function()
wait.time(0.4)
ppi.play(sdir.."/sounds/spells/fireball.ogg",0,50)
theygrunt()
end)
</send>
 </trigger>
 <trigger
 match="(auction) Auction failed, item returned to seller."
enabled="y"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/auction/item sold.ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You reply to *, '*'"
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>You reply to %1, %2</send>
 </trigger>
 <trigger
 enabled="y"
 match="Your storage locker expires in * days."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You add * to your group."
 send_to="14"
 sequence="100"
 >
 <send>if minion then
minion=false
Sound(sdir.."/sounds/grouping/minion joins.ogg")
table.insert(group, "%1")
else
Sound(sdir.."/sounds/grouping/you add someone.ogg")
if (grouped==0) then
group={}
table.insert(group, "%1")
grouped=1
EnableGroup("group", 1)
EnableGroup("cgroup", 1)
else
table.insert(group, "%1")
end
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* has become a member of the group."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/grouping/new member.ogg")
table.insert(group, "%1")</send>
 </trigger>

 <trigger
 match="(auction) Current bid is * gold coins for *"
enabled="y"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="[*] *: *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>name=string.lower("%2")
cname=string.lower("%1")
if (name == gs("me")) then
if (gs("chist") == true) then
Execute("history_add channels=%1 %2: %3")
Execute("history_add all=%1 %2: %3")
end
if (gs("chans") == 1) then
Sound(sdir.."/sounds/channels/"..cname..".ogg")
Note("%1 %2: %3")
elseif (gs("chans") == 2) then
Sound(sdir.."\sounds/channels/"..cname..".ogg")
Execute("tts_note %1 %2: %3")
elseif (gs("chans") == 3) then
Sound(sdir.."/sounds/channels/"..cname..".ogg")
end
else
Note("%1 %2: %3")
Execute("history_add all=%1 %2: %3")
Execute("history_add channels=%1 %2: %3")
Sound(sdir.."/sounds/channels/"..cname..".ogg")
end</send>
 </trigger>
 <trigger
 match="(auction) First call for '*', at * gold coins."
enabled="y"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/auction/auction bell1.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You start healing *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.spells then Note("You start healing %1") end
Sound(sdir.."/sounds/spells/healing touch1.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="[MA CL TH WA NC]*"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 match="(auction) Last call for '*', at * gold coins."
enabled="y"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/auction/auction bell3.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You stealthily move into position..."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.combat then Note("You stealthily move into position...") end
Sound(sdir.."/sounds/skills/thief/backstab1.ogg")
EnableGroup("stab", 1)</send>
 </trigger>
 <trigger
 match="(auction) Now accepting bids for *, minimum bid is *"
enabled="y"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You still have enough experience to level!"
 omit_from_output="n"
 sequence="100"
 >
 </trigger>
 <trigger
 match="You fail to cast the spell*"
 omit_from_output="y"
 send_to="14"
 sequence="100"
enabled="y"
 >
 <send>if not gag.spells then Note("You fail to cast the spell%1") end
Sound(sdir.."/sounds/spells/fail/"..math.random(1,fspell)..".ogg")
if(nfight==1) then
return
end
if (gs("castfail") == true) then
Note("recasting "..casting)
fail=1
DoAfterSpecial(1,'fail=0',12)
if (pose~="stand") then
prevpose=pose
PSend("stand")
end--stand
Execute("c "..casting)
end--castfail
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You have been removed from the group."
 send_to="14"
 sequence="100"
 >
 <send>grouped=0
gclear()
group={}
EnableGroup("group", 0)
EnableGroup("cgroup", 0)
</send>
 </trigger>

 <trigger
 enabled="y"
 match="You have been kicked out of the group!"
 send_to="14"
 sequence="100"
 >
 <send>grouped=0
EnableGroup("group", 0)
EnableGroup("cgroup", 0)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You fail to pick the lock."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.misc then Note("You fail to pick the lock.") end
Sound(sdir.."/sounds/doors/fail pick2.ogg")
if (gs("autopick") == true) then
Execute("pick " .. pick)
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="Your * increases*"
 send_to="14"
 sequence="100"
 >
 <send>checkstats()
</send>
 </trigger>

 <trigger
 enabled="y"
 match="You stop using *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.misc then Note("You stop using %1.") end
checkstats()
Sound(sdir.."/sounds/combat/unwield.ogg")</send>
 </trigger>

 <trigger
 enabled="y"
 match="scrNotify channel on."
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>notify on.</send>
 </trigger>
 <trigger
 enabled="y"
 match="* calls upon * to bring peace to this place."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/peace.ogg")</send>
 </trigger>

 <trigger
 enabled="y"
 match="You feel a light touch, *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.spells then Note("You feel a light touch, %1") end
Sound(sdir.."/sounds/spells/chill touch.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="A white light wells up inside the corpse of *, and it slowly rises off the ground!"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/res1.ogg")</send>
 </trigger>

 <trigger
 enabled="y"
 match="The white aura around * fades."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/sancoff.ogg")
if (dispelling==1) and (dispelled=="%1") then
dispelling=0
dispelled=0
PSend("gt dispelling accomplished.")
PSend("brag gt mana")
end
spellfall("sanctuary", "%1")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="scrThe size of the things will be implied."
 omit_from_output="y"
 sequence="100"
 >
 <send>autosize | prefix scr</send>
 </trigger>
 <trigger
 enabled="y"
 match="You feel a slight tingle and you feel somehow abandoned."
 send_to="14"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/spells/bless off.ogg")
if (grouped==1) and (gs("swarn") == true) then
PSend("sub bless out.")
end
rc("bless")
if kspells["bless"]==1 then
rct["bless"]=true
end
</send>
 </trigger>
 <trigger
 group="combat"
 match="* parries your attack."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.combat then Note("%1 parries your attack.") end
ppi.play(sdir.."/sounds/combat/parry/" ..math.random(1, tparry).. ".ogg",0,50)
counters.parryc=counters.parryc+1
</send>
 </trigger>
 <trigger
 enabled="y"
 match="There is no more meat left *"
 sequence="100"
 >
 <send>sac corpse
stand</send>
 </trigger>
 <trigger
 enabled="y"
 match="scrWeapon: *, damage type *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>EnableGroup("stats", 0)</send>
 </trigger>
 <trigger
 enabled="y"
 match="You feel as though * is watching over you."
 send_to="14"
 sequence="100"
 >
 <send>rct["bless"]=nil
Sound(sdir.."/sounds/spells/bless.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* pokes you in the ribs."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/socials/poke.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Time of last access/finger: *"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 group="stab"
 match="* quickly avoids your backstab."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.combat then Note("%1 quickly avoids your backstab.") end
Sound(sdir.."/sounds/skills/backstab/avoided.ogg")
EnableGroup("stab", 0)</send>
 </trigger>
 <trigger
 enabled="y"
 match="* quickly avoids *'s backstab."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/backstab/avoided.ogg")
bfight("%2")
</send>
 </trigger>

 <trigger
 enabled="y"
 match="Time of last save: *"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="scrYou will automatically unhide now."
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>auto unhide configured.</send>
 </trigger>
 <trigger
 enabled="y"
 match="^kxwt_event.*?level (\d+) (\w+)"
omit_from_output="y"
 send_to="14"
regexp="y"
 sequence="100"
 >
 <send>EnableGroup("show",1)
PSend("show cost")
Send("level | grep cap | prefix showcap")
Sound(sdir .. "/sounds/level/%2.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="^kxwt_event quest *"
omit_from_output="y"
 send_to="14"
regexp="y"
 sequence="100"
 >
 <send>
Sound(GetInfo(67).."/sounds/notifications/quest complete.ogg")
</send>
 </trigger>

 <trigger
 enabled="y"
 match="You gain a practice!"
 send_to="14"
 sequence="100"
 >
 <send>
classtnl="practice"
exptnl=2000000
Execute("tnp")

</send>
 </trigger>

 <trigger
 enabled="y"
 match="To gain a level, you can use the 'level' command."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="* recognizes you as a murderer!"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/misc/recognized murderer.ogg")</send>
 </trigger>
 <trigger
 group="lvl"
 match="^lvlThief\s*\w++\:\s*\w+\s*(\w+)"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="99"
 >
 <send>thief=%1</send>
 </trigger>
 <trigger
 enabled="y"
 match="(*) * contains:"
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>%1 - it contains:</send>
 </trigger>
 <trigger
 group="combat"
 match="You run away from the battle like a yellow bellied coward!!"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if (gs("tts") == true) then
world.Execute ("tts_stop")
else
Note("You run away from the battle like a yellow bellied coward!!")
end
EnableGroup("combat",0)
counters.flee=counters.flee+1
Sound(sdir.."/sounds/combat/flee2.ogg")</send>
 </trigger>
 <trigger
 group="lvl"
 match="^lvlWarrior\s*\w++\:\s*\w+\s*(\w+)"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="99"
 >
 <send>warrior=%1</send>
 </trigger>
 <trigger
 enabled="y"
 match="You are coated by a thin film of electrically conductive magic."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.spells then Note("You are coated by a thin film of electrically conductive magic.") end
Sound(sdir.."/sounds/spells/ground on.ogg")
rct["ground"]=nil
checkstats()
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You are protected by a magical layer of fire."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.spells then Note("You are protected by a magical layer of fire.") end
Sound(sdir.."/sounds/spells/fireshield on.ogg")
rct["fire shield"]=nil
checkstats()
</send>
 </trigger>

 <trigger
 enabled="y"
 match="You are protected by a magical film of ice."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.spells then Note("You are protected by a magical film of ice.") end
Sound(sdir.."/sounds/spells/iceshield on.ogg")
rct["ice shield"]=nil
checkstats()
</send>
 </trigger>
 <trigger
 match="You scramble to retrieve *!"
 omit_from_output="y"
enabled="y"
 send_to="14"
 sequence="1"
 >
 <send>if not gag.combat then Note("You scramble to retrieve %1!") end
Sound(sdir.."/sounds/combat/scramble disarmed.ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
 group="ranks"
 match="skl*very bad"
 omit_from_output="y"
 send_to="14"
 sequence="99"
 >
 <send>table.insert(vbad, "%1")</send>
 </trigger>
 <trigger
 enabled="y"
 match="[MA CL TH WA] Kills Rank Name"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You are drowning!"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/misc/drown2.ogg")</send>
 </trigger>
 <trigger
 group="combat"
 match="You scramble to retrieve your weapon..."
 omit_from_output="y"
 sequence="90"
 >
 </trigger>
 <trigger
 enabled="y"
 group="ranks"
 match="skl*very bad*"
 omit_from_output="y"
 send_to="14"
 sequence="99"
 >
 <send>table.insert(vbad, "%1")</send>
 </trigger>
 <trigger
 enabled="y"
 match="[arena] * killed by * in arena *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Note("arena %1 died to %2.")
play("channels/arenadeath",0)
if (gs("logpk")==true) then
Execute("history_add arena=%1 died to %2.")
Execute("history_add all=%1 died to %2.")
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="[arena] (player) * killed by * while in room [*] *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Note("pk %1 died to %2 in %4.")
play("channels/pkdeath",0)
if (gs("logpk")==true) then
Execute("history_add arena=%1 died to %2 in %4.")
Execute("history_add all=%1 died to %2 in %4.")
end
</send>
 </trigger>

 <trigger
 match="(auction) Second call for '*', at * gold coins."
 omit_from_output="y"
enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/auction/auction bell2.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You see a glowing light, suspended in mid air."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(players, "invis")</send>
 </trigger>
 <trigger
 enabled="y"
 match="^(\w+) drops *$"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/items/drop/" .. math.random(1,drops)..".ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You are fully healed."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/fully healed.ogg")</send>
 </trigger>
 <trigger
 match="(auction) Starting bid on * at * gold."
 omit_from_output="y"
enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>Note("New auction: %1, %2 gold.")
Execute("history_add auction=new: %1 for %2 gold")
Sound(sdir.."/sounds/auction/start auction.ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="^(\w+) picks (.*?)$"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/doors/unlock.ogg")</send>

 </trigger>
 <trigger
 match="(auction) The item of interest appears to have vanished. Terminating auction."
 omit_from_output="y"
enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/auction/item sold.ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You struggle desparately for air to breathe!"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/misc/drown1.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
script="fighting"
 keep_evaluating="y"
 match="^kxft(.*)"
omit_from_output="y"
 regexp="y"
 sequence="2"
 >
 </trigger>


 <trigger
 match="(auction) This item is being sold by *"
 omit_from_output="y"
enabled="y"
 send_to="2"
 sequence="100"
 >
 <send>sold by %1</send>
 </trigger>
 <trigger
 enabled="y"
 match="You struggle for air but find none!"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/misc/drown1.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="(notify) *"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/channels/notify.ogg")
Execute("history_add all=notify %1")
Execute("history_add misc=notify %1")
</send>
 </trigger>
 <trigger
 group="frostbite"
 match="You struggle with the spell, and the line of frost zips randomly across the*"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.spells then Note("You struggle with the spell, and the line of frost zips randomly across the%1") end
Sound(sdir.."/sounds/spells/frost4.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You feel less protected from evil."
 send_to="14"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/spells/pfe off.ogg")
rc("PFE")
if kspells["protectionfromevil"]==1 then
--print("Oh good you know it.")
rct["protection from evil"]=true
else
--print("uh-oh, you don't!")
--rct["protection from evil"]=true
end
</send>

 </trigger>
 <trigger
 enabled="y"
 match="You tell *, '*'"
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>You tell %1, %2</send>
 </trigger>
 <trigger
 enabled="y"
 match="Cl Tot Pr uL]"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You feel less protected."
 send_to="14"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/spells/armor off.ogg")
if (grouped==1) and (gs("swarn") == true) then
PSend("sub armor out.")
end
rc("armor")
if kspells["armor"]==1 then
rct["armor"]=true
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You think you got a nibble, but you aren't sure..."
 omit_from_output="y"
 sequence="100"
send_to="14"
 >
<send>if not gag.misc then Note("You think you got a nibble, but you aren't sure...") end</send>
 </trigger>
 <trigger
 enabled="y"
 match="Class Current Cost to level"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="scrYou will no longer automatically split gold with group members."
 omit_from_output="y"
 sequence="100"
 >
 <send>autosplit | prefix scr</send>
 </trigger>
 <trigger
 enabled="y"
 match="You feel less tired."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.spells then Note("You feel less tired.") end
Sound(sdir.."/sounds/spells/refresh self.ogg")
announce_move=true
if (map==1) then
AppendToNotepad("map", "c refresh;")

end
mvalarm=0</send>
 </trigger>
 <trigger
 enabled="y"
 match="Combat tactics:"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="scrYou will not see any extra size info about characters."
 omit_from_output="y"
 sequence="100"
 >
 <send>autosize | prefix scr</send>
 </trigger>
 <trigger
 enabled="y"
 match="You feel righteous."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.spells then Note("You feel righteous.") end
rct["protection from evil"]=nil
Sound(sdir.."/sounds/spells/pfe.ogg")</send>
 </trigger>
 <trigger
group="telltriggers"
enabled="y"
 match="* replies to you, '*'"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Note("%1 replies, %2")
Execute("history_add tells=%1 replied, %2")
Execute("history_add all=%1 replied, %2")

Sound(sdir.."/sounds/channels/reply.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="( 0)A ball of light hovers peacefully here."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="scrYou will not see any extra size info about characters."
 omit_from_output="y"
 sequence="100"
 >
 <send>autosi | prefix scr</send>
 </trigger>
 <trigger
 enabled="y"
 match="You feel * protecting you."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.spells then Note("You feel %1 protecting you.") end
rct["armor"]=nil
Sound(sdir.."/sounds/spells/armor on.ogg")</send>
 </trigger>

 <trigger
 enabled="y"
 match="The scent of something rotten fills your nose."
 omit_from_output="y"
 send_to="14"
 sequence="100"
script="sgag"
 >
 <send>
rct["rancid flesh"]=nil
Sound(sdir.."/sounds/spells/rancid on.ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You feel sick to your stomach and a foul taste fills your mouth."
 omit_from_output="y"
 send_to="14"
 sequence="100"
script="sgag"
 >
 <send>
rct["foulblood"]=nil
Sound(sdir.."/sounds/spells/foulblood on.ogg")
</send>
 </trigger>

 <trigger
 enabled="y"
 match="Things take on a ghostly red hue."
 omit_from_output="y"
script="sgag"
 send_to="14"
 sequence="100"
 >
 <send>rct["infravision"]=nil
Sound(sdir.."/sounds/spells/infra on.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Your eyes tingle."
script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>rct["detect invisibility"]=nil
Sound(sdir.."/sounds/spells/dinvis on.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Tensor's floating disc abruptly winks out of existence. (carried by you)"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/tensor pop.ogg")</send>
 </trigger>

 <trigger
 enabled="y"
 match="You feel more aware of your surroundings."
script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>rct["sense life"]=nil
Sound(sdir.."/sounds/spells/sl on.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* restored you to full health!"
 send_to="14"
 sequence="100"
 >
 <send>
Execute("history_add all=%1 restored you to full health.")
Sound(sdir.."/sounds/misc/god restore.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Compared to your current *"
group="compare"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="scrYou will now automatically split gold with group members."
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>autosplit configured.</send>
 </trigger>
 <trigger
 group="combat"
 match="* rushes forward to defend you!"
script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if (gs("tts") == true) then
world.Execute ("tts_interrupt %1 rushes forward to defend you!")
else
Note("%1 rushes forward to defend you!")
end</send>
 </trigger>
 <trigger
 enabled="y"
 match="scrYou will now see the height/size of the things in front of the ground string."
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>size display configured.</send>
 </trigger>
 <trigger
 enabled="y"
 match="You have a few scratches."
script="cngag"

 omit_from_output="y"
 send_to="14"
 sequence="1"
 >
 <send>Sound(sdir.."/sounds/condition/"..gs("scheme").."/scratches.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* savagely devours *"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/misc/eat corpse.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You have been KILLED!!!! *"
 send_to="14"
 sequence="100"
 >
 <send>
rct={}
require "wait"
wait.make(function()
Sound(sdir.."/sounds/combat/killed.ogg")

wait.time(1.2)
Sound(sdir.."/sounds/combat/pkmsgs/" ..math.random (1, pkmsg).. ".ogg")
end)
prevhp = 0
prevmn = 0</send>
 </trigger>
 <trigger
 enabled="y"
 match="* says to you, * like you are not welcome here*"
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>%1 thinks %2 like you aren't welcome here.</send>
 </trigger>
 <trigger
 enabled="y"
 group="ranks"
 match="skl*very good"
 omit_from_output="y"
 send_to="14"
 sequence="99"
 >
 <send>table.insert(vgood, "%1")</send>
 </trigger>
 <trigger
 enabled="y"
 match="( 0)A number of large, melting icy spikes jut up from the ground."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 group="ranks"
 match="skl*poor"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(poor, "%1")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You sense something different about *..."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/items/random.ogg")
table.insert(uniques,"%1")
Execute("history_add misc=%1 randomed!")
Execute("history_add all=%1 randomed!")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You have big nasty wounds and scratches."
script="cngag"

 omit_from_output="y"
 send_to="14"
 sequence="1"
 >
 <send>Sound(sdir.."/sounds/condition/"..gs("scheme").."/big nasty.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 group="ranks"
 match="skl*very good*"
 omit_from_output="y"
 send_to="14"
 sequence="99"
 >
 <send>table.insert(vgood, "%1")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You are in an awful condition!"
script="cngag"

 omit_from_output="y"
 send_to="14"
 sequence="1"
 >
 <send>Sound(sdir.."/sounds/condition/"..gs("scheme").."/awful.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="(21)A mound of sand has a hole dug into it."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 group="ranks"
 match="skl*poor*"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(poor, "%1")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You sit down and rest your tired bones."
script="mgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
mnrnote = 0
hprnote = 0
hpnote = 0
mnnote = 0
mvnote = 0
mvrnote=0
if (gfighting==0) then
fight = 0
fc = 0
Sound(sdir.."/sounds/misc/uncrouch.ogg")
Execute("show regen | prefix scr:")
 fc = 0
end
Sound(sdir.."/sounds/misc/rest.ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="^You have lost +(\d+) experience points so far due to deaths\.$"
 regexp="y"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Note("You have lost "..ntrunk("%1").." experience so far due to deaths.")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="( *)A ghostly apparition by the name Lostsoul wanders the world."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(players, "lostsoul")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You are in excellent condition."
 omit_from_output="y"
script="cngag"
 send_to="14"
 sequence="1"
 >
 <send>Sound(sdir.."/sounds/condition/"..gs("scheme").."/excellent.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="skl*user abort*"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if (#vbad~=0) then
Note("Very bad stuff ("..#vbad.." skills:")
Note(table.concat(vbad, ", "))
vbad={}
end
if (#bad~=0) then
Note("Bad stuff ("..#bad.." skills:")
Note(table.concat(bad, ", "))
bad={}
end
if (#poor~=0) then
Note("Poor stuff ("..#poor.." skills:")
Note(table.concat(poor, ", "))
poor={}
end
if (#fair~=0) then
Note("Fair stuff ("..#fair.." skills:")
Note(table.concat(fair, ", "))
fair={}
end
if (#moderate~=0) then
Note("Moderate stuff ("..#moderate.." skills:")
Note(table.concat(moderate, ", "))
moderate={}
end
if (#avg~=0) then
Note("Average stuff ("..#avg.." skills:")
Note(table.concat(avg, ", "))
avg={}
end
if (#good~=0) then
Note("Good stuff ("..#good.." skills:")
Note(table.concat(good, ", "))
good={}
end
if (#vgood~=0) then
Note("Very good stuff ("..#vgood.." skills:")
Note(table.concat(vgood, ", "))
vgood={}
end
if (#exceptional~=0) then
Note("Exceptional stuff ("..#exceptional.." skills:")
Note(table.concat(exceptional, ", "))
exceptional={}
end
if (#perfect~=0) then
Note("Perfect stuff ("..#perfect.." skills:")
Note(table.concat(perfect, ", "))
perfect={}
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You slow down and feel really burned out."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/haste off.ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You have * gold coins."
 omit_from_output="y"
send_to="14"
 sequence="100"
 >
<send>goldhand="%1"</send>
 </trigger>
 <trigger
 enabled="y"
 match="You have one gold coin."
 omit_from_output="y"
send_to="14"
 sequence="100"
 >
<send>goldhand=1</send>
 </trigger>

 <trigger
 enabled="y"
 match="You have no gold."
 omit_from_output="y"
send_to="14"
 sequence="100"
 >
<send>goldhand=0</send>
 </trigger>
 <trigger
 enabled="y"
 match="You have * gold coins in the bank."
 omit_from_output="y"
send_to="14"
 sequence="100"
 >
<send>goldbank=tonumber("%1")
if(goldbank>0) then
if(bwithdraw==1) then
PSend("bank withdraw "..goldbank)
bwithdraw=0
return
end
end
bwithdraw=0
if(goldhand==0) then
if(goldbank==0) then
Note("You have no gold at all.")
else
Note("You have no gold in hand and "..goldbank.." in bank")
end
else
if(goldbank==0) then
Note("You have "..goldhand.." in hand and nothing in the bank.")
else
Note("You have "..goldhand.." in hand and "..goldbank.." in the bank.")
end
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You have no gold in the bank."
 omit_from_output="y"
send_to="14"
 sequence="100"
 >
<send>goldbank=0
if(goldhand==0) then
if(goldbank==0) then
Note("You have no gold at all.")
else
Note("You have no gold in hand and "..goldbank.." in bank")
end
else
if(goldbank==0) then
Note("You have "..goldhand.." in hand and nothing in the bank.")
else
Note("You have "..goldhand.." in hand and "..goldbank.." in the bank.")
end
end
</send>
 </trigger>

 <trigger
 enabled="y"
 match="( *)A half naked Angelbaby is here playing her harp."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(players, "angelbaby")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You are mortally wounded, and will die soon if not aided."
script="cngag"

 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/condition/"..gs("scheme").."/8.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="sklYou know the following *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>EnableGroup("ranks", 1)</send>
 </trigger>
 <trigger
 enabled="y"
 match="You slowly fade into existence."
 send_to="14"
 sequence="100"
 >
 <send>
if (grouped==1) and (gs("swarn") == true) then
PSend("warn invis out!")
end
Sound(sdir.."/sounds/spells/invis off.ogg")
rc("invis") 
if kspells["invisibility"]==1 then
rct["invisibility"]=true
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="( *)A soft Groan is heard from behind a closed door."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(players, "Groan")</send>
 </trigger>
 <trigger
 enabled="y"
 match="^Logging in character \'(\w+)\'"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>
if (gs("tts") == true) then
world.Execute ("tts_interrupt Logging in %1.")
else
Note("Logging in %1.")
end
ss("me", "%1")

login()
</send>
 </trigger>
 <trigger
 enabled="y"
 match="^kxwt_myname (\w+)"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
<send>
Note("Logged in %1.")
ss("me", "%1")
if (loggedin==0) then
PSend("channel listen zt | prefix mzc")
login()
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You are no longer fishing."
 send_to="14"
 sequence="100"
 >
 <send>EnableGroup("fishing", 0)</send>
 </trigger>
 <trigger
 enabled="y"
 match="* accuses you of being a thief!"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Note("%1 thinks you are a thief!")
Sound(sdir.."/sounds/misc/recognized thief.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
match="You slowly fade out of existence."
 omit_from_output="y"
script="sgag"
 send_to="14"
 sequence="100"
 >
 <send>rct["invisibility"]=nil
Sound(sdir.."/sounds/spells/invis.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="^You (\w+)\: (.*?)$"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>if (gs("chans") ==1) then
Sound(sdir.."/sounds/channels/%1.ogg")
Note("You %1, %2")
elseif (gs("chans") ==2) then
Sound(sdir.."/sounds/channels/%1.ogg")
Execute("tts_note you %1, %2")
elseif (gs("chans") ==3) then
Sound(sdir.."/sounds/channels/%1.ogg")
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You are now a group member."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/grouping/you join.ogg")
ss("antideath",false)
grouped=1
Note("Note: To learn to use the group bots, use the '!help' command.")
EnableGroup("group", 1)
EnableGroup("cgroup", 1)
PSend("group | prefix grm")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* appears to be blinded!"
script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/blind on.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="^You need (\w+) experience to train a practice\, and you have (\w+)\.$"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>exp=%2
toprac=%1
Note("You still need "..toprac-exp.." experience to train a practice. It costs "..toprac..".")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* approaches as if to attack, then hesitates for a moment."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if (gs("tts") == true) then
world.Execute ("tts_interrupt %1 is about to attack you!")
else
Note("%1 aproaches as if to attack, then hesitates.")
end</send>
 </trigger>
 <trigger
 enabled="y"
 match="You thought you had something, but you were mistaken."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/pickpocket/nothing2.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You try, but the blood fever remains just out of your reach!"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/berserk no.ogg")</send>
 </trigger>

 <trigger
 enabled="y"
 match="* attracts your attention, fresh meat! KILLLLLLLL!"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/berserk another target.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You throw a large ball of pent-up * electricity at *."
script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
myspecial()
require "wait"
wait.make(function()
wait.time(0.4)
Sound(sdir.."/sounds/spells/ball lightning.ogg")
theygrunt()
end)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* auctions, '*'"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Execute("history_add all=%1 auctioned, %2")
Execute("history_add channels=%1 auctioned, %2")
Sound(sdir.."/sounds/channels/auction.ogg")
Note("%1 auctions, %2")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Turning on channel *"
 send_to="14"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/channels/on.ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="Turning off channel *"
 send_to="14"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/channels/off.ogg")
</send>
 </trigger>

 <trigger
 enabled="y"
 match="You throw caution to the wind *"
script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
myspecial()
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You feel stronger."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/strength.ogg")
Execute("show str")</send>
 </trigger>
 <trigger
 group="combat"
 match="You trip *, sending * sprawling to the ground!"
script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>myspecial()
require "wait"
wait.make(function()
wait.time(0.3)
if (trip[terrain]~=nil) then
ppi.play(sdir.."/sounds/skills/trip/"..terrain.."/"..math.random(1,trip[terrain])..".ogg",0,50)
else
Sound(sdir.."/sounds/skills/you trip.ogg")
end
theygrunt()
end)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You find nothing of value."
script="mgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/mining/find nothing.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="A small rockslide pelts you with falling debris!"
script="mgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>PSend("c cure crit")
Sound(sdir.."/sounds/mining/find nothing.ogg")</send>
 </trigger>

 <trigger
 group="combat"
 match="You try to disarm *, but fail."
 omit_from_output="y"
script="cgag"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/combat/you fail to disarm.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Death exp offset: 1000"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="scrYou will now stay hidden when using most commands."
 omit_from_output="y"
 sequence="100"
 >
 <send>autounhide | prefix scr</send>
 </trigger>
 <trigger
 enabled="y"
 match="You fire an arrow, *"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 group="ranks"
 match="skl* bad"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(bad, "%1")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You flee from combat!!"
script="cgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if (gs("tts") == true) then
world.Execute ("tts_stop")
else
Note("You flee from combat!")
end
counters.flee=counters.flee+1
EnableGroup("combat",0)
Sound(sdir.."/sounds/combat/flee2.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* whispers to you, '*'"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Execute("history_add say=%1 whispered, %2")
Execute("history_add all=%1 whispered, %2")
Sound(sdir.."/sounds/channels/whisper.ogg")
Note("%1 whispers, %2")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* gives you *"
 send_to="14"
 sequence="102"
 >
 <send>
Execute("history_add misc=%1 gave you %2")
Sound(sdir.."/sounds/items/they give.ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* gives you a soft nudge."
 send_to="14"
 sequence="101"
 >
 <send>
Sound(sdir.."/sounds/socials/nudge.ogg")
</send>
</trigger>
 <trigger
 enabled="y"
 match="* throw* head back and cackle* with insane glee."
 send_to="14"
 sequence="1"
 >
 <send>
Sound(sdir.."/sounds/socials/cackle.ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* throw* head back and cackle* with insane glee."
 send_to="14"
 sequence="1"
 >
 <send>play("socials/cackle",0)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* cough* loudly."
 send_to="14"
 sequence="1"
 >
 <send>play("socials/cough",0)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* yawns so wide everyone can see his tonsils."
 send_to="14"
 sequence="1"
 >
 <send>play("socials/yawn1",0)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* yawns so wide everyone can see her tonsils."
 send_to="14"
 sequence="1"
 >
 <send>play("socials/yawn2",0)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* pukes all over the place."
 send_to="14"
 sequence="1"
 >
 <send>play("socials/puke",0)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* snickers softly."
 send_to="14"
 sequence="1"
 >
 <send>play("socials/snicker1",0)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* sighs somberly."
 send_to="14"
 sequence="1"
 >
 <send>play("socials/sigh1",0)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* laugh* out loud."
 send_to="14"
 sequence="1"
 >
 <send>play("socials/laugh2",0)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* grabs *, thrusts it into the air and shouts, *"
 send_to="14"
 sequence="1"
 >
 <send>play("socials/raa",0)
</send>
 </trigger>

 <trigger
 enabled="y"
 match="You sigh."
 send_to="14"
 sequence="1"
 >
 <send>play("socials/sigh2",0)
</send>
 </trigger>

 <trigger
 enabled="y"
 match="* rolls about the floor laughing."
 send_to="14"
 sequence="1"
 >
 <send>play("socials/rofl",0)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You roll about the floor laughing."
 send_to="14"
 sequence="1"
 >
 <send>play("socials/rofl",0)
</send>
 </trigger>

 <trigger
 enabled="y"
 match="You give * to *"
 send_to="14"
 sequence="1"
 >
 <send>
Sound(sdir.."/sounds/items/you give.ogg")
</send>
 </trigger>

 <trigger
 enabled="y"
 match="* says, '*'"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Execute("history_add say=%1 says, %2")
Execute("history_add all=%1 says, %2")
Sound(sdir.."/sounds/channels/say.ogg")
Note("%1 says, %2")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Estimated cost: *"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 group="ranks"
 match="skl* bad*"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(bad, "%1")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You gain * exp*"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Note("+"..ntrunk("%1").." xp!")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* screams in pain as * places * in * back."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/backstab/7.ogg")
bfight("%2")
</send>
 </trigger>

 <trigger
 enabled="y"
 group="stab"
 match="* screams in pain as you place * in * back."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/backstab/7.ogg")
EnableGroup("stab", 0)
Note("screams in pain.")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Everything around you slows down."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/haste on.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="( 0)A pile of gold coins."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/items/coins.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 group="ranks"
 match="skl*average"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(avg, "%1")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* seems to have dropped *!*"
 omit_from_output="y"
 send_to="14"
 sequence="200"
 >
 <send>
Sound(sdir.."/sounds/skills/thief/pickpocket item.ogg")
if gag.expert then
Note("You got %2!")
else
Note("%1 seems to have dropped %2!%3")
end
</send>
 </trigger>
 <trigger
 enabled="y"
 group="ranks"
 match="skl*average*"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(avg, "%1")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You have quite a few wounds."
script="cngag"
 omit_from_output="y"
 send_to="14"
 sequence="1"
 >
 <send>Sound(sdir.."/sounds/condition/"..gs("scheme").."/quite a few.ogg")</send>
 </trigger>
 <trigger
 group="combat"
 match="* sees your attempt to trip * in time to avoid your foot."
script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/they avoid your trip.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You have reached the limits of your abilities."
script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/out of mana.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* shivers and shakes from the cold."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/chill shiver.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="( *)Fia flickers before you, barely a fire in the mind's eye."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(players, "Fia")</send>
 </trigger>
 <trigger
 enabled="y"
 match="( 0)One miserable gold coin."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/items/coin.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="smh*critical*"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>knowheal=1</send>
 </trigger>
 <trigger
 enabled="y"
 match="smc*refresh*"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>knowref=1</send>
 </trigger>
 <trigger
 enabled="y"
 match="kns*stone*"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>knowstone=1</send>
 </trigger>

 <trigger
 enabled="y"
 match="You have some small wounds and bruises."
script="cngag"
 omit_from_output="y"
 send_to="14"
 sequence="1"
 >
 <send>Sound(sdir.."/sounds/condition/"..gs("scheme").."/small wounds.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="( *)Takezo Kensei laughs at you while standing in a pool of his own blood."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(players, "Kensei")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You are pretty hurt."
script="cngag"
 omit_from_output="y"
 send_to="14"
 sequence="1"
 >
 <send>Sound(sdir.."/sounds/condition/"..gs("scheme").."/pretty hurt.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="smhSpells:"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>

 <trigger
 enabled="y"
 match="smcSpells:"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="^You have spent +(\d+) experience points so far\.$"
 regexp="y"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Note("You have spent "..ntrunk("%1").." experience so far.")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* utters the words, 'dexterity"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="( *)The corpse of * is lying here."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Note("the corpse of %2")
srand("steps/corpse",scorpse)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* rescues you and takes over the battle!"
 omit_from_output="y"
script="mgag"
 send_to="14"
 sequence="100"
 >
 <send>if (gs("tts") == true) then
world.Execute ("tts_interrupt You are rescued by %1!")
end
EnableGroup("combat",0)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You are rescued from certain death by *"
 omit_from_output="y"
script="mgag"
 send_to="14"
 sequence="100"
 >
 <send>if (gs("tts") == true) then
world.Execute ("tts_interrupt You are rescued by %1!")
end
EnableGroup("combat",0)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="smhYou know the following spells:"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>

 <trigger
 enabled="y"
 match="smcYou know the following spells:"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>

 <trigger
 enabled="y"
 match="You heal *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/healing touch2.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* utters the words, *"
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>%1 casts %2</send>
 </trigger>
 <trigger
 enabled="y"
 match="( *)The disfigured corpse of * is lying here."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Note("%2's corpse")
srand("steps/corpse",scorpse)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="The distance is too great for this waypoint to bridge the gap."
 send_to="14"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/misc/waypoint gap.ogg")</send>
 </trigger>
 <trigger
 group="stats"
 match="-------------------+--------------+--------------+-----------------------"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="( *)The elusive Samon is here swimming upstream to mate and lay eggs."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(players, "samon")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You are surrounded by a strong force shield."
script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>rct["shield"]=nil
Sound(sdir.."/sounds/spells/shield on.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* avoids your feeble bash, and trips you in the process."
script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/bashtrip.ogg")
Note("avoid trip.")
require "wait"
wait.make(function()
wait.time(0.3)
if (trip[terrain]~=nil) then
ppi.play(sdir.."/sounds/skills/trip/"..terrain.."/"..math.random(1,trip[terrain])..".ogg",0,-50)
else
ppi.play(sdir.."/sounds/skills/you trip.ogg",0,-50)
end
if (gender=="male") then
ppi.play(sdir.."/sounds/combat/grunts/2/"..mg.."/"..math.random(1,mgrunt[3])..".ogg",0,50)
elseif (gender=="female") then
ppi.play(sdir.."/sounds/combat/grunts/2/"..mg.."/"..math.random(1,fgrunt[3])..".ogg",0,50)
elseif (gender=="neuter") then
ppi.play(sdir.."/sounds/combat/grunts/2/"..mg.."/"..math.random(1,ngrunt[3])..".ogg",0,50)
end
end)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="wc - chars:*"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="1) Change low level limit [level *]"
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>1 low level limit %1</send>
 </trigger>
 <trigger
 enabled="y"
 match="^\( \w+\)(\w+) is here, fighting .*\.$"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(players, "%1 fighting")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You are surrounded by a white aura."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/sanc on.ogg")
rct["sanctuary"]=nil
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* avoids your feeble bash, and you fall flat on your face."
script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/bash4.ogg")
Note("avoided.")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="2) Change high level limit *"
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>2 high level limit %1</send>
 </trigger>
 <trigger
 enabled="y"
 match="^\( \w+\)(\w+) is here, sound asleep\.$"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(players, "%1 sleeping")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Done!  Come back soon!"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/notifications/leave game.ogg")
</send>
 </trigger>

 <trigger
 enabled="y"
 match="* backs slowly away from you..."
script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/turn/target.ogg")
Sound(sdir.."/sounds/skills/turn/repel.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You try to strike up a conversation with *"
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>You try to talk to %1</send>
 </trigger>
 <trigger
 enabled="y"
 match="^\( \w+\)(\w+) is here\.$"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(players, "%1")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* begins to regain * vision."
script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/blind off.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You unlock *"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/doors/unlock.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* begins to twitch and react with lightning speed to everything around *"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You use a small crystal to focus your powers and throw a confusing wash of color and force at *!"
script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>myspecial()
require "wait"
wait.make(function()
wait.time(0.4)
ppi.play(sdir.."/sounds/spells/prism.ogg",0,50)
theygrunt()
end)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You gain * experience for spellcasting!"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/misc/xp spellcasting.ogg")
Note("+"..ntrunk("%1").." xp!")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You use your turning skill to hold the undead at bay..."
script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/turn/repel.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Fight string: *"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You gather yourself for the attack..."
script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/leap1.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You wake up and begin resting."
script="mgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
mnrnote = 0
hprnote = 0
hpnote = 0
mnnote = 0
mvnote = 0
mvrnote=0
fight = 0
fc = 0
Sound(sdir.."/sounds/misc/uncrouch.ogg")
Execute("show regen | prefix scr:")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="For example, 'list *"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 group="ranks"
 match="skl*exceptional"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(exceptional, "%1")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You get *."
 send_to="14"
 sequence="100"
omit_from_output="y"
 >
<send>
require "wait"
wait.make(function()
table.insert(getitems, "%1")
if not (getblock==1) then
Sound(sdir.."/sounds/items/get item.ogg")
end
getblock=1
getcount=getcount+1
wait.time(0.4)
if (getsay==0) then
getsay=1
for i,v in pairs(getitems) do
if IsInTable(uniques,v)==0 then
if gs("items")~=3 then
length=0
word=""
for w in string.gmatch(v, "%S+") do
if string.len(w)>length then
if IsInTable(banned,w)==0 then
word=w
length=string.len(w)
end
end
end
if gs("items")==1 then
if gs("container")~=nil then
Send("put "..word.." "..gs("container"))
end
elseif gs("items")==2 then
Send("drop "..word)
Send("sac "..word)
elseif gs("items")==4 then
Send("donate "..word)
end --gs items
elseif gs("items")==5 then
Send("storage put "..word)
end
else
if gs("container")~=nil then
Send("put "..v.." "..gs("container"))
end
end
end
if getcount&lt;1 then

elseif getcount==1 then
Note("you get %1.")
elseif getcount>1 then
Note("You get "..getcount.." items: "..table.concat(getitems, ", "))
end
getsay=0
getblock=0
getcount=0
end
getitems={}
uniques={}
end)
</send>
 </trigger>

 <trigger
 enabled="n"
 match="Ground string: *"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 group="ranks"
 match="skl*exceptional*"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(exceptional, "%1")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You go to sleep."
script="mgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
hpregen = 0
mnregen = 0
mnrnote = 0
hprnote = 0
hpnote = 0
mnnote = 0
mvnote = 0
mvrnote=0
Sound(sdir.."/sounds/misc/sleep.ogg")
Execute("show regen | prefix scr:")
</send>
 </trigger>


 <trigger
 enabled="y"
 match="* shouts, *"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/channels/shout.ogg")
Execute("history_add all=%1 shouts, %2")
Execute("history_add channels=%1 shouts, %2")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="Here lies one very dead, very dumb DentinMud player."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="( 0)Shards and pieces of crystal litter the ground at your feet."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 group="ranks"
 match="skl*fair"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(fair, "%1")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You got * gold coins."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/thief/steal gold.ogg")
gg=tonumber(%1)
counters.steal=counters.steal+gg
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* shrinks away in fear."
script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/turn/target.ogg")
Sound(sdir.."/sounds/skills/turn/repel.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 ignore_case="y"
 match="Huh?"
script="mgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/notifications/command wrong.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 group="ranks"
 match="skl*fair*"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(fair, "%1")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* slips from the shadows."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/thief/slip from shadows.ogg")</send>
 </trigger>
 <trigger
 group="combat"
 match="Your * annoys *"
 omit_from_output="y"
 send_to="14"
 sequence="1"
 >
 <send>
ppi.play(sdir.."/sounds/combat/armor/"..math.random(1,armor)..".ogg",0,50)
 
</send>
 </trigger>
 <trigger
 enabled="y"
 group="ranks"
 match="skl*good"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(good, "%1")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You hit the ground below!"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/misc/hit ground.ogg")</send>
 </trigger>
 <trigger
 match="* stands up."
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>
srand("combat/stand/"..mg,stand[mg])
</send>
 </trigger>
 <trigger
 enabled="y"
 match="[Exits: *]"
 omit_from_output="y"
 script="exitst"
 sequence="2"
 >
 </trigger>
 <trigger
 enabled="y"
 match="[Exits: * ] [Doors: * ]"
 omit_from_output="y"
 script="exitstd"
 sequence="1"
 >
 </trigger>
 <trigger
 enabled="y"
 match="moving[Exits: *]"
 omit_from_output="y"
 script="exitsm"
 sequence="2"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You jump to assist *!"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/combat/assist.ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="Asking * if you can join * group*"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/grouping/ask join.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* would like to join your group*"
 send_to="14"
 sequence="100"
 >
 <send>
Execute("history_add all=%1 would like to join your group.")
Execute("history_add group=%1 would like to join your group.")
Sound(sdir.."/sounds/grouping/joining.ogg")</send>
 </trigger>


 <trigger
 enabled="y"
 match="* starts following you."
 send_to="14"
 sequence="100"
 >
 <send>if not minion then
Sound(sdir.."/sounds/grouping/start following.ogg")
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You *, '*'"
 omit_from_output="y"
 send_to="14"
 sequence="2"
 >
 <send>if (gs("chist") == true) then
Execute("history_add all=you %1, %2")
Execute("history_add channels=you %1, %2")
end
if (gs("chans") ==1) then
Sound(sdir.."/sounds/channels/%1.ogg")
Note("You %1, %2")
elseif (gs("chans") ==2) then
Sound(sdir.."/sounds/channels/%1.ogg")
Execute("tts_note you %1, %2")
elseif (gs("chans") ==3) then
Sound(sdir.."/sounds/channels/%1.ogg")
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="wc - words:*"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You keep a steady eye on *"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/misc/target.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You *: *"
 omit_from_output="y"
 send_to="14"
 sequence="2"
 >
 <send>if (gs("chist") == true) then
Execute("history_add all=you %1, %2")
Execute("history_add channels=you %1, %2")
end

if (gs("chans") ==1) then
Sound(sdir.."/sounds/channels/%1.ogg")
Note("You %1: %2")
elseif (gs("chans") ==2) then
Sound(sdir.."/sounds/channels/%1.ogg")
Execute("tts_note you %1: %2")
elseif (gs("chans") ==3) then
Sound(sdir.."/sounds/channels/%1.ogg")
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You are surrounded with a pink halo."
script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/faerie fire you.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="(*) *: *"
 omit_from_output="y"
 send_to="14"
 sequence="101"
 >
 <send>name=string.lower("%2")
cname=string.lower("%1")
if (name == gs("me")) then
if (gs("chist") == true) then
Execute("history_add channels=%1 %2: %3")
Execute("history_add all=%1 %2: %3")

end
if (gs("chans") ==1) then
Sound(sdir.."/sounds/channels/"..cname..".ogg")
Note("%1 %2: %3")
elseif (gs("chans") ==2) then
Sound(sdir.."/sounds/channels/"..cname..".ogg")
Execute("tts_note %1 %2: %3")
elseif (gs("chans") ==3) then
Sound(sdir.."/sounds/channels/"..cname..".ogg")
end
else
Note("%1 %2: %3")
Execute("history_add channels=%1 %2: %3")
Execute("history_add all=%1 %2: %3")
Sound(sdir.."/sounds/channels/"..cname..".ogg")
end</send>
 </trigger>
 <trigger
 enabled="y"
 match="You knock the legs out from under * and * stumbles to the ground!"
script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>myspecial()
require "wait"
wait.make(function()
wait.time(0.3)
if (trip[terrain]~=nil) then

ppi.play(sdir.."/sounds/skills/trip/"..terrain.."/"..math.random(1,trip[terrain])..".ogg",0,50)
else
Sound(sdir.."/sounds/skills/you trip.ogg")
end
theygrunt()
end)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="3) Change required kills to win [currently *]"
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>3 required kills %1</send>
 </trigger>
 <trigger
 group="fishing"
 match="You land *, holy cow it's big!"
script="mgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/misc/fishbig.ogg")
if (gs("donfish") == true) then
PSend("donate fish")
end</send>
 </trigger>
 <trigger
 enabled="y"
 match="4) Change max players allowed [currently *]"
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>4 max players %1</send>
 </trigger>
 <trigger
 enabled="y"
 match="^\( \w+\)(\w+) is resting here\.$"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(players, "%1 resting")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You back away from * and get out of combat range."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/combat/stopmelee.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="5) Allow grouping [currently *]"
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>5 allow grouping %1</send>
 </trigger>
 <trigger
 enabled="y"
 match="^\( \w+\)*(\w+) is here\.$"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(players, "%1")</send>
 </trigger>
 <trigger
 group="combat"
 match="You bash full tilt into *"
script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>myspecial()
require "wait"
wait.make(function()
wait.time(0.4)
ppi.play(sdir.."/sounds/skills/bash2.ogg",0,50)
theygrunt()
end)
Note("full tilt!")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* but atempt to cast it anyway."
 send_to="14"
 sequence="100"
 >
 <send>casting=""</send>
 </trigger>
 <trigger
 enabled="y"
 match="6) Boot players from arena when killed [currently *]"
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>6 recall players when killed %1</send>
 </trigger>
 <trigger
 enabled="y"
 match="^\( \w+\)*(\w+) is resting here\.$"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(players, "%1 resting")</send>
 </trigger>
 <trigger
 group="combat"
 match="You bash headfirst into *"
script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>myspecial()
require "wait"
wait.make(function()
wait.time(0.4)
ppi.play(sdir.."/sounds/skills/bash6.ogg",0,50)
theygrunt()
end)
Note("headfirst.")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* catches you with your hands in * pockets!"
script="mgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/thief/caught pickpocket.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="7) Allow clan members to kill each other [currently *]"
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>7 allow same clan embers to kill each other %1</send>
 </trigger>
 <trigger
 enabled="y"
 match="^\( \w+\)\*(\w+) is here, fighting .*\.$"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(players, "%1 fighting")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* circles at a distance, but does not approach."
script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/turn/target.ogg")
Sound(sdir.."/sounds/skills/turn/repel.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="^\( \w+\)\*(\w+) is here, sound asleep\.$"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(players, "%1 sleeping")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You could kill * quite easily."
script="mgag"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 group="combat"
 match="* disarms you and sends your weapon flying!"
script="cgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/combat/disarmed.ogg")
if (gs("tts") == true) then
Execute("tts_interrupt %1 disarms you!")
else
Note("%1 disarms you and sends your weapon flying!")
end</send>
 </trigger>
 <trigger
 match="* disarms * and sends * weapon flying!"
group="group"
 omit_from_output="y"
 send_to="14"
 sequence="101"
 >
 <send>
if (kskills["trip"]==1) then
hitting="trip"
end
if (kskills["bash"]==1) then
hitting="bash"
end
if (kskills["kick"]==1) then
hitting="kick"
end
</send>
 </trigger>

 <trigger
 enabled="y"
 match="You want to cast the spell where?"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/notifications/command wrong.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You couldn't find it."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/items/can't find item.ogg")</send>
 </trigger>
 <trigger
 group="combat"
 match="* dodges your attack."
script="cgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>counters.theydodge=counters.theydodge+1
if (mg=="male") then
drnd = math.random(1, mdodge)
elseif (mg=="female") then
drnd = math.random(1, fdodge)
elseif (mg=="neuter") then
drnd = math.random(1,mdodge)
end
Sound(sdir.."/sounds/combat/dodge/"..mg.."/"..drnd .. ".ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You wear *."
 omit_from_output="y"
 send_to="14"
 sequence="101"
 >
 <send>checkstats()
Sound(sdir.."/sounds/wear/feet.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You wear * on your * hand."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>checkstats()
Sound(sdir.."/sounds/wear/ring.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You start using * as a shield."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>checkstats()
Sound(sdir.."/sounds/wear/shield.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You wear * about your body."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>checkstats()
Sound(sdir.."/sounds/wear/about_body.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You guide the spell directly toward *"
script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/frost3.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You create a * crystal spear and send it hurtling *"
script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>myspecial()
require "wait"
wait.make(function()
wait.time(0.4)
ppi.play(sdir.."/sounds/spells/crystal spear.ogg",0,50)
theygrunt()
end)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You wear * around your left wrist."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>checkstats()
Sound(sdir.."/sounds/wear/wrist2.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Inactivity disconnect in two ticks."
 send_to="14"
 sequence="100"
 >
 <send>Execute("afk idle")
Sound(sdir.."/sounds/misc/inactivity.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You happen to find * gold coins, how fortunate!"
script="mgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>pg=tonumber(%1)
counters.steal=counters.steal+pg
Note(pg .." gold.")
if (pg&lt;=10) then
Sound(sdir.."/sounds/skills/pickpocket/2.ogg")
end
if (pg&gt;10) and (pg&lt;=50) then
Sound(sdir.."/sounds/skills/pickpocket/1.ogg")
end
if (pg&gt;50) and (pg&lt;=70) then
Sound(sdir.."/sounds/skills/pickpocket/6.ogg")
end
if (pg&gt;70) and (pg&lt;=100) then
Sound(sdir.."/sounds/skills/pickpocket/3.ogg")
end
if (pg&gt;100) and (pg&lt;=150) then
Sound(sdir.."/sounds/skills/pickpocket/5.ogg")
end
if (pg&gt;150) then
Sound(sdir.."/sounds/skills/pickpocket/4.ogg")
end</send>
 </trigger>
 <trigger
 enabled="y"
 match="You create and magically throw bolts of ice at *"
script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
myspecial()
require "wait"
wait.make(function()
wait.time(0.4)
ppi.play(sdir.."/sounds/spells/icebolt.ogg",0,50)
theygrunt()
end)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="Gaping wounds and bruises magically appear on *!"
script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
myspecial()
require "wait"
wait.make(function()
wait.time(0.4)
ppi.play(sdir.."/sounds/spells/cause crit.ogg",0,50)
theygrunt()
end)
</send>
</trigger>
 <trigger
 enabled="y"
 match="A bluish cone of cold streams from your outstretched fingertips to engulf *!"
script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>myspecial()
ppi.play(sdir.."/sounds/spells/cone.ogg",0,50)
theygrunt()
</send>
 </trigger>
 <trigger
 enabled="y"
 match="A bluish cone of cold streams from you to hit *!"
script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>myspecial()
ppi.play(sdir.."/sounds/spells/cone.ogg",0,50)
theygrunt()
</send>
 </trigger>

 <trigger
 enabled="y"
 match="You wear * around your neck."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>checkstats()
Sound(sdir.."/sounds/wear/neck.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Item has effects as:"
 omit_from_output="y"
 sequence="100"
 >
<send>
</send>
 </trigger>
 <trigger
 enabled="y"
 group="ranks"
 match="skl*good*"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(good, "%1")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You have * experience points."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Note("You have "..ntrunk("%1").." experience.")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You create and magically throw shards of * crystal at *"
script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/shards.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Leader Members Levels Leader Rating Type"
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>leader members levels rating flags</send>
 </trigger>
 <trigger
 enabled="y"
 group="ranks"
 match="skl*moderate"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(moderate, "%1")</send>
 </trigger>
 <trigger
 enabled="y"
 match="fDate of character creation: *"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You have * experience."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Note("You have "..ntrunk("%1").." experience.")
</send>
 </trigger>
 <trigger
 enabled="y"
regexp="y"
 match="^(\w+) stops following you."
 send_to="14"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/grouping/stop following.ogg")
if #group&lt;2 then
grouped=0
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* begins to shiver and shake with cold!"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(GetInfo(67).."/sounds/spells/spectral cold.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="An ethereal hand appears and attacks * from behind!"
script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(GetInfo(67).."/sounds/spells/spectral hand.ogg")</send>
 </trigger>
 <trigger
 enabled="n"
 match="Press &lt;return&gt; or 'cont' to continue, anything else to quit..."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>require "wait"
wait.make(function()
wait.time(0.5);
Send("cont")
end)</send>
 </trigger>
 <trigger
 enabled="y"
 match="statNecr: *"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="The wood splinters and shatters, leaving behind only broken pieces."
 send_to="14"
 sequence="100"
 >
 <send>Sound(GetInfo(67).."/sounds/necromancer/wood woad death.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="The skeleton suddenly collapses into a heap, *"
 send_to="14"
 sequence="100"
 >
 <send>Sound(GetInfo(67).."/sounds/necromancer/skeleton warrior death.ogg")</send>
 </trigger>

 <trigger
 enabled="y"
 match="A skeletal mage suddenly collapses into a heap, then crumbles to a fine white dust before your eyes."
 send_to="14"
 sequence="100"
 >
 <send>Sound(GetInfo(67).."/sounds/necromancer/skeletal mage death.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="^kxwt_gdeath (.*)"
regexp="y"
 send_to="14"
 sequence="100"
omit_from_output="y"
 >
 <send>
Execute("history_add all=someone's %1 minion died!")
Execute("history_add minions=someone's %1 minion died!")
Sound(GetInfo(67).."/sounds/mdeath/grminion.ogg")
Sound(GetInfo(67).."/sounds/mdeath/%1.ogg")
table.insert(kxwts,"minion %1")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="^kxwt_ydeath (.*)"
regexp="y"
 send_to="14"
 sequence="100"
omit_from_output="y"
 >
 <send>
Execute("history_add all=%1 minion died!")
Execute("history_add minions=%1 minion died!")
Sound(GetInfo(67).."/sounds/mdeath/yourminion.ogg")
Sound(GetInfo(67).."/sounds/mdeath/%1.ogg")
if IsInTable(toreclay,"%1")==1 then
if gs("reclay")~=nil then
if gs("reclay")==true then
Execute("abort")
DoAfter(0.1,"c clay man")
end --reclay
end --reclay2
else
table.insert(kxwts,"minion %1")
end --minion if
</send>
 </trigger>
 <trigger
 enabled="y"
 match="The world suddenly seems grey and lifeless, with spirits always at the edge of your vision."
 send_to="14"
 sequence="100"
omit_from_output="y"
script="sgag"
 >
 <send>Sound(GetInfo(67).."/sounds/necromancer/dread portent.ogg")
rct["dread portent"]=nil
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You carefully extract one tooth and put it in your bag."
omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>teeth=teeth+1
if not gag.misc then Note("You carefully extract one of the teeth and put it in your bag.") end
Sound(GetInfo(67).."/sounds/necromancer/get teeth.ogg")
if counters.teeth==nil then
counters.teeth=1
else
counters.teeth=counters.teeth+1
end

</send>
 </trigger>
 <trigger
 enabled="y"
 match="You carefully extract one dragon tooth and put it in your bag."
omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.misc then Note("You carefully extract one dragon tooth and put it in your bag.") end
dteeth=dteeth+1
Sound(GetInfo(67).."/sounds/necromancer/get teeth.ogg")</send>
 </trigger>

 <trigger
 enabled="y"
 match="You sacrifice blood from the corpse of *, drawing power from it!"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.skills then Note("You sacrifice blood from the corpse of %1, drawing power from it!") end
Sound(GetInfo(67).."/sounds/necromancer/blood sac.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You shatter one of the teeth attempting to remove it."
omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if not gag.misc then Note("You shatter one of the teeth attempting to remove it.") end
Sound(GetInfo(67).."/sounds/necromancer/break teeth.ogg")
if counters.bteeth==nil then
counters.bteeth=1
else
counters.bteeth=counters.bteeth+1
end
</send>
 </trigger>

 <trigger
 enabled="y"
 match="No players visible out of * connected (max was *)."
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>No visible players.</send>
 </trigger>
 <trigger
 enabled="y"
 group="ranks"
 match="skl*moderate*"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(moderate, "%1")</send>
 </trigger>
 <trigger
 enabled="y"
 match="fFight string: *"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You have * new mudmail messag*"
 send_to="14"
 sequence="100"
 >
 <send>
Execute("history_add misc=You have %1 new email messages.")
Execute("history_add all=You have %1 new email messages.")
Sound(sdir.."/sounds/notifications/email.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="(FYI: * has just sent you a*)"
 send_to="14"
 sequence="100"
 >
 <send>
Execute("history_add all=%1 sent you an email.")
Execute("history_add misc=%1 sent you an email.")
Sound(sdir.."/sounds/notifications/newemail.ogg")</send>
 </trigger>

 <trigger
 enabled="y"
 match="* suddenly stabs you in the back!"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/combat/you are backstabbed.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="No-one in your group is currently in need of healing."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 group="ranks"
 match="skl*perfect"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(perfect, "%1")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* tells the clan, '*'"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Note("%1 tells the clan, %2")
Sound(sdir.."/sounds/channels/clan tell.ogg")
Execute("history_add clan=%1 tells the clan, %2")
Execute("history_add all=%1 tells the clan, %2")
</send>
 </trigger>
 <trigger
 group="fishing"
 match="You get a bite, but it swims free."
 script="mgag"
 omit_from_output="y"
 send_to="14"
 sequence="10"
 >
 <send>Sound(sdir.."/sounds/misc/fishescape.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 group="ranks"
 match="skl*perfect*"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>table.insert(perfect, "%1")</send>
 </trigger>
 <trigger
 enabled="y"
 match="skl*"
 omit_from_output="y"
keep_evaluating="y"
 sequence="1"
 >

 </trigger>

 <trigger
 enabled="y"
 match="You land on your enemy, putting all your weight behind your swing!"
 script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/leap2.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* tells the group, '*'"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Note("%1 tells the group, %2")
Sound(sdir.."/sounds/channels/group.ogg")
Execute("history_add group=%1 tells the group, %2")
Execute("history_add all=%1 tells the group, %2")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* tells the subgroup, '*'"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Note("%1 tells the subgroup, %2")
Sound(sdir.."/sounds/channels/subgroup.ogg")
Execute("history_add group=%1 tells the subgroup, %2")
Execute("history_add all=%1 tells the subgroup, %2")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* warns the group, '*'"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Note("%1 warns the group, %2")
Sound(sdir.."/sounds/channels/groupwarn.ogg")
Execute("history_add group=%1 warns the group, %2")
Execute("history_add all=%1 warns the group, %2")
</send>
 </trigger>

 <trigger
 group="fishing"
 match="You get a nibble on the line..."
 script="mgag"
 omit_from_output="y"
 send_to="14"
 sequence="10"
 >
 <send>Sound(sdir.."/sounds/misc/fishlinepull.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You land your roundhouse kick squarely on *"
 script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>myspecial()
require "wait"
wait.make(function()
wait.time(0.4)
ppi.play(sdir.."/sounds/skills/kick1.ogg",0,50)
theygrunt()
end)
</send>
 </trigger>
 <trigger

 match="* tells you, '*'"
group="telltriggers"
enabled="y"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Note("%1 tells you, %2")
if "%1" ~= "Soul Eater" then
Sound(sdir.."/sounds/channels/tell.ogg")
Execute("history_add tells=%1 tells you, %2")
Execute("history_add all=%1 tells you, %2")
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You get a bite, and after a little effort you manage to reel in *"
 script="mgag"
 omit_from_output="y"
 send_to="14"
 sequence="89"
 >
 <send>Sound(sdir.."/sounds/misc/fishcatch.ogg")
if (gs("donfish") == true) then
PSend("donate fish")
end</send>
 </trigger>
 <trigger
 enabled="y"
 match="You learn from your mistakes, and become more adept at *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Note("More adept at %1")
Execute("history_add misc=adept at %1")
Execute("history_add all=adept at %1")
counters.betterats=counters.betterats+1
better_at()
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You become better at *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>better_at()
counters.betterats=counters.betterats+1
Execute("history_add misc=better at %1")
Execute("history_add all=better at %1")
Note("better at %1")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You have completed the achievement: *"
 send_to="14"
 sequence="1"
 >
 <send>Sound(sdir.."/sounds/notifications/achievement.ogg")
Execute("history_add misc=You have completed the achievement %1")
Execute("history_add all=You have completed the achievement %1")
</send>
 </trigger>

 <trigger
 enabled="y"
 match="You let out a mighty roar as the blood fever takes hold of you!"
 script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/berserk on.ogg")
berserk=1</send>
 </trigger>
 <trigger
 enabled="y"
 match="A ball of blue white lightning crackles gleefully as it fries *"
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/ball lightning.ogg")</send>
 </trigger>
 <trigger
 group="combat"
 match="* leaping attack misses you*"
 omit_from_output="y"
 send_to="14"
 sequence="98"
 >
 <send>Sound(sdir.."/sounds/combat/weapon sounds/they miss leap.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You have sudden insight, and become much better at *"
 send_to="14"
 sequence="100"
 >
 <send>better_at()
Execute("history_add misc=much better at %1")
Execute("history_add all=much better at %1")
counters.betterats=counters.betterats+1
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You become much better at *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>better_at()
Execute("history_add misc=You become much better at %1")
Execute("history_add all=You become much better at %1")
counters.betterats=counters.betterats+1
Note("much better at %1")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You lose a bit of your knowledge of *"
 send_to="14"
 sequence="100"
 >
 <send>
Execute("history_add all=when you died, you lost knowledge of %1.")
Execute("history_add misc=when you died, you lost knowledge of %1.")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="A ball of light flies idly in circles around your head."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You begin chanting and cast a powerful spell..."
 script="sgag"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="A ball of light forms near * head."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/continual light.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="^area: (.*?)gold: (\w+)mana: (\w+)max (\w+)cond: (.*?)hit: (\w+)max (\w+)terrain: (.*?)mv\: (\w+)max\: (\w+)dt: (.*?)xp: (.*)$"
 omit_from_log="y"
 omit_from_output="y"
 regexp="y"
 sequence="1"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You begin digging at an iron vein..."
 script="mgag"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="* doesn't appear to be carrying anything of value."
 script="mgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/pickpocket/nothing.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="A beautiful web of blazing * fire bursts forth from your hands and hits *, setting * on fire!"
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>myspecial()
Sound(sdir.."/sounds/spells/fireweb.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="^kxwt_fighting (-{0,1}\d+) (\w+) (.*)"
 omit_from_log="y"
 omit_from_output="y"
 regexp="y"
 script="fprompt"
 sequence="1"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You begin healing *"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/healing touch1.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* doesn't appear to have anything interesting to say."
 script="mgag"
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>%1 has nothing to say.</send>
 </trigger>
 <trigger
 enabled="y"
 match="A blazing ring of * fire forms around you as you complete the spell!"
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>myspecial()
Sound(sdir.."/sounds/spells/firefield.ogg")</send>
 </trigger>
 <trigger
 group="lvl"
 match="^lvlCleric\s*\w+\s*(\w+)"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>cleric=%1</send>
 </trigger>
 <trigger
 enabled="y"
 match="You wear * around your right wrist."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>checkstats()
Sound(sdir.."/sounds/wear/wrist1.ogg")</send>
 </trigger>
 <trigger
 group="lvl"
 match="^lvlMage\s*\w+\s*(\w+)"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>mage=%1</send>
 </trigger>
 <trigger
 match="You cut * from *"
 sequence="100"
 >
 <send>donate meat
donate skin</send>
 </trigger>
 <trigger
 group="combat"
 match="* easily moves out of the way of your poorly placed kick."
 omit_from_output="y"
 script="skgag"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/kick/kickdodge.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You wear * for protection of your torso."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>checkstats()
Sound(sdir.."/sounds/wear/on_body.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You detect nothing magical about *"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/detect nothing magical.ogg")</send>
 </trigger>
 <trigger
 group="combat"
 match="* gets in a good hit as * quickly gets out of your way."
 script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/bash5.ogg")
Note("gets in a good hit.")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You wear * on your arms."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>checkstats()
Sound(sdir.."/sounds/wear/arms.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="fGround string: *"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You dig for a while and find a block of stone."
 send_to="14"
 sequence="100"
 >
 <send>
Execute("put stone disc")
Sound(sdir.."/sounds/mining/find stone.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Your pickaxe breaks."
 send_to="14"
group="mining"
 sequence="100"
 >
 <send>
</send>
 </trigger>

 <trigger
 enabled="y"
 match="You wear * on your hands."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>checkstats()
Sound(sdir.."/sounds/wear/hands.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You dig for a while and find a lump of clay."
 send_to="14"
 sequence="100"
group="mining"
 >
 <send>
Sound(sdir.."/sounds/mining/find clay.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* heroically jumps to the aid of *"
 script="mgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Note("%1 assists %2")
bfight("%2")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You wear * on your head."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>checkstats()
Sound(sdir.."/sounds/wear/head.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Overall difficulty: *"
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>it's a %1.</send>
 </trigger>
 <trigger
 enabled="y"
 match="You dig for a while and find a pile of iron ore."
 send_to="14"
 sequence="100"
group="mining"
 >
 <send>
Sound(sdir.."/sounds/MINING/find iron.ogg")</send>
 </trigger>
 <trigger
 group="combat"
 match="* hits, but * no * you."
 omit_from_output="y"
 send_to="14"
 sequence="1"
 >
 <send>
ppi.play(sdir.."/sounds/combat/armor/"..math.random(1,armor)..".ogg",0,-50)
 counters.absorb=counters.absorb+1
</send>
 </trigger>
 <trigger
 enabled="y"
 match="PANIC!! +You couldn't escape!"
 script="mgag"
regexp="y"
ignore_case="y"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/combat/couldn't flee.ogg")</send>
 </trigger>
 <trigger
 group="combat"
 match="* tries to disarm you, but fails."
 script="cgag"
 omit_from_output="y"
 send_to="14"
 sequence="9"
 >
 <send>
Sound(sdir.."/sounds/combat/weapon sounds/they fail disarm.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="^kxwt_mdeath"
omit_from_output="y"
regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>
deadmob=1
stealnext=false
DoAfterSpecial(1,'deadmob=0',12)
EnableGroup("combat", 0)
require "wait"
wait.make(function()
if pose~="stand" then 
PSend("stand")
end
if (gs("randoms")==true) then
if grouped==0 then
Execute("licr")
else
if (gs("grandoms")==true or leader==gs("me")) then
Execute("licr")
end --if group randoms
end --if grouped
end
wait.time(0.2)
if (gs("musictype")==2) and (gs("music")==true) then
if nfight==1 then
Sound("stop="..sdir.."/sounds/music/2/dying.ogg")
Sound(sdir.."/sounds/music/2/died.ogg")
end
end
gclear()
gfighting=0
if (job=="healer") and (gname~=nil) then
if (kskills["healingtouch"]==1) then
PSend("heal "..gname)
end
end
counters.kills=counters.kills+1
if (pose~="stand") then
PSend("stand")
end
if soulstone then
soulstone=false
if (trip[terrain]~=nil) then
ppi.play(sdir.."/sounds/skills/trip/"..terrain.."/"..math.random(1,trip[terrain])..".ogg",0,0)
end
else
wait.time(0.7)
if (mg=="male") then
Sound(sdir.."/sounds/combat/deaths/male/"..math.random(1,mdeaths)..".ogg")
end
if (mg=="female") then

Sound(sdir.."/sounds/combat/deaths/female/"..math.random(1,fdeaths)..".ogg")
end
if (mg=="neuter") then
Sound(sdir.."/sounds/combat/deaths/neuter/"..math.random(1,ndeaths)..".ogg")
end
end
if (trip[terrain]~=nil) then
ppi.play(sdir.."/sounds/skills/trip/"..terrain.."/"..math.random(1,trip[terrain])..".ogg",0,0)
end
wait.time(2)
if (gs("playquotes")==true) then
Sound(sdir.."/sounds/combat/pkmsgs/" .. math.random(1,pkmsg).. ".ogg")
end
end)</send>
 </trigger>
 <trigger
 enabled="y"
 match="Players listening to channel * are:"
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>players listening are:</send>
 </trigger>
 <trigger
 group="combat"
 match="* tries to trip you, *"
 script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/they fail to trip you.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* is engulfed in flames!"
 script="sgag"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="Some of the crystal shards at your feet dissolve and vanish."
 script="sgag"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 group="combat"
 match="* trips you, sending you sprawling!"
 script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>theyspecial()
require "wait"
wait.make(function()
wait.time(0.3)
if (trip[terrain]~=nil) then
ppi.play(sdir.."/sounds/skills/trip/"..terrain.."/"..math.random(1,trip[terrain])..".ogg",0,-50)
else
Sound(sdir.."/sounds/skills/you trip.ogg")
end
yougrunt()
end)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* is fully healed."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/fully healed.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="( 3)A large bulletin board is hovering above the ground here."
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>A board is here for posting.</send>
 </trigger>
 <trigger
 enabled="y"
 match="You make an odd *, then look at * through your interlocked fingers."
 script="sgag"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="* turns and attacks you!"
 script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/turn/target.ogg")
Sound(sdir.."/sounds/skills/turn/attack.ogg")</send>
 </trigger>
 <trigger
 group="combat"
 match="* annoys you."
 omit_from_output="y"
 send_to="14"
 sequence="99"
 >
 <send>
ppi.play(sdir.."/sounds/combat/armor/"..math.random(1,armor)..".ogg",0,-50)
 counters.absorb=counters.absorb+1</send>
 </trigger>
 <trigger
 enabled="y"
 match="You may also train practices, at a cost of 8 million exp each."
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>practice 8mill xp</send>
 </trigger>
 <trigger
 enabled="y"
 match="* unlocks *"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/doors/unlock.ogg")</send>
 </trigger>
 <trigger
 group="combat"
 match="* leaping attack * you*"
 send_to="14"
 sequence="99"
 >
 <send>Sound(sdir.."/sounds/combat/weapon sounds/they leap.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* looks you over and tells you, 'I can teach you *"
 omit_from_output="y"
 sequence="99"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You buy *"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/misc/buy something.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You miss *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/combat/weapon swings/slice/"..math.random(1,swings["slice"])..".ogg")
counters.theydodge=counters.theydodge+1
Note("You miss.")</send>
 </trigger>
 <trigger
 enabled="y"
 match="A cloud of choking green gas billows forth from your hand to engulf *"
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/noxious cloud.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* *, 'Retreat! Retreat!!!'"
send_to="14"
 script="mgag"
 omit_from_output="y"
 sequence="99"
 >
<send>
if pose~="stand" then
Send("stand")
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You can't carry that many items."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if (carryblock==1) then
else
Sound(sdir.."/sounds/items/arms full.ogg")
end
require "wait"
wait.make(function()
carryblock=1
carrycount=carrycount+1
wait.time(1)
if (carrysay==0) then
carrysay=1
Note("You can't carry any more, "..carrycount.." items left.")
wait.time(3)
carrysay=0
end
carryblock=0
carrycount=0
end)</send>
 </trigger>
 <trigger
 enabled="y"
 match="You move to defend yourself from *"
 script="cgag"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="A crackling blue-white glow suddenly surrounds your hands."
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/shocking grasp on.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You lightly touch * hands, and a crackling blue-white glow surrounds them."
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/shocking grasp on.ogg")</send>
 </trigger>

 <trigger
 group="lvl"
 match="^lvlThief\s*\w+\s*(\w+)"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>thief=%1</send>
 </trigger>
 <trigger
 enabled="y"
 match="You can't carry that much weight."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>require "wait"
wait.make(function()
Sound(sdir.."/sounds/items/can't lift weight.ogg")
carryblock=1
wait.time(2)
carryblock=0
end)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="A pale blue glow surrounds *, then flows outward to surround you."
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/refresh area.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="A golden glow surrounds *, then flows outward to surround you."
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/refresh area.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="A golden glow surrounds you, then flows outward."
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/refresh area.ogg")</send>
 </trigger>
 <trigger
 group="lvl"
 match="^lvlWarrior\s*\w+\s*(\w+)"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>warrior=%1</send>
 </trigger>
 <trigger
 enabled="y"
 match="You can't seem to figure out how it works."
 script="mgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/doors/fail pick1.ogg")
if (gs("autopick") == true) then
Execute("pick " ..pick)
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* glows with a bright light!"
 
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>%1 is sanced.</send>
 </trigger>
 <trigger
 enabled="y"
 match="A pale red glow suddenly surrounds your hands."
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/burning hands on.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You lightly touch * hands, and a pale red glow surrounds them."
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/burning hands on.ogg")</send>
 </trigger>

 <trigger
 enabled="y"
 match="You cast refresh on *"
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/refresh someone.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* goes berserk in battle!"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/berserk other.ogg")
if (job=="hitter") then
PSend("berserk")
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="A shower of * sparks suddenly engulfs *"
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
myspecial()
require "wait"
wait.make(function()
wait.time(0.4)
 
Sound(sdir.."/sounds/spells/shower of sparks.ogg")
theygrunt()
end)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="scr:You currently gain * hitpoints, * mana, and * movement while sitting."
 omit_from_log="y"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
hpregen =tonumber(%1)
mregen=tonumber(%2)
mvregen=tonumber(%3)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* gold deposited into your account."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/gold/deposit.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You wear * on your waist."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>checkstats()
Sound(sdir.."/sounds/wear/waist.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="scr:You currently gain * hitpoints, * mana, and * movement while sleeping."
 omit_from_log="y"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
<send>hpregen =tonumber(%1)
mregen=tonumber(%2)
mvregen=tonumber(%3)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You disarm * and send * weapon flying!"
 script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Note("You disarm %1!")
counters.disarm=counters.disarm+1
Sound(sdir.."/sounds/combat/you disarm.ogg")
if (grouped==1) and (job=="hitter") then
if (kskills["trip"]==1) then
hitting="trip"
end
if (kskills["bash"]==1) then
hitting="bash"
end
if (kskills["kick"]==1) then
hitting="kick"
end
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* gold withdrawn from your account."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/gold/withdraw.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You wear * to protect your legs."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>checkstats()
Sound(sdir.."/sounds/wear/legs.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You do not see that character here."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/notifications/command wrong.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* gossips, '*'"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Execute("history_add channels=%1 gossips, %2")
Execute("history_add all=%1 gossips, %2")
Sound(sdir.."/sounds/channels/gossip.ogg")
Note("%1 gossips, %2")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* chats, '*'"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Execute("history_add channels=%1 chats, %2")
Execute("history_add all=%1 chats, %2")
Sound(sdir.."/sounds/channels/chat.ogg")
Note("%1 chats, %2")</send>
 </trigger>
 <trigger
 enabled="y"
 match="(friend) * posted: *"
 send_to="14"
 sequence="100"
 >
 <send>
if "%1"~=gs("me") then
Execute("history_add channels=%1 posted: %2")
Execute("history_add all=%1 posted: %2")
end
Sound(sdir.."/sounds/channels/friend.ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* jokes, '*'"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Execute("history_add channels=%1 jokes, %2")
Execute("history_add all=%1 jokes, %2")
Sound(sdir.."/sounds/channels/joke.ogg")
Note("%1 jokes, %2")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You do not seem to have that item."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/items/can't find item.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You wield *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
checkstats()
Sound(sdir.."/sounds/combat/wield/"..math.random(1,wield)..".ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Something REALLY big catches your line, and breaks it!"
 script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/misc/fishsnap.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You dodge * attack."
 script="cgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>counters.dodge=counters.dodge+1
if (gender=="male") then
Sound(sdir.."/sounds/combat/dodge/male/" ..math.random(1,mdodge) .. ".ogg")
end
if (gender=="female") then

Sound(sdir.."/sounds/combat/dodge/female/" .. math.random(1,fdodge) .. ".ogg")
end
if (gender=="neuter") then

Sound(sdir.."/sounds/combat/dodge/male/" .. math.random(1,mdodge) .. ".ogg")
end
Note("You dodge.")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* is mortally wounded, and will die soon if not aided."
 script="mgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>require "wait"
if stealnext then
Execute("c soulsteal")
stealnext=false
end
wait.make(function()
if (mort==0) then
mort=1
if (mg=="male") then
Sound(sdir.."/sounds/combat/mort/male/"..math.random(1,mmort)..".ogg")
end
if (mg=="female") then
Sound(sdir.."/sounds/combat/mort/female/"..math.random(1,fmort)..".ogg")
end
if (mg=="neuter") then
Sound(sdir.."/sounds/combat/mort/neuter/"..math.random(1,nmort)..".ogg")
end
if (IsInTable(group, "%1")==1) then
Sound(GetInfo(67).."/sounds/grouping/mort.ogg")
Execute("tts_interrupt %1 is mortally wounded!")
Execute("history_add all=%1 is mortally wounded!")
Execute("history_add group=%1 is mortally wounded!")
end
wait.time(2)
mort=0
end
end)</send>
 </trigger>
 <trigger
 enabled="y"
 match="You would be challenged by * but think you could win the battle."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="Stat Current Cost (in practices)"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You don't have enough mana."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/out of mana.ogg")
if (grouped==1) then
if gs("swarn") then
if (safety~=1) then
PSend("warn ~ROOM")
safety=1
DoAfterSpecial(3,"safety=0",12)
end
end
end
if (job=="blaster") or (job=="healer") or (job=="healblast") or (job=="areaman") then
EnableTimer("grtimer", false)
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* is on fire!"
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/fireweb fire.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="That really did hurt!"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/combat/that really did hurt!.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* is ready to go, but you would be left behind!"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if (gs("tts") == true) then
Execute("tts_interrupt %1 is ready to go!")
else
Note("%1 is ready to go, but you would be left behind!")
end
Sound(sdir.."/sounds/notifications/alert1.ogg")
if (pose~="stand") then
PSend("stand")
end
if k_move&lt;=10 then
if kspells["refresh"]==1 then
Send("c refresh")
end --know ref
end --move low
</send>
 </trigger>
 <trigger
 enabled="y"
 match="The * is closed."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/doors/it is closed.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="fTime of last save: *"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="* is surrounded by a fuzzy pink outline*"
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send> Sound(sdir.."/sounds/spells/faerie fire someone.ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="A billowing purple cloud flows forth from your outstretched hand!"
 script="sgag"
omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send> Sound(sdir.."/sounds/spells/faerfog.ogg")</send>
 </trigger>

 <trigger
 enabled="y"
 match="The air snaps as * abruptly disappears."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/someone summoned out.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* is surrounded by a white aura."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/sanc on.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* tells you, 'The following items are available for sale at this time'"
 omit_from_output="y"
 sequence="99"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You open *"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/doors/open.ogg")
if mtime then
Note("To add this door to your map, type zmap door or zmd open doorname and optional direction if necessary. Do it before you move! Example: zmd open gates n")
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* warns the group, 'I am using mushclient-z which can be downloaded from *"
 omit_from_output="y"
 sequence="99"
 >
 </trigger>
 <trigger
 enabled="y"
 match="To see a specific item in detail, *"
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>End of list.</send>
 </trigger>
 <trigger
 enabled="y"
 match="You order * to *"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="* yells, 'Retreat! Retreat!!!'"
 omit_from_output="y"
 sequence="99"
 >
 </trigger>
 <trigger
 enabled="y"
 match="To use a waypoint, give its number, for example 'waypoint *'."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You parry * attack."
 script="cgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>counters.parry=counters.parry+1

ppi.play(sdir.."/sounds/combat/parry/" .. math.random(1, tparry) .. ".ogg",0,-50)
 
</send>
 </trigger>
 <trigger
 enabled="y"
 keep_evaluating="y"
 match="* yells, *"
 send_to="14"
 sequence="99"
 >
 <send>Sound(sdir.."/sounds/channels/yell.ogg")
Execute("history_add channels=%1 yells, %2")
Execute("history_add all=%1 yells, %2")
</send>
 </trigger>
 <trigger
 group="combat"
 match="You catch * a little off center with your bash!"
 script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>myspecial()
require "wait"
wait.make(function()
wait.time(0.4)
ppi.play(sdir.."/sounds/skills/bash3.ogg",0,50)
theygrunt()
end)
Note("off center.")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="Trying to enable echo."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="* places * in the back of *."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/backstab/4.ogg")
bfight("%1")
</send>
 </trigger>

 <trigger
 enabled="y"
 match="You place * in the back of *."
 script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/backstab/4.ogg")</send>
 </trigger>
 <trigger
 group="frostbite"
 match="A white line of frost * away from your staff*"
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/frost2.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Object is: "
 omit_from_output="y"
 sequence="99"
 >
 </trigger>
 <trigger
 enabled="y"
 match="Your fingers quickly become more nimble as magic flows through you."
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/dex on.ogg")
PSend("show dex")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You circle behind * and find a perfect opportunity!"
 script="skgag"
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>freak 2!</send>
 </trigger>
 <trigger
 enabled="y"
 match="You pray to * for transportation..."
 script="mgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
if (map==1) then
AppendToNotepad("map", "recall;")
end
EnableGroup("combat",0)
Sound(sdir.."/sounds/misc/recall.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You pray to * for transportation!"
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
if (map==1) then
AppendToNotepad("map", "recall;")
end
EnableGroup("combat",0)
Sound(sdir.."/sounds/spells/word.ogg")</send>
 </trigger>
 <trigger
 match="^Affects\: \s*(.*) by \s*(.*)$"
 omit_from_output="y"
enabled="y"
 ignore_case="y"
regexp="y"
 sequence="100"
send_to="14"
 >
 <send>
if (gs("shortid")==1) then
Note("%1 by %2")
return
end
if (gs("shortid")==3) then
Note("%1 by %2")
end
if affs["%1"]~=nil then
iaffects=iaffects.." "..affs["%1"].." %2"
else
iaffects=iaffects.." %1 %2"
end
</send>
 </trigger>

 <trigger
 enabled="y"
match="script:You have * of * hp, * of * mana, and * of * move."
 omit_from_log="y"
 omit_from_output="y"
 script="regenscr"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="Your force shield slowly dissipates."
 send_to="14"
 sequence="100"
omit_from_output="y"
script="sgag"
 >
 <send>
Sound(sdir.."/sounds/spells/shield off.ogg")
rc("shield")
if kspells["shield"]==1 then
rct["shield"]=true
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You climb into your hiding spot."
 script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/hide.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Type: MAGIC Composition: * Ac-apply: *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Note("This magical armor gives %2 ac")
ac=" ac %2 "
</send>
 </trigger>
 <trigger
 group="fishing"
 match="After a big fight, you reel in *"
 script="mgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if (gs("donfish") == true) then
PSend("donate fish")
end
Sound(sdir.."/sounds/misc/fishcatch.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="^tnpYou have (\w+) experience and \w+ total levels in your .* classes.$"
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>exp=%1</send>
 </trigger>
 <trigger
 enabled="y"
 match="Your form shifts slightly, then separates from where your body actually is."
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>rct["displacement"]=nil
Sound(sdir.."/sounds/spells/displacement.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Your feet lift off the ground."
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>rct["fly"]=nil
Sound(sdir.."/sounds/spells/fly.ogg")</send>
 </trigger>

 <trigger
 enabled="y"
 match="You close *"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/doors/close.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* growls at you, warning you away."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if (gs("tts") == true) then
world.Execute ("tts_interrupt %1 growls at you.")
else
Note("%1 growls at you, warning you away.")
end</send>
 </trigger>
 <trigger
 enabled="y"
 match="Alas, you cannot go that way."
 script="mgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/movement/wrong exit/"..terrain..".ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="^tnpYou can train to get a practice, at a cost of (\d+) experience each."
 omit_from_output="y"
 regexp="y"
 send_to="14"
 sequence="100"
 >
 <send>pcost=%1
prac=exp/pcost*100
prac=tostring(prac)
dot=string.find(prac, "%p")
dot2=dot+1
prac=string.sub(prac, 1,dot)..string.sub(prac,dot2,dot2)
Note("you are "..prac.." percent to training a prac.")
if (gs("praccing")==true) then
exptnl=pcost
classtnl="practice"
end
</send>
 </trigger>
 <trigger
 group="combat"
 match="Your full circle kick plants a foot right where it should be."
 script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
myspecial()
require "wait"
wait.make(function()
wait.time(0.4)
ppi.play(sdir.."/sounds/skills/kick3.ogg",0,50)
theygrunt()
end)
Note("full circle!")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You could kill * naked and weaponless."
 script="mgag"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="* has already been stripped * there is nothing edible left."
 sequence="100"
 >
 <send>sac corpse
stand</send>
 </trigger>
 <trigger
 enabled="y"
 match="A white bolt of lightning leaps from you to *!"
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/lightning bolt.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="a Halloween Pumpkin carried by *"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 ignore_case="y"
 match="* has been killed!"
 send_to="14"
 sequence="100"
 >
 <send>if (IsInTable(group, "%1")==1) then
Sound(sdir.."/sounds/combat/die group.ogg")
Execute("history_add group=%1 has died!")
Execute("history_add all=%1 has died!")
else

Sound(sdir.."/sounds/combat/pkmsgs/" ..math.random (1, pkmsg) .. ".ogg")
end
Sound(sdir.."/sounds/combat/die player.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="a Halloween Pumpkin in (object) a pine crate for holiday events."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You don't know that spell at all, but attempt to cast it anyway."
 send_to="14"
 sequence="100"
 >
 <send>casting=""</send>
 </trigger>
 <trigger
 enabled="y"
 match="* has entered the game."
group="friendsnotify"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/channels/enter.ogg")
Execute("history_add friends=%1 logged in.")
Execute("history_add all=%1 logged in.")
</send>

 </trigger>
 <trigger
 enabled="y"
 match="You would feel really bad about killing * as you are so much higher level."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You don't see any of your group members here to split the gold with."
 omit_from_output="y"
 sequence="100"
>
 </trigger>
 <trigger
 enabled="y"
 match="* has joined pk arena *"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/combat/arena/someone joins arena.ogg")
Execute("history_add arena=%1 joined the arena.")
Execute("history_add all=%1 joined the arena.")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* has cowardly recalled from arena *"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/combat/arena/someone joins arena.ogg")
Execute("history_add all=%1 recalled from the arena.")
Execute("history_add arena=%1 recalled from the arena.")
</send>
 </trigger>
 <trigger
 group="combat"
 match="Your * hits, but *"
 omit_from_output="y"
 send_to="14"
 sequence="1"
 >
 <send>
ppi.play(sdir.."/sounds/combat/armor/"..math.random(1,armor)..".ogg",0,50)
 
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You don't see anyone named that here."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/notifications/command wrong.ogg")</send>
 </trigger>
 <trigger
 group="combat"
 match="Your * hits, but *"
 omit_from_output="y"
 send_to="14"
 sequence="1"
 >
 <send>
ppi.play(sdir.."/sounds/combat/armor/"..math.random(1,armor)..".ogg",0,50)

</send>
 </trigger>
 <trigger
 enabled="y"
 match="The earth trembles and shivers beneath you!"
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/earthquake.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="gendYou are *, and currently * feet, * inches tall."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>gender="%1"</send>
 </trigger>
 <trigger
 enabled="y"
 match="* is surrounded with a dark black aura."
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>%1 is darkened.</send>
 </trigger>
 <trigger
 group="combat"
 match="Your arrow narrowly misses *!"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/combat/arrow miss.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="The fever passes and you regain your senses*to find your target no longer before you."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/berserk pass.ogg")
berserk=0</send>
 </trigger>
 <trigger
 enabled="y"
 match="lvl"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You drop *"
 send_to="14"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/items/drop/" .. math.random(1,drops)..".ogg")</send>
 </trigger>
 <trigger
 group="combat"
 match="* knocks your legs out from under you!"
 script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
theyspecial()
require "wait"
wait.make(function()
wait.time(0.3)
if (trip[terrain]~=nil) then

ppi.play(sdir.."/sounds/skills/trip/"..terrain.."/"..math.random(1,trip[terrain])..".ogg",0,-50)
else
Sound(sdir.."/sounds/skills/you trip.ogg")
end
yougrunt()
end)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="The fever passes, leaving you exhausted and still in battle!"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/berserk interrupted OMV.ogg")
berserk=0</send>
 </trigger>
 <trigger
 enabled="y"
 match="lvlClass Current Cost to level"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>EnableGroup("lvl", 1)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* laughs mercilessly at you."
 send_to="14"
 sequence="1"
 >
 <send>Sound(sdir.."/sounds/skills/turn/target.ogg")
Sound(sdir.."/sounds/skills/turn/laugh.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="The flames pass silently through you without any effect."
 script="sgag"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="lvlYou must specify which class to level - for example 'level cleric'"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 group="stab"
 match="* looks mildly annoyed as you place *"
 script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/backstab/6.ogg")
EnableGroup("stab", 0)
Note("mildly annoyed.")</send>
 </trigger>
 <trigger
 enabled="y"
 match="* looks mildly annoyed as * places *"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/backstab/6.ogg")
bfight("%2")
</send>
 </trigger>

 <trigger
 enabled="y"
 match="The following items are currently up for grabs:"
 script="mgag"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="* makes a strange sound as * places * in * back."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/backstab/3.ogg")
bfight("%2")
</send>
 </trigger>

 <trigger
 enabled="y"
 group="stab"
 match="* makes a strange noise as you place * in * back."
 script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/backstab/3.ogg")
EnableGroup("stab", 0)
Note("strange noise.")</send>
 </trigger>
 <trigger
 enabled="y"
 match="The mud school trainer says, '*'"
 omit_from_output="y"
 sequence="99"
 >
 </trigger>
 <trigger
 enabled="y"
 match="* brailles: *"
 send_to="14"
 sequence="1"
 >
 <send>
Execute("history_add channels=%1 brailles: %2")
Execute("history_add all=%1 brailles: %2")
Sound(sdir.."/sounds/channels/braille.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You pray to your god for transportation!"
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
if (map==1) then
AppendToNotepad("map", "recall;")
end
Sound(sdir.."/sounds/spells/word.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="The white aura around your body fades."
 send_to="14"
 sequence="99"
 >
 <send>
Sound(sdir.."/sounds/spells/sancoff.ogg")
if (grouped==1) and (gs("swarn") == true) then
PSend("warn sanc out!")
end
rc("sanc")
if kspells["sanctuary"]==1 then
rct["sanctuary"]=true
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You slowly float to the ground."
 send_to="14"
 sequence="99"
 >
 <send>
Sound(sdir.."/sounds/spells/fly off.ogg")
if (grouped==1) and (gs("swarn") == true) then
PSend("sub fly down.")
end
rc("fly")
if kspells["fly"]==1 then
rc("fly")
rct["fly"]=true
end
</send>
 </trigger>

 <trigger
 enabled="y"
 match="Type: TRASH *"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="The * guildmaster says, '*'"
 omit_from_output="y"
 sequence="1"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You put * in *"
 send_to="14"
 sequence="100"
omit_from_output="n"
 >
 <send>
if brewing==1 then
ritems=ritems+1
table.insert(recipe,"%1")
else
Sound(sdir.."/sounds/misc/put in container.ogg")
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You put * in your storage locker."
 send_to="14"
 script="mgag"
omit_from_output="y"
 sequence="90"
 >
 <send>Sound(sdir.."/sounds/misc/put in locker.ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You drop * gold coins."
 send_to="14"
 sequence="99"
 >
 <send>Sound(sdir.."/sounds/items/drop/dropgold.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Variable * to *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/misc/variable set.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You emote: *"
 omit_from_output="y"
 send_to="2"
 sequence="1"
 >
 <send>%1</send>
 </trigger>
 <trigger
 enabled="y"
 match="You put one end of * to the ground and begin the spell."
 script="sgag"
 omit_from_log="y"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/frost1.ogg")
EnableGroup("frostbite", 1)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="^You get (.*) from (.*)\."
 send_to="14"
 sequence="99"
regexp="y"
omit_from_output="y"
 >
 <send>
require "wait"
wait.make(function()
table.insert(getitems, "%1")
if not (getblock==1) then
Sound(sdir.."/sounds/items/get item container.ogg")
end
getblock=1
getcount=getcount+1
wait.time(0.4)
if (getsay==0) then
getsay=1
for i,v in pairs(getitems) do
if IsInTable(uniques,v)==0 then
if gs("items")~=3 then
length=0
word=""
for w in string.gmatch(v, "%S+") do
if string.len(w)>length then
word=w
length=string.len(w)
end
end
if gs("items")==1 then
if gs("container")~=nil then
Send("put "..word.." "..gs("container"))
end
elseif gs("items")==2 then
Send("drop "..word)
Send("sac "..word)
elseif gs("items")==4 then
Send("donate "..word)
elseif gs("items")==5 then
Send("storage put "..word)
end
end
end
end
if getcount&lt;1 then
elseif getcount==1 then
Note("you get %1 from %2.")
elseif getcount>1 then
Note("You get "..getcount.." items from %2: "..table.concat(getitems, ", "))
end
getsay=0
getblock=0
getcount=0
end
getitems={}
uniques={}
end)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="Your god appreciates your sacrifice."
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="Wear locations are: *"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
iworn=""
s = "%1"
for w in string.gmatch(s, "%S+") do
if (gs("shortid")==1) then
Note("-"..w)
return
end
if (gs("shortid")==3) then
Note("-"..w)
end

iworn=iworn.." "..w
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You say, 'boner, *'"
 omit_from_output="y"
 sequence="1"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You receive * experience points."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Note("You receive "..ntrunk("%1").." experience.")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="Are you mad?"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You get the feeling that this spot is fished out."
 sequence="99"
 >
 </trigger>
 <trigger
 enabled="y"
 match="Your hook gets stuck on something, and you have to break the line."
 script="mgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/misc/fishsnap.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="*You receive * experience."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Note("%1")
Note("You receive "..ntrunk("%2").." experience.")
if deadmob~=1 then return end
Execute("ggc")
gclear()

if k_cap==nil then
else
nowexp=tonumber("%2")
if nowexp>=k_cap/2 then
if kskills["cryofvictory"]==1 then
Send("victory")
end --if cry of victory
end --if half cap
if nowexp==k_cap then
Sound(GetInfo(67).."/sounds/notifications/cap.ogg")
elseif nowexp&lt;k_cap and nowexp&gt;=k_cap/2 then
ppi.play(GetInfo(67).."/sounds/notifications/halfcap.ogg",0,0,100)
elseif nowexp&lt;k_cap/2 then
ppi.play(GetInfo(67).."/sounds/notifications/crapexp.ogg",0,0,ppi.getVolume()+25)
end --cap sounds
end --if cap is nil
</send>
 </trigger>
 <trigger
 enabled="y"
 match="Arena battles: (none)"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="Your magic missile hits *"
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/magic missile.ogg")</send>
 </trigger>
 <trigger
 match="(auction) '*', going once for * gold coins."
 omit_from_output="y"
enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/auction/auction bell1.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="As the world goes black you feel pieces of your mind fading..."
 omit_from_output="n"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="Your magical protection from electricity weakens, then fades."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/ground off.ogg")
checkstats()
rc("ground")
if kspells["ground"]==1 then
rct["ground"]=true
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="The magical flames protecting you flicker and go out."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/fireshield off.ogg")
checkstats()
rc("fire shield")
rct["fire shield"]=true
</send>
 </trigger>
 <trigger
 enabled="y"
 match="Your ice shield fades and is gone."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/iceshield off.ogg")
checkstats()
rc("ice shield")
rct["ice shield"]=true
</send>
 </trigger>

 <trigger
 enabled="y"
group="friendsnotify"
 match="* has left the game."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/channels/leave.ogg")
Execute("history_add friends=%1 logged out.")
Execute("history_add all=%1 logged out.")
</send>
 </trigger>
 <trigger
 match="(auction) '*', going twice for * gold coins."
 omit_from_output="y"
enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/auction/auction bell2.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You slowly float to the ground."
 send_to="14"
 sequence="100"
 >
 <send>flystatus="walking"</send>
 </trigger>
 <trigger
 enabled="y"
 match="As you hit * a bright fan of lightning bolts leaps from your hands to blast *!"
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/shocking grasp blast.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Your name would go down in history if you actually managed to win such an impossible fight."
 script="mgag"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="* has reconnected."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/channels/reconnected.ogg")
Execute("history_add friends=%1 reconnected.")
Execute("history_add all=%1 reconnected.")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* has lost * link."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/channels/leave linkdead.ogg")
Execute("history_add all=%1 lost %2 link.")
</send>
 </trigger>
 <trigger
 match="(auction) * has bid * gold coins for *"
 omit_from_output="y"
enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>Note("%1 bids %2.")
Sound(sdir.."/sounds/auction/bid.ogg")</send>
 </trigger>
 <trigger
 group="group"
 match="You split * gold coins with your group."
 omit_from_output="y"
send_to="14"
 sequence="100"
 >
<send>gg=tonumber(%1)
counters.steal=counters.steal-gg</send>
 </trigger>
 <trigger

 match="* tells you, '!ping'"
group="telltriggers"
enabled="y"
 omit_from_output="y"
ignore_case="y"
 sequence="1"
send_to="14"
 >
 <send>
if(safety~=1) then
Note("%1 requests your mush-z version...")
safety=1
PSend("tell %1 pong! "..GetVariable("version").." | prefix mzc")
DoAfterSpecial(10,"safety=0",12)
end

</send>
 </trigger>
 <trigger
 enabled="y"
 match="pingYou reply to *, '*'"
 omit_from_output="y"
 sequence="1"
 >
 </trigger>
 <trigger
 enabled="y"
 match="As you hit * a bright flash of red fire leaps from your hands to scorch *!"
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/burning hands blast.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Reconnecting."
 send_to="14"
 sequence="100"
 >
 <send>
Execute("redo")
</send>
 </trigger>
 <trigger
 match="(auction) * sold to * for * gold coins."
 omit_from_output="y"
enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>Note("Auction finished, sold to %2")
Execute("history_add auction=finished: %1 sold to %2 for %3.")
Sound(sdir.."/sounds/auction/item sold.ogg")
</send>
 </trigger>
 <trigger
 group="combat"
 match="Your arrow strikes *!"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/combat/arrow strike.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You squeeze a plush poison-dart frog, firing a poisoned dart at *"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You dump *, and a * liquid flows all over the place."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/brewing/dump container.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You feel lost pieces of your mind coming back..."
 send_to="14"
 sequence="100"
 >
 <send>
DoAfterSpecial(0.6,'Sound(sdir.."/sounds/spells/youres2.ogg")',12)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="A high-pitched whine fills your hearing, and you feel exhausted."
 send_to="14"
 sequence="100"
 >
 <send>
DoAfterSpecial(1,'Sound(sdir.."/sounds/spells/youres3.ogg")',12)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="Everything turns white, and the pressure of traveling impossibly fast fills your senses!"
 send_to="14"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/spells/youres1.ogg")
</send>
 </trigger>

 <trigger
 enabled="y"
 match="* has summoned you!"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/got summoned.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Your backstab does considerable damage to *"
 script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/skills/backstab/2.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You stand up."
 script="mgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/misc/stand.ogg")
</send>
 </trigger>
 <trigger
 enabled="y"
group="combat"
 match="You stand up."
 omit_from_output="y"
 send_to="14"
 sequence="90"
 >
 <send>
Sound(sdir.."/sounds/misc/stand.ogg")
pose = "stand"
</send>
 </trigger>

 <trigger
 enabled="y"
 match="You earn * experience points*"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Note("You earn "..ntrunk("%1").." experience.")
</send>
 </trigger>
 <trigger
 enabled="y"
 match="* has won the deathmatch in arena *"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/combat/arena/win arena.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Your blood freezes as you hear * death cry!"
 script="mgag"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You start fishing."
 script="mgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/misc/fishcast.ogg")
EnableGroup("fishing", 1)</send>
 </trigger>
 <trigger
 enabled="y"
 match="lvlor 'level thief'."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="You end up with a stinky, nasty mess, but no magic potion."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/brewing/nasty mess.ogg")
Execute("empty mortar")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Your chance of winning:"
 script="mgag"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="The gods grant you a new lease on life!"
 script="mgag"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="It is already open!"
 send_to="14"
 sequence="100"
 >
 <send>
if mtime then
Note("To add this to your map use zmd open * or zmap door open *. For example, zmd open gates")
end
</send>
 </trigger>

 <trigger
 enabled="y"
 match="You enter *."
 send_to="14"
omit_from_output="y"
 sequence="100"
 >
 <send>if (map==1) then
AppendToNotepad("map", "enter %1;")
end
Note("You enter %1")
if mtime then
Note("To add this to your map use zmd enter * or zmap door enter *.")
else
Note("You enter %1")
end
Sound(sdir.."/sounds/movement/enter portal.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="You begin your climb *ward."
 send_to="14"
 sequence="100"
 >
 <send>if (map==1) then
AppendToNotepad("map", "climb %1;")
end
if mtime==true then
table.insert(curmap,"climb %1")
end
Sound(sdir.."/sounds/movement/climb.ogg")</send>
 </trigger>

 <trigger
 group="combat"
 match="* misses you."
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>counters.dodge=counters.dodge+1
if (mg=="male") then
Note("he misses.")
end
if (mg=="female") then
Note("she misses.")
end
if (mg=="neuter") then
Note("it misses.")
end

Sound(sdir.."/sounds/combat/weapon swings/slice/"..math.random(1,swings["slice"])..".ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="Your displaced image rejoins your body."
 send_to="14"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/spells/displacement off.ogg")
if (grouped==1) and (gs("swarn") == true) then
PSend("sub displace out.")
end
rc("displace")
if kspells["displacement"]==1 then
rct["displacement"]=true
end</send>
 </trigger>
 <trigger
 enabled="y"
 match="The red in your vision disappears."
 send_to="14"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/spells/infra off.ogg")
rc("infra")
if kspells["infravision"]==1 then
rct["infravision"]=true
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="The detect invisible wears off."
 send_to="14"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/spells/dinvis off.ogg")
rc("detect invis")
if kspells["detectinvisibility"]==1 then
rct["detect invisibility"]=true
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You feel less aware of your surroundings."
 send_to="14"
 sequence="100"
 >
 <send>
Sound(sdir.."/sounds/spells/sl off.ogg")
rc("sense life")
if kspells["senselife"]==1 then
rct["sense life"]=true
end
</send>
 </trigger>
 <trigger
 enabled="y"
 match="The leader of * group is rated as *"
 omit_from_output="y"
 send_to="2"
 sequence="100"
 >
 <send>The leader is rated as %2</send>
 </trigger>
 <trigger
 enabled="y"
 match="scr:You feel *"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="* muscles magically fill out as artificial strength courses through * body."
 script="sgag"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="The lock yields quickly to your skills."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/doors/pick door.ogg")

PSend("open "..pick)
 </send>
 </trigger>
 <trigger
 enabled="y"
 match="* mehs, '*'"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Execute("history_add channels=%1 mehs, %2")
Execute("history_add all=%1 mehs, %2")
Sound(sdir.."/sounds/channels/meh.ogg")
Note("%1 mehs, %2")</send>
 </trigger>

 <trigger
 enabled="y"
 match="* musics, '*'"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Execute("history_add all=%1 musics, %2")
Execute("history_add channels=%1 musics, %2")
Sound(sdir.."/sounds/channels/music.ogg")
Note("%1 musics, %2")</send>
 </trigger>
 <trigger
 enabled="y"
 match="The spear shatters as it hits *, shards go flying!"
 script="sgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>blasting="greater"
Note("No affect, too much ac")
blasting="greater fireball"
Sound(sdir.."/sounds/spells/crystal spear shatter.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="scrNotify channel off."
 omit_from_output="y"
 sequence="100"
 >
 <send>notify | prefix scr</send>
 </trigger>
 <trigger
 enabled="y"
 match="* newbies, '*'"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>
Execute("history_add all=%1 newbies, %2")
Execute("history_add channels=%1 newbies, %2")
Sound(sdir.."/sounds/channels/newbie.ogg")
Note("%1 newbies, %2")</send>
 </trigger>
 <trigger
 enabled="y"
 match="The spell fails utterly."
 send_to="14"
 sequence="100"
 >
 <send>Sound(sdir.."/sounds/spells/fails utterly.ogg")
</send>
 </trigger>
 <trigger
 group="combat"
 match="You kick * in the back of the head, causing critical damage."
 script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="99"
 >
 <send>
myspecial()
require "wait"
wait.make(function()
wait.time(0.4)
ppi.play(sdir.."/sounds/skills/kick2.ogg",0,50)
theygrunt()
end)
</send>
 </trigger>
 <trigger
 enabled="y"
 match="You receive * gold coins for your sacrifice *."
 send_to="14"
 sequence="100"
 >
 <send>if (gs("sacsplit") == true) and (grouped == 1) then
Execute("split %1")
end
gg=tonumber(%1)
counters.steal=counters.steal+gg
Sound(sdir.."/sounds/misc/sacrifice corpse.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 group="stab"
 match="You place * in the back of * mortally wounding *"
 script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="99"
 >
 <send>Sound(sdir.."/sounds/skills/backstab/1.ogg")
EnableGroup("stab", 0)</send>
 </trigger>
 <trigger
 group="fishing"
 match="You reel in a *"
 script="mgag"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>if (gs("donfish") == true) then
PSend("donate fish")
end
Sound(sdir.."/sounds/misc/fishcatch.ogg")</send>
 </trigger>
 <trigger
 group="combat"
 match="Your kick to * could have been better, but you got the point across."
 script="skgag"
 omit_from_output="y"
 send_to="14"
 sequence="99"
 >
 <send>
myspecial()
require "wait"
wait.make(function()
wait.time(0.4)
ppi.play(sdir.."/sounds/skills/kick4.ogg",0,50)
theygrunt()
end)
Note("Could have been better.")
</send>
 </trigger>
</triggers>
<triggers>
 <trigger
 enabled="y"
 keep_evaluating="y"
 match="*(unique)"
 send_to="14"
 sequence="1"
 >
 <send>Sound(sdir.."/sounds/notifications/random.ogg")</send>
 </trigger>
 <trigger
 enabled="y"
 match="random(on ground) * contains:"
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="randomNothing matching those arguments found."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="randomNothing."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="^Item\: '(.*)'\s*"
regexp="y"
 omit_from_output="y"
 send_to="14"
 sequence="1"
 >
 <send>cmi=1
cmistr=""
idname="%1"
Note("%1")
EnableGroup("compare",true)
DoAfterSpecial(1,'EnableGroup("compare",false)',12)
ac=""
</send>
 </trigger>
 <trigger
 enabled="y"
 match="randomR (* *)*Item: * '*'"
 omit_from_output="y"
 send_to="14"
 sequence="100"
 >
 <send>uuid="%4"
PSend("get "..uuid.." corpse")
if gs("container")~=nil then
PSend("put "..uuid.." "..gs("container"))
end
</send>
 </trigger>
 <trigger
 enabled="y"
regexp="y"
 match="^storecheck.*Item:\s*(\w+)\s*'(.*)'"
 omit_from_output="y"
 send_to="1"
 sequence="50"
script="itemfunc"
 >
 <send>
</send>
 </trigger>
 <trigger
 enabled="y"
 match="storecheck*"
 omit_from_output="n"
 send_to="14"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="randomYou do not see that here."
 omit_from_output="y"
 sequence="100"
 >
 </trigger>
 <trigger
 enabled="y"
 match="lagcheckHuh?"
 omit_from_output="y"
keep_evaluating="y"
 sequence="100"
 >
 </trigger>

</triggers>
<aliases>
 <alias
 match="eqlist"
 enabled="y"
 send_to="12"
 sequence="100"
 >
 <send>Execute("eql")</send>
 </alias>
 <alias
 match="eqlist *"
 enabled="y"
 send_to="12"
 sequence="100"
 >
 <send>Execute("eql %1")</send>
 </alias>
</aliases>
<aliases>
 <alias
 match="eql"
 enabled="y"
 send_to="2"
 sequence="100"
 >
 <send>The eqlist command is a powerful tool you can use to manage equipment sets.
Options are:
eqlist help - This help screen.
eqlist create &lt;name&gt; &lt;container&gt; [mode] - Make an equipment set with specified name, container and mode
eqlist mode mode - change the global mode. Possible modes are: Meticulous, fast, lightning.
eqlist mode set mode change the mode for a set.
eqlist delete &lt;name&gt; - Delete an equipment set
eqlist clear - clear/delete all your sets.
eqlist list - List your current equipment sets
eqlist show &lt;set name&gt; - Show eq in a given set
eqlist wear &lt;name&gt; - Wear a set
eqlist remove &lt;name&gt; - Remove/unwear all items from a set 
eqlist move &lt;name&gt; &lt;new_container&gt; - moves a set from one container to another (including storage) make sure that if you're moving from a bag or another object it is in your inventory as this does not check for errors and could mess up things badly. If this happens, use the eqlist change command to change it to the container that it was originally in.
eqlist export - export your sets to a backup file.
eqlist import - import sets from backup.
To update a set, recreate it. It will just replace itself.
Note about containers: the container can either be something on your inventory or the word &lt;storage&gt; which puts a set in your storage locker. For storage locker sets, you'll need to be in recall.
Important note about tensor disks and lightning mode: If you are using tensor disks make sure that you are using tensor as the container name and not any shortened word such as t, tens, or any other keywords such as disk or floating. This is important due to lightning mode checks.
For more information about eqlists, read the eqlist section of the mushclient readme file.
</send>
 </alias>
</aliases>
<aliases>
 <alias
 script="eqlf"
 match="eql *"
 enabled="y"
 sequence="100"
 >
 </alias>

 <alias
 script="eqlf"
 match="eqlist *"
 enabled="y"
 sequence="100"
 >
 </alias>

</aliases>
<aliases>
 <alias
 match="eqlt"
 enabled="y"
 send_to="12"
 sequence="100"
 >
 <send>Send("stand")
Send("insult -all | prefix eqlc")</send>
 </alias>
</aliases>
<aliases>
 <alias
 match="md5 *"
 enabled="y"
 send_to="12"
 sequence="100"
 >
 <send>Note(md5f("%1"))</send>
 </alias>
</aliases>
<aliases>
 <alias
 match="filter add *"
 enabled="y"
 sequence="99"
send_to="12"
 >
<send>Note("ok.")
gag["%1"]=true
</send>
</alias>
 <alias
 match="config"
 enabled="y"
 send_to="12"
 sequence="1"
 >
 <send>
settingtables()
config_options()
</send>
 </alias>
 <alias
 match="recast"
 enabled="y"
 send_to="12"
 sequence="1"
 >
 <send>
recast_options()
</send>
 </alias>
 <alias
 match="recast *"
 enabled="y"
 sequence="1"
script="recastparse"
 >
 <send>

</send>
 </alias>

 <alias
 match="filter"
 enabled="y"
 send_to="12"
 sequence="100"
 >
 <send>for i in pairs(gag) do
if gag[i]==true then status="enabled" end
if gag[i]==false then status="disabled" end
Note(i.." - "..status)
end</send>
 </alias>
 <alias
 match="filter *"
 enabled="y"
 sequence="100"
send_to="12"
 >
 <send>if "%1"=="release" then
Note("OK, configured.")
gag.misc=false
gag.minions=false
gag.spells=false
gag.combat=true
gag.condition=false
return
elseif "%1"=="all" then
gag.misc=true
gag.minions=true
gag.spells=true
gag.combat=true
gag.condition=true
gag.skills=true
gag.fights=true
Note("Ok, all filters enabled.")
return
elseif "%1"=="none" then
gag.misc=false
gag.fights=false
gag.minions=false
gag.skills=false
gag.spells=false
gag.combat=false
gag.condition=false
Note("All filters disabled.")
return
end
if gag["%1"] then
gag["%1"]=false
Note("filter %1 off.")
elseif gag["%1"]==nil then
Note("Unrecognized filter option - type filter for a list.")
elseif not gag["%1"] then
gag["%1"]=true
Note("filter %1 on.")
end
</send>
 </alias>
</aliases>
<aliases>
 <alias
 match="strend"
 enabled="y"
 sequence="100"
send_to="12"
 >
 <send>Note("matched "..s_found.." uuids, with "..s_errors.." errors.")
s_found=0
s_errors=0</send>
 </alias>
</aliases>
<aliases>
 <alias
 match="strcheck"
 enabled="y"
 sequence="100"
send_to="14"
 >
 <send>require "wait"
wait.make(function()
txt={}
s_errors=0
s_found=0
table.insert(txt,"cast.txt")
table.insert(txt,"align.txt")
table.insert(txt,"age.txt")
table.insert(txt,"enchant.txt")
table.insert(txt,"enchanted.txt")
table.insert(txt,"hit.txt")
table.insert(txt,"hide sneak.txt")
table.insert(txt,"hpregen.txt")
table.insert(txt,"luck.txt")
table.insert(txt,"misc.txt")
table.insert(txt,"thief.txt")
table.insert(txt,"saves.txt")
table.insert(txt,"sell.txt")
table.insert(txt,"size.txt")
table.insert(txt,"spc.txt")
table.insert(txt,"tank.txt")
table.insert(txt,"stats.txt")
f_uuids={}
found=0
errors=0
s_uuids={}
dir="f:/eq/sets/"
for i in pairs(txt) do
file=io.input(dir..txt[i])
line=file:read("*l") -- read one line
while line do -- if not end of file (EOF)
str=string.match(line,"(%w+)%.")
if str~=nil then
table.insert(f_uuids,str)
str=nil
end
line=file:read ("*l") -- read one line
end
file:close()
end
Note("Total: "..#f_uuids.." uuids in files.")
Execute("stll -head -insult | prefix storecheck")
wait.time(2);
Execute("stll -neck -insult | prefix storecheck")
wait.time(2);
Execute("stll -arms -insult | prefix storecheck")
wait.time(2);
Execute("stll -wrist -insult | prefix storecheck")
wait.time(2);
Execute("stll -hands -insult | prefix storecheck")
wait.time(2);
Execute("stll -finger -insult | prefix storecheck")
wait.time(2);
Execute("stll -on_body -insult | prefix storecheck")
wait.time(2);
Execute("stll -about -insult | prefix storecheck")
wait.time(2);
Execute("stll -waist -insult | prefix storecheck")
wait.time(2);
Execute("stll -legs -insult | prefix storecheck")
wait.time(2);
Execute("stll -feet -insult | prefix storecheck")
wait.time(2);
Execute("stll -held -insult | prefix storecheck")
wait.time(2);
Execute("stll -shield -insult | prefix storecheck")
wait.time(2);
Execute("stll -weapon -insult | prefix storecheck")
end)
</send>
 </alias>
</aliases>
<aliases>
 <alias
 match="exm"
 enabled="y"
 send_to="12"
 sequence="100"
 >
 <send>if not mark then
mark=true
exm=exp
Note("exp mark on.")
else
mark=false
Note("Your exp changed by "..exp-exm)
end</send>
 </alias>
</aliases>
<aliases>
 <alias
 match="goldlog"
 enabled="y"
 sequence="100"
send_to="14"
 >
 <send>if(goldlog==1) then
goldlog=0
Note("gold log is off")
else
goldlog=1
Note("gold log is on")
end</send>
 </alias>
</aliases>
<aliases>
 <alias
 match="bawa"
 enabled="y"
 send_to="12"
 sequence="100"
 >
 <send>bwithdraw=1
PSend("gold")</send>
 </alias>
</aliases>
<aliases>
 <alias
 match="lag"
 enabled="y"
 send_to="12"
 sequence="100"
 >
 <send>require "wait"
wait.make(function()
local c1 = os.clock()
--do stuff
local c1 = os.clock()
Send("lagcheck | prefix lagcheck")
wait.match("lagcheckHuh?",100)
Note('done: ',os.clock()-c1..'s')
end)</send>
 </alias>
 <alias
 match="brag * lag"
 enabled="y"
 send_to="12"
 sequence="100"
 >
 <send>require "wait"
wait.make(function()
local c1 = os.clock()
--do stuff
local c1 = os.clock()
Send("lagcheck | prefix lagcheck")
wait.match("lagcheckHuh?",100)
Send('%1 I currently have a connection lag of ',os.clock()-c1..'s')
end)</send>
 </alias>

</aliases>
<aliases>
 <alias
 match="sim *"
 enabled="y"
 send_to="12"
 sequence="100"
 >
 <send>Simulate("%1\\r\\n")</send>
 </alias>
 <alias
 match="acs"
 enabled="y"
 sequence="100"
 >
 <send>ach | grep Yes | wc
ach | grep No | wc</send>
 </alias>
 <alias
 match="licr"
 enabled="y"
 sequence="100"
 >
 <send>look in corpse -insult -random | prefix random</send>
 </alias>
</aliases>

<aliases>
 <alias
 match="hunt *"
 enabled="y"
 send_to="12"
 sequence="100"
 >
 <send>str="%1"
PSend("scan | grep "..string.lower(str))
PSend("scan | grep "..string.upper(string.sub(str,1,1))..string.sub(str,2,#str))</send>
 </alias>
 <alias
 match="dc *"
 enabled="y"
 send_to="12"
 sequence="100"
 >
 <send>str="%1"
PSend("deed | grep "..string.lower(str))
PSend("deed | grep "..string.upper(string.sub(str,1,1))..string.sub(str,2,#str))</send>
 </alias>

 <alias
 match="huk"
 enabled="y"
 send_to="12"
 sequence="100"
 >
 <send>str="$k"
PSend("scan | grep "..string.lower(str))
PSend("scan | grep "..string.upper(string.sub(str,1,1))..string.sub(str,2,#str))</send>
 </alias>

</aliases>
<aliases>
 <alias
 match="opentxt"
 enabled="y"
 send_to="12"
 sequence="100"
 >
 <send>
Note("This does nothing for now.")
</send>
 </alias>
</aliases>
<aliases>
 <alias
 match="going"
 enabled="y"
 send_to="12"
 sequence="100"
 >
 <send>lazymoving=1
PSend("look")
</send>
 </alias>
<alias
match="·*"
enabled="y"
send_to="12"
sequence="100"
>
 <send>way="%1"
if (ways[way]~=nil) then
PSend("recall")
PSend("way "..ways[way])
else
Note("unknown waypoint: Waypoints you can use are "..table.concat(ways2, ", "))
end
</send>
</alias>
<alias
 match="botname *"
 enabled="y"
 send_to="12"
 sequence="100"
 >
<send>ss("botname", "%1")
Note("Your bot's name is now "..gs("botname"))
botname=gs("botname")
PSend("sub My bot's name is now "..gs("botname"))
</send>
</alias>
<alias
 match="_sleep"
 enabled="y"
 send_to="12"
 sequence="100"
 >
<send>
if (grouped==1) then
PSend("rest")
else
PSend("sleep")
end
</send>
</alias>
<alias
 match="!rt *"
 enabled="y"
 send_to="12"
 sequence="100"
 >
<send>
t="%1"
item="%2"
t[item]=nil
</send>
</alias>
<alias
 match="nsp"
 enabled="y"
 send_to="12"
 sequence="100"
 >
<send>
for i,v in pairs(rct) do
if v==true then
Note(i)
end
end
</send>
</alias>
<alias
 match="gnsp"
 enabled="y"
 send_to="12"
 sequence="100"
 >
<send>
</send>
</alias>

<alias
 match="!recast"
 enabled="y"
 send_to="12"
 sequence="100"
 >
<send>
if (cspells==0) then
cspells=1
Note("recast on.")
return
end
if (cspells==1) then
cspells=0
Note("recast off.")
return
end
</send>
</alias>
</aliases>
<aliases>
 <alias
 match="wi *"
 enabled="y"
 sequence="100"
 >
 <send>var hit %1
wield %1</send>
 </alias>
<alias
match="!help"
enabled="y"
sequence="100"
send_to="2"
>
<send>
Welcome to the group bots!
For now, the following commands are available.
!job &lt;healer, blaster, hitter or tank&gt; sets your own job.
!recast toggles whether you will recast tank and hitters falling spells.
Note that the healer job will always try to cast heal, and area when requested.
The blaster spell has to be indicated with the !blast command.
</send>
</alias>
<alias
match="!blast *"
enabled="y"
sequence="100"
send_to="14"
>
<send>blasting="%1"
Note("Blasting set to %1.")
PSend("sub I will now use "..blasting.." to blast.")
</send>
</alias>
<alias
match="!job *"
enabled="y"
sequence="100"
send_to="14"
>
<send>
if nobot then
Note("sorry, bots are disabled.")
return
end
if ("%1"=="healer") then
job="healer"
PSend("sub Job set to healer.")
Note("You are now a healer.")
blasting=""
return
elseif ("%1"=="areaman") then
job="areaman"
PSend("sub I am now the areaman of the group.")
Note("You are now the area man.")
blasting=""
return

elseif ("%1"=="none") then
job="none"
Note("Bots disabled.")
PSend("sub bots disabled.")
return
elseif ("%1"=="") then
Note("Job is currently set to "..job)
return
elseif ("%1"=="healblast") then
job="healblast"
PSend("sub Job set to blaster healer.")
Note("You are now a blaster healer, use the !blast spellname command to set the blasting spell you want to use.")
blasting="greater fireball"
PSend("sub I will use "..blasting.." to blast.")
return
elseif ("%1"=="blaster") then
Note("You are now a blaster, use the !blast spellname command to set the blasting spell you want to use.")
job="blaster"
PSend("sub job set to blaster.")
blasting="greater fireball"
PSend("sub I will use "..blasting.." to blast.")
return
elseif ("%1"=="tank") then
if (kskills["tanking"]==1) then
PSend("tank | prefix tankon")
Note("You are now a proper tank.")
else
notank=1
Note("You are now a tank, even though you don't know the skill, but...")
if (kskills["rescue"]==1) then
Note("You know rescue. good.")
else
Note("You don't even know rescue! You can't tank!")
Send("sub I can't tank, I don't know rescue.")
return
end --res
end --tanking
job="tank"
PSend("sub job set to tank.")
if (kskills["defensivefighting"]==1) then
PSend("def | prefix tankon")
else
Note("Well you dont know defensive fighting, as a tank you should know it, but oh well. Go learn it.")
end
return
elseif ("%1"=="hitter") then
job="hitter"
PSend("sub job set to hitter.")
zerking=0
PSend("tank | prefix tankoff")
PSend("def | prefix tankoff")
assisting=0
Note("You are now a hitter. Use the !zerk command to configure whether you want to berserk during battles. Note that the hitter can stab if someone types gt stab mobname, and it will switch weapons after stabbing. for that, the variables $hit and $stab have to be set to the name to the weapon you're gonna use I.e: var hit sword, var stab dagger. It will also rewield the $hit weapon after disarmed.")
return
else
Note("Unknown job, type !help for details.")
end
</send>
</alias>
<alias
enabled="y"
match="!zerk"
sequence="100"
send_to="14"
>
 <send>if (zerk==1) then
zerk=0
Note("You will not zerk in battles.")\
return
end
if (zerk==0) then
zerk=1
Note("You will zerk in battles.")
return
end
</send>
</alias>
 <alias
 match="inv"
 enabled="y"
 sequence="100"
 >
 <send>inv | prefix invcheck
abort | prefix invcheck</send>
 </alias>
 <alias
 match="i"
 enabled="y"
 sequence="100"
 >
 <send>inv | prefix invcheck
abort | prefix invcheck</send>
 </alias>
 <alias
 match="grm"
 enabled="y"
 sequence="100"
send_to="14"
 >
<send>
PSend("gr | prefix groupm")
require "wait"
wait.make(function()
wait.time(0.8)
if (issues~=1) then
Note("No one in the group seems to be in trouble.")
end
issues=0
end)
 </send>
 </alias>
</aliases>
<aliases>
 <alias
 match="r *"
 enabled="y"
 sequence="100"
 >
 <send>reply %1</send>
 </alias>

 <alias
 match="sl* -f*"
 enabled="y"
send_to="14"
 sequence="100"
 >
 <send>sleep | prefix force</send>
 </alias>
 <alias
 match="redo"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>
Note("reloading...")
clear()
login()
jli=1
--grouped=1
DoAfterSpecial(12, 'jli=0', 12)
EnableGroup("group",1)
PSend("group | prefix grm")
</send>
 </alias>

 <alias
 match="fixfix"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>Note("reloading")
DoAfterSpecial(1,"UnloadPlugin('553a883096da345ce6897740')","14")
DoAfterSpecial(2,"ReloadPlugin('553a883096da345ce6897740')","14")
</send>
 </alias>
 <alias
 match="scm reset"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>
counters={}
Note("Counters reset.")
counters.date=os.date("%B %d %H:%M:%S")
counters.teeth=0
counters.bteeth=0
counters.hits=0
counters.dodge=0
counters.parry=0
counters.theydodge=0
counters.enemyhits=0
counters.parryc=0
counters.absorb=0
counters.kills=0
counters.flee=0
counters.cast=0
counters.betterats=0
counters.disarm=0
counters.rescue=0
counters.frescue=0
counters.steal=0
</send>
 </alias>
 <alias
 match="scm"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>
Note("Counters since "..counters.date)
Note("You have been hit "..counters.hits.." times, dodged "..counters.dodge..", and parried "..counters.parry..". Which means you avoided "..math.floor((counters.parry+counters.dodge)/(counters.hits+counters.parry+counters.dodge)*100).."percent of hits.")
Note("You attacked "..counters.enemyhits.." times. Mobs dodged "..counters.theydodge..", and parried "..counters.parryc..". "..math.floor((counters.parryc+counters.theydodge)/(counters.enemyhits+counters.parryc+counters.theydodge)*100) .."percent of your attacks avoided.")
Note("Your armor absorbed "..counters.absorb.." hits.")
Note("You've killed "..counters.kills.." mobs this session, and fled "..counters.flee.." times.")
Note("You've casted a total of "..counters.cast.." spells.")
Note("You have disarmed a total of "..counters.disarm.." mobs.")
if counters.rescue~=0 then
if counters.frescue~=0 then
Note("You have rescued "..counters.rescue.." times, and failed "..counters.frescue.." times!")
else
Note("You have rescued "..counters.rescue.." times.")
end
end
Note("You got a total of "..counters.steal.." gold this session.")
Note("You became better "..counters.betterats.." times.")
Note("You got "..counters.teeth.." necromancer teeth, and shattered "..counters.bteeth..".")
Note("To reset the counters, type scm reset.")
</send>
 </alias>

 <alias
 match="brag * counters"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>
SendNoEcho("%1 Counters since "..counters.date)
SendNoEcho("%1 I have been hit "..counters.hits.." times, dodged "..counters.dodge..", and parried "..counters.parry..". Which means I avoided "..math.floor((counters.parry+counters.dodge)/(counters.hits+counters.parry+counters.dodge)*100) .."percent of hits.")
SendNoEcho("%1 I attacked "..counters.enemyhits.." times. Mobs dodged "..counters.theydodge..", and parried "..counters.parryc..". "..math.floor((counters.parryc+counters.theydodge)/(counters.enemyhits+counters.parryc+counters.theydodge)*100) .."percent of my attacks avoided.")
SendNoEcho("%1 I've killed "..counters.kills.." mobs this session, and fled "..counters.flee.." times.")
if counters.rescue~=0 then
if counters.frescue~=0 then
Send("%1 I have rescued "..counters.rescue.." times, and failed "..counters.frescue.." times!")
else
SendNoEcho("%1 I have rescued "..counters.rescue.." times.")
end
end
SendNoEcho("%1 I have disarmed a total of "..counters.disarm.." mobs.")
SendNoEcho("%1 I became better "..counters.betterats.." times.")
</send>
 </alias>

 <alias
 match="rank *"
 enabled="y"
 sequence="100"
 >
 <send>skill | grep %1
spell | grep %1</send>
 </alias>
 <alias
 match="sk *"
 enabled="y"
 sequence="100"
 >
 <send>shopkeep %1</send>
 </alias>
 <alias
 match="re2"
 enabled="y"
 sequence="100"
 >
 <send>var $res $v2
rescue $v2</send>
 </alias>
 <alias
 match="skc"
 enabled="y"
 sequence="100"
 >
 <send>skin corpse</send>
 </alias>
 <alias
 match="re3"
 enabled="y"
 sequence="100"
 >
 <send>var $res $v3
rescue $v3</send>
 </alias>
 <alias
 match="sl"
 enabled="y"
 sequence="100"
 >
 <send>sleep</send>
 </alias>
 <alias
 match="res *"
 enabled="y"
 sequence="100"
send_to="14"
 >
 <send>res="%1"
Send("res %1")</send>
 </alias>
 <alias
 match="cht"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>
if not (pose == "stand") then
PSend("stand")
prevpose=pose
end
PSend("c "..spells["heal"].." $t")
casting=spells["heal"].." $t"
if(prevpose~="stand") then
PSend(prevpose)
prevpose="stand"
end
</send>
 </alias>
 <alias
 match="st"
 enabled="y"
 sequence="100"
 >
 <send>stand</send>
 </alias>
 <alias
 match="chv"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>
if not (pose == "stand") then
PSend("stand")
prevpose=pose
end
PSend("c "..spells["heal"].." $v")
casting=spells["heal"].." $v"
if(prevpose~="stand") then
PSend(prevpose)
prevpose="stand"
end
</send>
 </alias>
 <alias
 match="tak"
 enabled="y"
 sequence="100"
 >
 <send>target $k</send>
</alias>
 <alias
 match="stg *"
 enabled="y"
 sequence="100"
 >
 <send>
storage get %1
</send>
</alias>

 <alias
 match="stll *"
 enabled="y"
 sequence="100"
 >
 <send>
storage llist %1
</send>
</alias>
 <alias
 match="stp *"
 enabled="y"
 sequence="100"
 >
 <send>
storage put %1
</send>
</alias>
 <alias
 match="cmk"
 enabled="y"
 sequence="100"
 >
 <send>c m $k</send>
 </alias>
 <alias
 match="tarn"
 enabled="y"
 sequence="100"
 >
 <send>tar noone</send>
 </alias>
 <alias
 match="cn"
 enabled="y"
 sequence="100"
 >
 <send>condition</send>
 </alias>
 <alias
 match="tav"
 enabled="y"
 sequence="100"
 >
 <send>target $v</send>
 </alias>
 <alias
 match="pok11"
 enabled="y"
 sequence="100"
 >
 <send>pickpocket 11.$k</send>
 </alias>
 <alias
 match="ter"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>
require "tprint"
tprint(backtrack)
Note("rooms time!")
tprint(rooms)
Note(leader)
Note(trackarea)
Note(terrain)
--Note(area)
--Note(time)
--Note(timenum)
Note(timestr)
;require "tprint"
tprint(cup)
tprint(kxwts)
</send>
 </alias>

 <alias
 match="pok12"
 enabled="y"
 sequence="100"
 >
 <send>pickpocket 12.$k</send>
 </alias>
 <alias
 match="tnl"
 enabled="y"
 sequence="100"
 >
 <send>train | prefix tnl | grep each
level | prefix tnl</send>
 </alias>
 <alias
 match="config mud"
 enabled="y"
 sequence="1"
 >
 <send>autosize | prefix scr
autosplit | prefix scr
autotick | prefix scr
notify | prefix scr
set prompt off
autodoor | prefix scr
set blind on | prefix mzc
set pageb none | prefix mzc
</send>
 </alias>

 <alias
 match="pok13"
 enabled="y"
 sequence="100"
 >
 <send>pickpocket 13.$k</send>
 </alias>
 <alias
 match="mapping"
 enabled="y"
 send_to="14"
 sequence="100"
 >
<send>
if (map==0) then
map=1
Note("map on.")
Sound(sdir.."/sounds/luaaudio/on.ogg")
elseif (map==1) then
map=0
Note("map mode off.")
Sound(sdir.."/sounds/luaaudio/off.ogg")
end
</send>
</alias>
 <alias
 match="stealth"
 enabled="y"
 send_to="14"
 sequence="100"
 >
<send>
if (stealth==0) then
stealth=1
Note("Stealth mode on.")
Sound(sdir.."/sounds/luaaudio/on.ogg")
elseif (stealth==1) then
stealth=0
Note("Stealth mode off.")
Sound(sdir.."/sounds/luaaudio/off.ogg")
end
</send>
</alias>
 <alias
 match="pok14"
 enabled="y"
 sequence="100"
 >
 <send>pickpocket 14.$k</send>
 </alias>
 <alias
 match="pok2"
 enabled="y"
 sequence="100"
 >
 <send>pickpocket 2.$k</send>
 </alias>
 <alias
 match="rev"
 enabled="y"
send_to="14"
 sequence="100"
 >
 <send>
PSend("rescue $v")
res="$v"
</send>
 </alias>
 <alias
 match="res* *"
 enabled="y"
send_to="14"
 sequence="100"
 >
 <send>
PSend("res%1 %2")
res="%2"
</send>
 </alias>
 <alias
 match="rp"
 enabled="y"
 sequence="100"
 >
 <send>replay | tail</send>
 </alias>
 <alias
 match="rt"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>
mnrnote = 0
hprnote = 0
hpnote = 0
mnnote = 0
mvnote = 0
mvrnote=0
Execute("show regen | prefix scr:")</send>
 </alias>
 <alias
 match="cn *"
 enabled="y"
 sequence="100"
 >
 <send>condition %1</send>
 </alias>
 <alias
 match="cn2"
 enabled="y"
 send_to="10"
 sequence="100"
 >
 <send>if (gs("tts") == true) then
tts_stop
end
condition $v2</send>
 </alias>
 <alias
 match="cn3"
 enabled="y"
 send_to="10"
 sequence="100"
 >
 <send>if (gs("tts") == true) then
tts_stop
end
condition $v3</send>
 </alias>
 <alias
 match="tnl *"
 enabled="y"
 sequence="100"
 >
 <send>level | grep %1</send>
 </alias>
 <alias
 match="cnk"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>if (gs("tts") == true) then
Execute("tts_stop")
end
Execute("condition $k")</send>
 </alias>
 <alias
 match="tnp"
 enabled="y"
 sequence="100"
 >
 <send>level | grep experience | prefix tnp
train | grep each | prefix tnp</send>
 </alias>
 <alias
 match="cnt"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>if (gs("tts") == true) then
Execute("tts_stop")
end
Execute("condition $t")</send>
 </alias>
 <alias
 match="tp"
 enabled="y"
 sequence="100"
 >
 <send>train prac</send>
 </alias>
 <alias
 match="pok3"
 enabled="y"
 sequence="100"
 >
 <send>pickpocket 3.$k</send>
 </alias>
 <alias
 match="pok4"
 enabled="y"
 sequence="100"
 >
 <send>pickpocket 4.$k</send>
 </alias>
 <alias
 match="u"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>if (gs("tts") == true) then
if gs("imove")==true then Execute("tts_stop") end
end
if (map==1) then
AppendToNotepad("map", "u;")
end

if (stealth==1) then
PSend("sneak u")
return
end
PSend("u")</send>
 </alias>
 <alias
 match="pok5"
keep_evaluating="y"
 enabled="y"
 sequence="100"
 >
 <send>pickpocket 5.$k</send>
 </alias>
 <alias
 match="pok6"
 enabled="y"
 sequence="100"
 >
 <send>pickpocket 6.$k</send>
 </alias>
 <alias
 match="pok7"
 enabled="y"
 sequence="100"
 >
 <send>pickpocket 7.$k</send>
 </alias>
 <alias
 match="s"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>if (gs("tts") == true) then
if gs("imove")==true then Execute("tts_stop") end
end
if (map==1) then
AppendToNotepad("map", "s;")
end
if (stealth==1) then
PSend("sneak s")
return
end

PSend("s")</send>
 </alias>
 <alias
 match="sacc"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>if (pose ~= "stand") then
PSend("stand")
Execute("sac corpse")
else
Execute("sac corpse")
end</send>
 </alias>
 <alias
 match="sant"
 enabled="y"
 sequence="100"
send_to="12"
 >
 <send>Execute("c sanc $t")</send>
 </alias>
 <alias
 match="se"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>if (gs("tts") == true) then
if gs("imove")==true then Execute("tts_stop") end
end
if (map==1) then
AppendToNotepad("map", "se;")
end
if (stealth==1) then
PSend("sneak se")
return
end

PSend("se")</send>
 </alias>
 <alias
 match="ub *"
 enabled="y"
 sequence="100"
 >
 <send>use bow %1</send>
 </alias>
 <alias
 match="l3"
 enabled="y"
 sequence="100"
 >
 <send>rem lantern
drop lantern
sac lantern</send>
 </alias>
 <alias
 match="ubk"
 enabled="y"
 sequence="100"
 >
 <send>use bow $k</send>
 </alias>
 <alias
 match="lbk"
 enabled="y"
 sequence="100"
 >
 <send>c lig bolt $k</send>
 </alias>
 <alias
 match="ubm"
 enabled="y"
 sequence="100"
 >
 <send>use box mouse</send>
 </alias>
 <alias
 match="pok8"
 enabled="y"
 sequence="100"
 >
 <send>pickpocket 8.$k</send>
 </alias>
 <alias
 match="lic"
 enabled="y"
 sequence="100"
 >
 <send>look in corpse</send>
 </alias>
 <alias
 match="uf *"
 enabled="y"
 sequence="100"
 >
 <send>use frog %1</send>
 </alias>
 <alias
 match="conk"
 enabled="y"
 sequence="100"
 >
 <send>con $k</send>
 </alias>
 <alias
 match="pok9"
 enabled="y"
 sequence="100"
 >
 <send>pickpocket 9.$k</send>
 </alias>
 <alias
 match="lil"
 enabled="y"
 sequence="100"
 >
 <send>light lantern</send>
 </alias>
 <alias
 match="ufk"
 enabled="y"
 sequence="100"
 >
 <send>use frog $k</send>
 </alias>
 <alias
 match="csk"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>PSend("c crystal spear $k")
casting="crystal spear $k"</send>
 </alias>
 <alias
 match="lir"
 enabled="y"
 sequence="100"
 >
 <send>list all | grep R</send>
 </alias>
 <alias
 match="frc *"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>
PSend("friend list | grep %1")
</send>
 </alias>
 <alias
 match="cure"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>
if not (pose == "stand") then
PSend("stand")
prevpose=pose
end
PSend("c "..spells["heal"])
casting=spells["heal"].." %1"
if(prevpose~="stand") then
PSend(prevpose)
prevpose="stand"
end
</send>
 </alias>
 <alias
 match="cure *"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>
if not (pose == "stand") then
PSend("stand")
prevpose=pose
end
PSend("c "..spells["heal"].." %1")
casting=spells["heal"].." %1"
if(prevpose~="stand") then
PSend(prevpose)
prevpose="stand"
end
</send>
 </alias>
 <alias
 match="shield *"
 enabled="y"
 sequence="100"
 >
 <send>rem %1
get shielding amulet box
wear amulet
use amulet
rem amulet
p amulet box
wear %1</send>
 </alias>
 <alias
 script="castalias"
 match="c *"
 enabled="y"
 keep_evaluating="y"
 sequence="98"
 >
 </alias>
 <alias
 script="castalias"
 match="cast *"
 enabled="y"
 send_to="14"
 keep_evaluating="y"
 sequence="98"
 >
 </alias>
 <alias
 match="bad *k"
 enabled="y"
 sequence="99"
 >
 <send>bank deposit %1000</send>
 </alias>
 <alias
 match="uo *"
 enabled="y"
 sequence="100"
 >
 <send>unlock %1
open %1</send>
 </alias>
 <alias
 match="upv"
 enabled="y"
 sequence="100"
 >
 <send>
</send>
 </alias>
 <alias
 match="usage *"
 enabled="y"
 sequence="100"
 >
 <send>%stat %1 | grep count</send>
 </alias>
 <alias
 match="macro-abort"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>Execute("abort")
</send>
 </alias>

 <alias
 match="macro-recast"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>Execute("cast "..casting)</send>
 </alias>
 <alias
 match="usl"
 enabled="y"
 sequence="100"
 >
 <send>use lantern</send>
 </alias>
 <alias
 match="curv"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>PSend("c cure crit $v")
casting="cure crit $v"</send>
 </alias>
 <alias
 match="macro-runnotes"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>os.Execute("Notepad "..sdir.."texts/notes.txt")</send>
 </alias>
 <alias
 match="v"
 enabled="y"
 sequence="100"
 >
 <send>var</send>
 </alias>
 <alias
 match="cust"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>PSend("c cure s $t")
casting="cure s $t"</send>
 </alias>
 <alias
 match="macro-runquotes"
 enabled="y"
 send_to="14"
 sequence="100"
 >
<send>os.Execute("Notepad "..sdir.."texts/quotes.txt")</send>
 </alias>
 <alias
 match="d"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>if (gs("tts") == true) then
if gs("imove")==true then Execute("tts_stop") end
end
if (map==1) then
AppendToNotepad("map", "d;")
end
if (stealth==1) then
PSend("sneak d")
return
end
PSend("d")</send>
 </alias>
 <alias
 match="dik"
 enabled="y"
 sequence="100"
 >
 <send>c dispel $k</send>
 </alias>
 <alias
 match="disk"
 enabled="y"
 sequence="100"
 >
 <send>disarm $k</send>
 </alias>
 <alias
 match="hark"
 enabled="y"
 sequence="100"
 >
 <send>c harm $k</send>
 </alias>
 <alias
 match="he2"
 enabled="y"
 sequence="100"
 >
 <send>heal $v2</send>
 </alias>
 <alias
 match="baw *k"
 enabled="y"
 sequence="99"
 >
 <send>bank withdraw %1000</send>
 </alias>
 <alias
 match="he3"
 enabled="y"
 sequence="100"
 >
 <send>heal $v3</send>
 </alias>
 <alias
 match="hem"
 enabled="y"
 sequence="100"
 >
 <send>heal $me</send>
 </alias>
 <alias
 match="+ *"
 enabled="y"
 sequence="100"
 >
 <send>%Send $chan %1</send>
 </alias>
 <alias
 match="het"
 enabled="y"
 sequence="100"
 >
 <send>heal $t</send>
 </alias>
 <alias
 match="Slist *"
 enabled="y"
 sequence="100"
 >
 <send>spell list | grep %1
skill list | grep %1</send>
 </alias>
 <alias
 match="^(.*?)(\w+)k"
 enabled="y"
 sequence="100"
 >
 <send>nod</send>
 </alias>
 <alias
 match="v *"
 enabled="y"
 sequence="100"
 >
 <send>var %1</send>
 </alias>
 <alias
 match="macro-runset *"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>Note("Notepad "..sdir.."texts/sets/%1.txt")</send>
 </alias>
 <alias
 match="macro-sacc"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>require "wait"
wait.make(function()
autosac=true
PSend("get all corpse")
wait.time(0.5)
if (carryblock==1) then
Note("Corpse is not empty. Not sacrificing.")
else
if kskills["consume"]==1 then
Send("control all consume corpse")
end
if kskills["bloodsacrifice"]==1 then
Send("bloodsac corpse")
end
if kskills["corpsecutter"]==1 then
Send("harv spellcomp corpse")
end
if kskills["harvestteeth"]==1 then
Send("harv teeth corpse")
else
Send("sac corpse")
end
end
end)</send>
 </alias>
 <alias
 match="macro-sacc2"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>
autosac=true
if kskills["consume"]==1 then
Send("control all consume corpse")
end
if kskills["bloodsacrifice"]==1 then
Send("bloodsac corpse")
end
if kskills["corpsecutter"]==1 then
Send("harv spellcomp corpse")
end
if kskills["harvestteeth"]==1 then
Send("harv teeth corpse")
else
Send("sac corpse")
end</send>
 </alias>

 <alias
 match="vg *"
 enabled="y"
 sequence="100"
 >
 <send>var gold %1</send>
 </alias>
 <alias
 match="mn"
 enabled="y"
 sequence="100"
 >
 <send>mana</send>
 </alias>
 <alias
 match="vk *"
 enabled="y"
 sequence="100"
 >
 <send>var k %1</send>
 </alias>
 <alias
 match="ds *"
 enabled="y"
 sequence="100"
 >
 <send>drop %1
sac %1</send>
 </alias>
 <alias
 match="e"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>if (gs("tts") == true) then
if gs("imove")==true then Execute("tts_stop") end
end
if (map==1) then
AppendToNotepad("map", 'e;')
end
if (stealth==1) then
PSend("sneak e")
return
end
PSend("e")</send>
 </alias>
 <alias
 match="mv"
 enabled="y"
 sequence="100"
 >
 <send>movement</send>
 </alias>
 <alias
 match="fiw"
 enabled="y"
 sequence="100"
 >
 <send>c fireweb</send>
 </alias>
 <alias
 match="fiw *"
 enabled="y"
 sequence="100"
 >
 <send>c fireweb %1</send>
 </alias>
 <alias
 match="hev"
 enabled="y"
 sequence="100"
 >
 <send>heal $v</send>
 </alias>
 <alias
 match="fok"
 enabled="y"
 sequence="100"
 >
 <send>follow $k</send>
 </alias>
 <alias
 match="sg *"
 enabled="y"
 sequence="100"
 >
 <send>steal gold %1</send>
 </alias>
 <alias
 match="idlk"
 enabled="y"
 sequence="100"
 >
 <send>idle $k</send>
 </alias>
 <alias
 match="frok"
 enabled="y"
 sequence="100"
 >
 <send>c frost $k</send>
 </alias>
 <alias
 match="sg10"
 enabled="y"
 sequence="100"
 >
 <send>steal gold 10.$k</send>
 </alias>
 <alias
 match="b"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>if (gs("tts") == true) then
if gs("imove") then Execute("tts_stop") end
if (map==1) then
AppendToNotepad("map", "backward;")
end
PSend("backward")
end</send>
 </alias>
 <alias
 match="kik"
 enabled="y"
 sequence="100"
 >
 <send>kick $k</send>
 </alias>
 <alias
 match="fsk"
 enabled="y"
 sequence="100"
 >
 <send>c flamestrike $k</send>
 </alias>
 <alias
 match="bad *"
 enabled="y"
 sequence="100"
 >
 <send>bank deposit %1</send>
 </alias>
 <alias
 match="bada"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>Execute("bank deposit " .. gold)</send>
 </alias>
 <alias
 match="vt *"
 enabled="y"
 sequence="100"
 >
 <send>var t %1</send>
 </alias>
 <alias
 match="n"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>if (gs("tts") == true) then
if gs("imove")==true then Execute("tts_stop") end
end
if (map==1) then
AppendToNotepad("map", "n;")
end
if (stealth==1) then
PSend("sneak n")
return
end
PSend("n")</send>
 </alias>
 <alias
 match="w"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>if (gs("tts") == true) then
if gs("imove")==true then Execute("tts_stop") end
end
if (map==1) then
AppendToNotepad("map", "w;")
end

if (stealth==1) then
PSend("sneak w")
return
end

PSend("w")</send>
 </alias>
 <alias
 match="ne"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>if (gs("tts") == true) then
if gs("imove")==true then Execute("tts_stop") end
end
if (map==1) then
AppendToNotepad("map", "ne;")
end
if (stealth==1) then
PSend("sneak ne")
return
end
PSend("ne")</send>
 </alias>
 <alias
 match="wc *"
 enabled="y"
 sequence="100"
 >
 <send>%1 | wc</send>
 </alias>
 <alias
 match="gg"
 enabled="y"
 sequence="100"
 >
 <send>drop gold
get gold</send>
 </alias>
 <alias
 match="em5"
 enabled="y"
 sequence="100"
 >
 <send>count emerald disc</send>
 </alias>
 <alias
 match="nlist"
 enabled="y"
 sequence="100"
 >
 <send>slist | grep not learned</send>
 </alias>
 <alias
 match="enc *"
 enabled="y"
 sequence="100"
 >
 <send>c enchant armor %1
c id %1</send>
 </alias>
 <alias
 match="entk"
 enabled="y"
 sequence="100"
 >
 <send>c entangl $k</send>
 </alias>
 <alias
 match="sg11"
 enabled="y"
 sequence="100"
 >
 <send>steal gold 11.$k</send>
 </alias>
 <alias
 match="fwk"
 enabled="y"
 sequence="100"
 >
 <send>c fireweb $k</send>
 </alias>
 <alias
 match="sg12"
 enabled="y"
 sequence="100"
 >
 <send>steal gold 12.$k</send>
 </alias>
 <alias
 match="fwk"
 enabled="y"
 sequence="100"
 >
 <send>c fireweb $k</send>
 </alias>
 <alias
 match="sg13"
 enabled="y"
 sequence="100"
 >
 <send>steal gold 13.$k</send>
 </alias>
 <alias
 match="ga"
 enabled="y"
 sequence="100"
 >
 <send>get all</send>
 </alias>
 <alias
 match="sg14"
 enabled="y"
 sequence="100"
 >
 <send>steal gold 14.$k</send>
 </alias>
 <alias
 match="baw *"
 enabled="y"
 sequence="100"
 >
 <send>bank withdraw %1</send>
 </alias>
 <alias
 match="ga *"
 enabled="y"
 sequence="100"
 >
 <send>get all %1</send>
 </alias>
 <alias
 match="sg2"
 enabled="y"
 sequence="100"
 >
 <send>steal gold 2.$k</send>
 </alias>
 <alias
 match="bid *k"
 enabled="y"
 sequence="100"
 >
 <send>bid %1000</send>
 </alias>
 <alias
 match="gac"
 enabled="y"
 sequence="100"
 >
 <send>get all corpse</send>
 </alias>
 <alias
 match="bok"
 enabled="y"
 sequence="100"
 >
 <send>c icebolt $k</send>
 </alias>
 <alias
 match="stek *"
 enabled="y"
 sequence="100"
 >
 <send>steal %1 $k</send>
 </alias>
 <alias
 match="bsk"
 enabled="y"
 sequence="100"
 >
 <send>rem $hit
wield $stab
bs $k
rem $stab
wield $hit</send>
 </alias>
 <alias
 match="whk"
 enabled="y"
 sequence="100"
 >
 <send>where $k</send>
 </alias>
 <alias
 match="stl"
 enabled="y"
 sequence="100"
 >
 <send>stor list</send>
 </alias>
 <alias
 match="noxk"
 enabled="y"
 sequence="100"
 >
 <send>c nox $k</send>
 </alias>
 <alias
 match="stl *"
 enabled="y"
 sequence="100"
 >
 <send>stor list %1
</send>
 </alias>
 <alias
 match="nw"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>if (gs("tts") == true) then
if gs("imove")==true then Execute("tts_stop") end
end
if (map==1) then
AppendToNotepad("map", "nw;")
end
if (stealth==1) then
PSend("sneak nw")
return
end

PSend("nw")</send>
 </alias>
 <alias
 match="stp *"
 enabled="y"
 sequence="100"
 >
 <send>stor put %1</send>
 </alias>
 <alias
 match="of *"
 enabled="y"
 sequence="100"
 >
 <send>order followers %1</send>
 </alias>
 <alias
 match="mst */*"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>for w in string.gmatch("%1", "%a+") do
PSend("tell "..w.." %2")
end</send>
 </alias>
 <alias
 match="ep"
 enabled="y"
 sequence="100"
 >
 <send>ent portal</send>
 </alias>
 <alias
 match="offset"
 enabled="y"
 sequence="100"
 >
 <send>who -level | grep offset</send>
 </alias>
 <alias
 match="opd"
 enabled="y"
 sequence="100"
 >
 <send>open door</send>
 </alias>
 <alias
 match="extl"
 enabled="y"
 sequence="100"
 >
 <send>exting lantern</send>
 </alias>
 <alias
 match="fa *"
 enabled="y"
 sequence="100"
 >
 <send>friend add %1</send>
 </alias>
 <alias
 match="sg3"
 enabled="y"
 sequence="100"
 >
 <send>steal gold 3.$k</send>
 </alias>
 <alias
 match="gaf"
 enabled="y"
 sequence="100"
 >
 <send>gather firewood</send>
 </alias>
 <alias
 match="sg4"
 enabled="y"
 sequence="100"
 >
 <send>steal gold 4.$k</send>
 </alias>
 <alias
 match="sg5"
 enabled="y"
 sequence="100"
 >
 <send>steal gold 5.$k</send>
 </alias>
 <alias
 match="sg6"
 enabled="y"
 sequence="100"
 >
 <send>steal gold 6.$k</send>
 </alias>
 <alias
 match="bsw *"
 enabled="y"
 sequence="100"
 >
 <send>rem $hit
rem $held
wield $stab
bs %1
rem $stab
hold $held
wield $hit</send>
 </alias>
 <alias
 match="ggc"
 enabled="y"
 sequence="100"
 >
 <send>get coins corpse ground</send>
 </alias>
 <alias
 match="sg7"
 enabled="y"
 sequence="100"
 >
 <send>steal gold 7.$k</send>
 </alias>
 <alias
 match="buc"
 enabled="y"
 sequence="100"
 >
 <send>remove dagger
wield sword
butcher corpse
rest</send>
 </alias>
 <alias
 match="gi* *k gold *"
 enabled="y"
 sequence="100"
 >
 <send>give %2000 gold %3</send>
 </alias>
 <alias
 match="calc *k"
 enabled="y"
 sequence="100"
 >
 <send>calc %1*1000</send>
 </alias>
 <alias
 match="sts *"
 enabled="y"
 sequence="100"
 >
 <send>stor get %1
drop %1
sac %1</send>
 </alias>
 <alias
 match="calc *m"
 enabled="y"
 sequence="100"
 >
 <send>calc %1*1000000</send>
 </alias>
 <alias
 match="submit"
 enabled="y"
 sequence="100"
 >
 <send>br pot submit i</send>
 </alias>
 <alias
 match="cbk"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>PSend("c ball lightning $k")
casting="ball lightning $k"</send>
 </alias>
 <alias
 match="sum"
 enabled="y"
 sequence="100"
 >
 <send>c sum $sum</send>
 </alias>
 <alias
 match="opd *"
 enabled="y"
 sequence="100"
 >
 <send>open door %1</send>
 </alias>
 <alias
 match="sumk"
 enabled="y"
 sequence="100"
 >
 <send>c summon $k</send>
 </alias>
 <alias
 match="cnv"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>Execute("condition $v")</send>
 </alias>
 <alias
 match="opg"
 enabled="y"
 sequence="100"
 >
 <send>open gate</send>
 </alias>
 <alias
 match="sw"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>if (gs("tts") == true) then
if gs("imove")==true then Execute("tts_stop") end
end
if (map==1) then
AppendToNotepad("map", "sw;")
end
if (stealth==1) then
PSend("sneak sw")
return
end

PSend("sw")</send>
 </alias>
 <alias
 match="opgs"
 enabled="y"
 sequence="100"
 >
 <send>open gates</send>
 </alias>
 <alias
 match="fak"
 enabled="y"
 sequence="100"
 >
 <send>c faerie fire $k</send>
 </alias>
 <alias
 match="ot"
 enabled="y"
 sequence="100"
 >
 <send>scan</send>
 </alias>
 <alias
 match="fame *"
 enabled="y"
 sequence="100"
 >
 <send>who fame | grep %1</send>
 </alias>
 <alias
 match="ph"
 enabled="y"
 sequence="100"
 >
 <send>pray here</send>
 </alias>
 <alias
 match="fb *"
 enabled="y"
 sequence="100"
 >
 <send>remove %1
c flame blade %1
wield %1</send>
 </alias>
 <alias
 match="ffk"
 enabled="y"
 sequence="100"
 >
 <send>c frost $k
flee</send>
 </alias>
 <alias
 match="fif"
 enabled="y"
 sequence="100"
 >
 <send>c firefield</send>
 </alias>
 <alias
 match="sg8"
 enabled="y"
 sequence="100"
 >
 <send>steal gold 8.$k</send>
 </alias>
 <alias
 match="giag *"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>Execute("give " .. gold .. " gold %1")</send>
 </alias>
 <alias
 match="sg9"
 enabled="y"
 sequence="100"
 >
 <send>steal gold 9.$k</send>
 </alias>
 <alias
 match="sgk"
 enabled="y"
 sequence="100"
 >
 <send>steal gold $k</send>
 </alias>
 <alias
 match="gim *"
 enabled="y"
 sequence="100"
 >
 <send>give %1 $alt</send>
 </alias>
 <alias
 match="shutup"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>Send("abort")</send>
 </alias>
 <alias
 match="fq *"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>
sf(tonumber("%1"),sdir.."/sounds/spells/ball lightning.ogg")
</send>
 </alias>

 <alias
 match="cck"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>PSend("c cone $k")
casting="cone $k"</send>
 </alias>
 <alias
 match="sk"
 enabled="y"
 sequence="100"
 >
 <send>skills | prefix skl
spells | prefix skl
uabort | prefix skl</send>
 </alias>
 <alias
 match="ccs"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>PSend("c cry spear")
casting="crystal spear"</send>
 </alias>
 <alias
 match="gns"
 enabled="y"
 sequence="100"
 >
 <send>gr purpose noshow</send>
 </alias>
 <alias
 match="cgk"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>PSend("c gre $k")
casting="greater fireball $k"</send>
 </alias>
 <alias
 match="ch2"
 enabled="y"
 sequence="100"
 >
 <send>c heal $2</send>
 </alias>
 <alias
 match="syh *"
 enabled="y"
 sequence="100"
 >
 <send>say yo, heal %1</send>
 </alias>
 <alias
 match="ch3"
 enabled="y"
 sequence="100"
 >
 <send>c heal$3</send>
 </alias>
 <alias
 match="pick *"
 enabled="y"
 send_to="14"
 sequence="100"
 >
 <send>pick="%1"
PSend("pick %1")</send>
 </alias>
 <alias
 match="po *"
 enabled="y"
 sequence="100"
 >
 <send>pickpocket %1</send>
 </alias>
 <alias
 match="systime"
 enabled="y"
 sequence="100"
 >
 <send>time | grep Current</send>
 </alias>
 <alias
 match="pok"
 enabled="y"
 sequence="100"
 >
 <send>pickpocket $k</send>
 </alias>
 <alias
 match="pok10"
 enabled="y"
 sequence="100"
 >
 <send>pickpocket 10.$k</send>
 </alias>

 <alias
 match="pok10"
 enabled="y"
 sequence="100"
 >
 <send>pickpocket 10.$k</send>
 </alias>
</aliases>

<!-- Timers -->
<timers>
 <timer minute="1" name="aminutes" second="0.00" offset_second="0.00" send_to="12"
>
 <send>if not amins then amins=0 else amins=amins+1
end</send>

 </timer>
</timers>

<timers>
 <timer enabled="y" minute="5" second="0.00" offset_second="0.00" send_to="12"
>
 <send>if (gs("showtips")==true) then
if not f then return end
 s = f:read ("*l") -- read one line
 if s then -- if not end of file (EOF)
require "wait"
wait.make(function()
Sound(sdir.."/sounds/notifications/showtip.ogg")
Note("Tip!")
wait.time(1)
 print (s) -- print that line
print("Type config showtips to disable these tips.")
end)
 end
end
</send>

 </timer>
</timers>
<timers>
 <timer name="ambiencetimer" script="ambtimer" second="45.60" offset_second="0.00" >
 </timer>

 <timer name="grtimer" script="grtimer" second="2.60" offset_second="0.00" >
 </timer>
</timers>
<!-- Script -->


<script>
<![CDATA[
PPI = require("ppi")
ppi = PPI.Load("aedf0cb0be5bf045860d54b7")
 if not ppi then
 error("Dependency plugin not installed!")
 end
function recastparse(n,l,w)
act=split(w[1]," ")
if act[1]=="help" then
Note("Possible commands are:")
Note("recast create <name> create a new recast set")
Note("recast create <name> from <name> create a new recast set with spell configurations from another set")
Note("recast list - show the list of sets")
Note("recast switch <name> - to switch between sets.")
Note("recast on,off - to toggle recasting on and off.")
Note("recast remove - remove a set entirely")
Note("The recast command, typed by itself, shows a list of spells in the current active set that you can enable or disable by clicking ok on a spell. when you hit cancel, your changes are saved.")
elseif act[1]=="list" then
if recast==nil then
recast={}
recast.default={}
recast.active="default"
recastdefaults(recast.active)
end --no recast table
Note("List of recast sets:")
for k,v in pairs(recast) do
if type(v)=="table" then Note(k) end
end
elseif act[1]=="switch" then
if #act~=2 then
Note("Sintax: recast switch <name>")
Execute("recast list")
return
else
if recast[act[2]]~=nil then
recast.active=act[2]
Note("Switched to set "..act[2])
else
Note("set "..act[2].." does not exist. You'll need to create it first.")
return
end --recast is nil
end --act[2] valid
elseif act[1]=="remove" then
if #act~=2 then
Note("Sintax: recast remove <name>")
Execute("recast list")
return
else
if act[2]=="default" then
Note("You cannot remove the default set.")
return
end
if recast[act[2]]~=nil then
recast[act[2]]=nil
recast.active="default"
Note("removed set "..act[2].." and switched to default.")
else
Note("set "..act[2].." does not exist.")
return
end --recast is nil
end --act[2] not valid
elseif act[1]=="create" then
if #act<2 then
Note("Sintax: recast create <name>")
return
else
recast[act[2]]={}
recast.active=act[2]
recastdefaults(recast.active)
Note("Set "..act[2].." created successfully!")
if act[3]=="from" and act[4]~=nil then
if recast[act[4]]~=nil then
recast[act[2]]=recast[act[4]]
Note("inherited spells from "..act[4])
else
Note("set "..act[4].." does not exist, creation aborted.")
Execute("recast remove "..act[2])
end --is not nil
end --act 4 from
end --create has 2 items
elseif act[1]=="on" then
Note("Recast enabled")
ss("recast",true)
return
elseif act[1]=="off" then
Note("Recast disabled")
ss("recast",false)
return
else
Note("Unrecognized command.")
Execute("recast help")
end --main if
end --func
function process_recipe()
time=2000
sitems=ritems
for i=1,ritems do
restime=time/sitems
actualtime=restime/1000
sitems=sitems-1
DoAfterSpecial(actualtime,'Sound(GetInfo(67).."sounds/brewing/ing/"..math.random(1,3)..".ogg")',12)
end
end
function leadercheck(n,l,w)
if (w[10]=="] (leader)") then
leader=w[1]
end
end
function storecapture(n,l,w)
if filtering==true then
if IsInTable(storefilter,w[1])==0 then
Send("storage get "..w[1])
Send("put "..w[1].." "..gs("container"))
table.insert(storefilter,w[1])
end
else
Send("storage get "..w[1])
Send("put "..w[1].." "..gs("container"))
end
end
function itemfoundtime(n,l,w)
if ecnum==0 then ecnum=1 end
containers[w[1]]=ecnum.."."..containerstocheck[1]
end
function remove_nonexistant()
if eql[act[2]].head==nil then
remeqs(cup.head)
end
if eql[act[2]].neck1==nil then
remeqs(cup.neck1)
end
if (eql[act[2]].neck1==nil and eql[act[2]].neck2==nil) then
remeqs(cup.neck2)
end
if eql[act[2]].arms==nil then
remeqs(cup.arms)
end
if (eql[act[2]].wrist1==nil and eql[act[2]].wrist2==nil) then
remeqs(cup.wrist2)
end
if (eql[act[2]].neck1==nil and eql[act[2]].neck2==nil) then
remeqs(cup.wrist2)
end
if eql[act[2]].hands==nil then
remeqs(cup.hands)
end
if (eql[act[2]].finger1==nil and eql[act[2]].finger2==nil) then
remeqs(cup.finger1)
end
if (eql[act[2]].finger1==nil and eql[act[2]].finger2==nil) then
remeqs(cup.finger2)
end
if eql[act[2]].body==nil then
remeqs(cup.body)
end
if eql[act[2]].abody==nil then
remeqs(cup.abody)
end
if eql[act[2]].waist==nil then
remeqs(cup.waist)
end
if eql[act[2]].legs==nil then
remeqs(cup.legs)
end
if eql[act[2]].feet==nil then
remeqs(cup.feet)
end
if eql[act[2]].shield==nil then
remeqs(cup.shield)
end
if eql[act[2]].wielded==nil then
remeqs(cup.wielded)
end
if eql[act[2]].held==nil then
remeqs(cup.held)
end
end
function containertime(n,l,w)
ecnum=w[1]
Send("look in "..w[1].."."..containerstocheck[1].." -insult -wieldable -wearable | prefix cc")
end
function movetime()
eql[act[2]].container=act[3]
for i,v in pairs(eql[act[2]].pieces) do
if table.contains(cup,v) then
eql.pieces[v]=act[3]
else
moveeq(v)
end
end --for
end --func
function allpieces()
for i,v in pairs(cup) do
if eql.pieces[v]~=nil then
eql.pieces[v]=eql[eql.lastset].container
end --if
end --for
end --func
function table.size(t)
sizecount=0
for i in pairs(t) do sizecount=sizecount+1
end
return sizecount
end
function wearlight()
if table.size(cup)>0 then
Send("remove all")
allpieces()
Send("put all "..eql[eql.lastset].container.." | prefix mzc")
cup={}
end --cup
if eql[act[2]].wielded~=nil then
v=eql[act[2]].wielded
if eql.pieces[v]=="storage" then
str="storage get "..v.." | prefix mzc"
Send(str)
else
container=getcontainer(v)
str="get "..v.." "..container.." | prefix mzc"
Send(str)
end
Send("wield "..v.." -force")
end --wielded
for i,v in pairs(eql[act[2]].pieces) do
if eql.cancarry<1 then
Send("wear all")
eql.cancarry=eql.maxitems-eql.items
end
if eql.pieces[v]=="storage" then
str="storage get "..v.." | prefix mzc"
Send(str)
else
container=getcontainer(v)
str="get "..v.." "..container.." | prefix mzc"
Send(str)
end
eql.cancarry=eql.cancarry-1
end --for
eql.cancarry=eql.maxitems-eql.items
Send("wear all")
Send("lecho set_worn")
end
function prevadd(n,l,w)
prevweight=prevweight+w[1]
previtems=previtems+1
end
function prevdone(n,l,w)
Note("preview found "..previtems.." items, with a weight of "..prevweight.." pounds.")
end
function weartime()
eql.removing=false
eql.coincidecount=0
if eql[act[2]].mode==3 then
Send("score | grep carrying | prefix icheck")
return
end --mode3
if eql[act[2]].mode==2 then
for i,v in pairs(eql[act[2]].pieces) do
if table.contains(cup,v) then
eql.coincidecount=eql.coincidecount+1
end --if
end --for
if eql.coincidecount<10 then
if table.size(cup)>0 then
Send("remove all")
allpieces()
Send("put all "..eql[eql.lastset].container.." | prefix mzc")
cup={}
end --length
end --coincide
meticulouswear()
end --if mode is 2
if eql[act[2]].mode==1 then
meticulouswear()
end
Send("lecho set_worn")
end --func
function meticulouswear()
--begin
remove_nonexistant()
for i,v in pairs(eql[act[2]]) do
if i=="head" then
uuid=eql[act[2]].head
if moving then moveeq(uuid) else
if cup.head==uuid then
else
remeqs(cup.head)
if eql.pieces[uuid]=="storage" then
str="storage get "..uuid.." | prefix mzc" Send(str) Send("wear "..uuid.." head")
else
container=getcontainer(uuid)

str="get "..uuid.." "..container.." | prefix mzc" Send(str) Send("wear "..uuid.." head")
end
end
end
end
if i=="neck1" then
uuid=eql[act[2]].neck1
if moving then moveeq(uuid) else
if (cup.neck1==uuid or cup.neck2==uuid) then
else
remeqs(cup.neck1)
if eql.pieces[uuid]=="storage" then
str="storage get "..uuid.." | prefix mzc" Send(str) Send("wear "..uuid.." neck")
else
container=getcontainer(uuid)
str="get "..uuid.." "..container.." | prefix mzc" Send(str) Send("wear "..uuid.." neck")
end
end
end
end
if i=="neck2" then
uuid=eql[act[2]].neck2
if moving then moveeq(uuid) else
if (cup.neck1==uuid or cup.neck2==uuid) then
else
remeqs(cup.neck2)
if eql.pieces[uuid]=="storage" then
str="storage get "..uuid.." | prefix mzc" Send(str) Send("wear "..uuid.." neck")
else
container=getcontainer(uuid)
str=
"get "..uuid.." "..container.." | prefix mzc" Send(str) Send("wear "..uuid.." neck")
end
end
end
end
if i=="arms" then
uuid=eql[act[2]].arms
if moving then moveeq(uuid) else
if cup.arms==uuid then
else
remeqs(cup.arms)
if eql.pieces[uuid]=="storage" then
str="storage get "..uuid.." | prefix mzc" Send(str) Send("wear "..uuid.." arms")
else
container=getcontainer(uuid)
str="get "..uuid.." "..container.." | prefix mzc" Send(str) Send("wear "..uuid.." arms")
end
end
end
end
if i=="wrist1" then
uuid=eql[act[2]].wrist1
if moving then moveeq(uuid) else
if (cup.wrist1==uuid or cup.wrist2==uuid) then
else
remeqs(cup.wrist1)
if eql.pieces[uuid]=="storage" then
str="storage get "..uuid.." | prefix mzc" Send(str) Send("wear "..uuid.." wrist")
else
container=getcontainer(uuid)
str="get "..uuid.." "..container.." | prefix mzc" Send(str) Send("wear "..uuid.." wrist")
end
end
end
end
if i=="wrist2" then
uuid=eql[act[2]].wrist2
if moving then moveeq(uuid) else
if (cup.wrist1==uuid or cup.wrist2==uuid) then
else
remeqs(cup.wrist2)
if eql.pieces[uuid]=="storage" then
str="storage get "..uuid.." | prefix mzc" Send(str) Send("wear "..uuid.." wrist")
else
container=getcontainer(uuid)
str="get "..uuid.." "..container.." | prefix mzc" Send(str) Send("wear "..uuid.." wrist")
end
end
end
end
if i=="hands" then
uuid=eql[act[2]].hands
if moving then moveeq(uuid) else
if cup.hands==uuid then
else
remeqs(cup.hands)
if eql.pieces[uuid]=="storage" then
str="storage get "..uuid.." | prefix mzc" Send(str) Send("wear "..uuid.." hands")
else
container=getcontainer(uuid)
str="get "..uuid.." "..container.." | prefix mzc" Send(str) Send("wear "..uuid.." hands")
end
end
end
end
if i=="finger1" then
uuid=eql[act[2]].finger1
if moving then moveeq(uuid) else
if (cup.finger1==uuid or cup.finger2==uuid) then
else
remeqs(cup.finger1)
if eql.pieces[uuid]=="storage" then
str="storage get "..uuid.." | prefix mzc" Send(str) Send("wear "..uuid.." finger")
else
container=getcontainer(uuid)
str="get "..uuid.." "..container.." | prefix mzc" Send(str) Send("wear "..uuid.." finger")
end
end
end
end
if i=="finger2" then
uuid=eql[act[2]].finger2

if moving then moveeq(uuid) else
if (cup.finger1==uuid or cup.finger2==uuid) then
else
remeqs(cup.finger2)

if eql.pieces[uuid]=="storage" then
str="storage get "..uuid.." | prefix mzc" Send(str) Send("wear "..uuid.." finger")
else
container=getcontainer(uuid)
str="get "..uuid.." "..container.." | prefix mzc" Send(str) Send("wear "..uuid.." finger")
end
end
end
end
if i=="body" then
uuid=eql[act[2]].body

if moving then moveeq(uuid) else
if cup.body==uuid then
else
remeqs(cup.body)
if eql.pieces[uuid]=="storage" then
str="storage get "..uuid.." | prefix mzc" Send(str) Send("wear "..uuid.." on")
else
container=getcontainer(uuid)
str="get "..uuid.." "..container.." | prefix mzc" Send(str) Send("wear "..uuid.." on")
end
end
end
end
if i=="abody" then
uuid=eql[act[2]].abody
if moving then moveeq(uuid) else
if cup.abody==uuid then
else
remeqs(cup.abody)
if eql.pieces[uuid]=="storage" then
str="storage get "..uuid.." | prefix mzc" Send(str) Send("wear "..uuid.." about")
else
container=getcontainer(uuid)
str="get "..uuid.." "..container.." | prefix mzc" Send(str) Send("wear "..uuid.." about")
end
end
end
end
if i=="waist" then
uuid=eql[act[2]].waist
if moving then moveeq(uuid) else
if cup.waist==uuid then
else
remeqs(cup.waist)
if eql.pieces[uuid]=="storage" then
str="storage get "..uuid.." | prefix mzc" Send(str) Send("wear "..uuid.." waist")
else
container=getcontainer(uuid)
str="get "..uuid.." "..container.." | prefix mzc" Send(str) Send("wear "..uuid.." waist")
end
end
end
end
if i=="legs" then
uuid=eql[act[2]].legs

if moving then moveeq(uuid) else
if cup.legs==uuid then
else
remeqs(cup.legs)
if eql.pieces[uuid]=="storage" then
str="storage get "..uuid.." | prefix mzc" Send(str) Send("wear "..uuid.." legs")
else
container=getcontainer(uuid)
str="get "..uuid.." "..container.." | prefix mzc" Send(str) Send("wear "..uuid.." legs")
end
end
end
end
if i=="feet" then
uuid=eql[act[2]].feet

if moving then moveeq(uuid) else
if cup.feet==uuid then
else
remeqs(cup.feet)
if eql.pieces[uuid]=="storage" then
str="storage get "..uuid.." | prefix mzc" Send(str) Send("wear "..uuid.." feet")
else
container=getcontainer(uuid)
str="get "..uuid.." "..container.." | prefix mzc" Send(str) Send("wear "..uuid.." feet")
end
end
end
end
if i=="shield" then
uuid=eql[act[2]].shield
if moving then moveeq(uuid) else
if cup.shield==uuid then
else
remeqs(cup.shield)
if eql.pieces[uuid]=="storage" then
str="storage get "..uuid.." | prefix mzc" Send(str) Send("wear "..uuid.." shield")
else
container=getcontainer(uuid)
str="get "..uuid.." "..container.." | prefix mzc" Send(str) Send("wear "..uuid.." shield")
end 
end
end
end
if i=="wielded" then
uuid=eql[act[2]].wielded
if moving then moveeq(uuid) else
if cup.wielded==uuid then
else
remeqs(cup.wielded)
if eql.pieces[uuid]=="storage" then
str="storage get "..uuid.." | prefix mzc" Send(str) Send("wield "..uuid.." -force") 
else
container=getcontainer(uuid)
str="get "..uuid.." "..container.." | prefix mzc" Send(str) Send("wield "..uuid.." -force")
end
end
end
end
if i=="held" then
uuid=eql[act[2]].held

if moving then moveeq(uuid) else
if cup.held==uuid then
else
remeqs(cup.held)
if eql.pieces[uuid]=="storage" then
str="storage get "..uuid.." | prefix mzc" Send(str) Send("hold "..uuid)
else
container=getcontainer(uuid)
str="get "..uuid.." "..container.." | prefix mzc" Send(str) Send("hold "..uuid)
end
end
end
end
end --for
cup={}
--end stop copying here
end
function itemfunc(n,l,w)
uuid=w[1]
name=w[2]
if IsInTable(f_uuids,uuid)==1 then
s_found=s_found+1
else
s_errors=s_errors+1
AppendToNotepad("errors",name..", "..uuid.."\r\n")
end
end
function moveeq(piece)
oldc=eql.pieces[piece]
if oldc==eql[act[2]].container then
return
end

if oldc=="storage" then
Send("storage get "..piece.."")
else
Send("get "..piece.." "..oldc.."")
end
if eql[act[2]].container=="storage" then
Send("storage put "..piece.."")
else
Send("put "..piece.." "..eql[act[2]].container.."")
end
eql.pieces[piece]=eql[act[2]].container
end
function weareq(moving)
if moving then
oldc=eql.pieces[piece]
eql[act[2]].container=act[3]
end
end --function
function remeq(uuid)
if not removedall then Send("remove all")
removedall=true
end
if eql.pieces[uuid]==nil then
if act[2].container=="storage" then
Send("storage put "..uuid.." | prefix mzc")
else
Send("put "..uuid.." "..eql[act[2]].container.." | prefix mzc")
end
else
if eql.pieces[uuid]=="storage" then
Send("storage put "..uuid.." | prefix mzc")
else
Send("put "..uuid.." "..eql.pieces[uuid].." | prefix mzc")
end
end
end
function remeqs	(uuid)
if uuid==nil then return end
Send("remove "..uuid)
if eql.pieces[uuid]==nil then
if act[2].container=="storage" then
Send("storage put "..uuid.." | prefix mzc")
else
Send("put "..uuid.." "..eql[act[2]].container.." | prefix mzc")
end
eql.pieces[uuid]=eql[act[2]].container
else
if eql.pieces[uuid]=="storage" then
Send("storage put "..uuid.." | prefix mzc")
else
Send("put "..uuid.." "..eql.pieces[uuid].." | prefix mzc")
end
end
end
function getcontainer(uuid)
if containers[uuid]==nil then
return eql.pieces[uuid]
end
return containers[uuid]
end
function eqlwear(set)
if eql.wearing then
containers={}
containerstocheck={}
if eql[act[2]].mode==3 then
end
for i,v in pairs(eql[act[2]].pieces) do
if eql.pieces[v]==nil then
eql.pieces[v]=eql[act[2]].container
end
if (eql.pieces[v]~="storage" and IsInTable(containerstocheck,eql.pieces[v])==0) then
table.insert(containerstocheck,eql.pieces[v])
end --if
end --for
if eql[act[2]].mode==3 and eql[act[2]].container~="tensor" then
container=eql[act[2]].container
Send("insult -all | prefix eqlc")
Send("lecho wearing_time")
else
if #containerstocheck>0 then
Send("lecho container_check 1")
else
container=eql[act[2]].container
Send("insult -all | prefix eqlc")
Send("lecho wearing_time")
end
end
end
end
function table.value(t,v)
for i,value in pairs(t) do
if value==v then
return i
end
end
end
function zmap(n,l,w)
act=split(w[1]," ")
if act[1]=="help" then
Execute("zmap")
elseif act[1]=="undo" then
if #curmap>=3 then
Note("removed "..curmap[#curmap].." from map.")
curmap[#curmap]=nil
else
Note("We've got an empty map, can't remove anymore.")
end
elseif act[1]=="door" then
if not mtime then
Note("You aren't creating a map right now... use zmap start to create one.")
return
end
if act[2]==nil then
Note("sintax: zmap door name")
return
else
dstr=""
for i,v in pairs(act) do
if i>1 then
dstr=dstr.." "..v
end --number
end --for
table.insert(curmap,dstr)
Note(dstr.." added to map.")
end --act2 nil
elseif act[1]=="pause" then
mtime=false
mtimep=true
Note("direction recording paused. use zmr or zmap resume to continue logging directions.")
elseif act[1]=="resume" then
if not mvtime then
if mtimep then
Note("Now recording directions again.")
mtime=true
return
end
Note("You aren't currently moving to a map!")
return
end
Note("Resuming map.")
donemap=0
mvtime=true
EnableTimer("maptimer",false)
Send(curmap[1].." | tail 1 | prefix moving")
EnableTimer("maptimer",false)
elseif act[1]=="goback" then
mback=true
donemap=0
EnableTimer("maptimer",false)
c1=os.clock()
if pose~="stand" then
Send("stand")
end
mvtime=true
adir=0
maxdir=#curmap
movemapnow()
elseif act[1]=="list" then
c,e=utils.readdir(GetInfo(67).."/maps/*.mzmap")
assert (c,e)
for i,v in pairs(c) do
Note(utils.split(i,".")[1])
end
elseif act[1]=="go" then
mtimep=false
mback=false
mapback={}
donemap=0
EnableTimer("maptimer",false)
c1=os.clock()
if act[2]==nil then
Note("sintax: zmap go mapname")
return
else
if (FileExists(GetInfo(67).."/maps/"..act[2]..".mzmap")==true) then
dofile(GetInfo(67).."/maps/"..act[2]..".mzmap")
Send("l | head 1 | prefix mapmove")
else
Note("Map "..act[2].." doesn't seem to exist.")
end --exists
end --act2 nil

elseif act[1]=="show" then
require "tprint"
tprint(curmap)
elseif act[1]=="start" then
mtimep=true
Send("look | head 1 | prefix mapstart")
elseif act[1]=="stop" then
if not mtime then
Note("You aren't currently mapping!")
return
end
Note("OK, map stopped.")
mtime=false
require "serialize"
exf = utils.filepicker ("Choose where to save your map", "map_", "mzmap", {mzmap="MUSH-Z maps"}, true)
if not exf then Note("cancelled.") return end
local exfw=assert(io.open(exf, "w"))
exfc=serialize.save_simple(curmap)
assert (exfw:write ("curmap="..exfc))
exfw:close()
Note("map saved.")
end --if
end --function
function eqlf(n,l,w)
act=split(w[1]," ")
if act[1]=="help" then
Execute("eql")
elseif act[1] =="create" then
eql.wearing=false
creatingset=true
if #act<3 then
Note("Sintax: eqlist create <name> <container> <mode>")
Note("possible modes are: meticulous, fast, lightning")
Note("Meticulous: Removes piece by piece, switches piece by piece. Slowest setting.")
Note("fast: removes all if less than 9 pieces of the set you are trying to wear coincide with the currently wearing pieces. Otherwise remove all, put all and wear piece by piece to prevent pieces with multiple locations from doing weird things.")
Note("Lightning: Remove all, check inventory to see how many more things you can carry, wield weapon, get as many as you can, wear all. Fastest, but unreliable for certain sets.")
return
else
eql.cpieces=true
eql.removing=false
eql.lastset=act[2]
if act[4]==nil then
creatingmode=eql.mode
Note("You can also specify a mode for this set by using the words: meticulous, fast or lightning after the container.")
else
if IsInTable(setmodes,act[4])==1 then
Note("using mode "..act[4])
creatingmode=table.value(setmodes,act[4])
else
Note("Unknown mode. Possible modes are: Meticulous, fast, lightning.")
Note("Meticulous: Removes piece by piece, switches piece by piece. Slowest setting.")
Note("fast: removes all if less than 9 pieces of the set you are trying to wear coincide with the currently wearing pieces. Otherwise remove all, put all and wear piece by piece to prevent pieces with multiple locations from doing weird things.")
Note("Lightning: Remove all, check inventory to see how many more things you can carry, wield weapon, get as many as you can, wear all. Fastest, but unreliable for certain sets.")
return
end --unknown mode
end --act4nil
if IsInTable(eql.setnames,act[2])==1 then
Note("overwriting")
else
table.insert(eql.setnames,act[2])
end
if act[3]~="storage" then
Send("insult "..act[3].." | prefix ccheck")
else
eql[act[2]]={}
eql[act[2]].container=act[3]
eql[act[2]].mode=creatingmode
eql.wearing=false
Execute("eqlt")
Note("set created.")
end
end --create has 3 length or less
elseif act[1]=="show" then
require "tprint"
if #act==1 then
tprint(eql)
else
if eql[act[2]]==nil then
Note("No set by the name "..act[2].." exists.")
else
Note("<container> "..eql[act[2]].container)
Note("<mode> "..setmodes[eql[act[2]].mode])
for i,v in pairs(eql[act[2]]) do
if i=="head" then Note("<head>"..eql[act[2]].headn) end
if i=="neck1" then Note("<neck1>"..eql[act[2]].neck1n) end
if i=="neck2" then Note("<neck2>"..eql[act[2]].neck2n) end
if i=="arms" then Note("<arms>"..eql[act[2]].armsn) end
if i=="wrist1" then Note("<wrist1>"..eql[act[2]].wrist1n) end
if i=="wrist2" then Note("<wrist2>"..eql[act[2]].wrist2n) end
if i=="hands" then Note("<hands>"..eql[act[2]].handsn) end
if i=="finger1" then Note("<finger1>"..eql[act[2]].finger1n) end
if i=="finger2" then Note("<finger2>"..eql[act[2]].finger2n) end
if i=="body" then Note("<body>"..eql[act[2]].bodyn) end
if i=="abody" then Note("<about_body>"..eql[act[2]].abodyn) end
if i=="waist" then Note("<waist>"..eql[act[2]].waistn) end
if i=="legs" then Note("<legs>"..eql[act[2]].legsn) end
if i=="feet" then Note("<feet>"..eql[act[2]].feetn) end
if i=="shield" then Note("<shield>"..eql[act[2]].shieldn) end
if i=="held" then Note("<held>"..eql[act[2]].heldn) end
if i=="wielded" then Note("<wielded>"..eql[act[2]].wieldedn) end
end
end --exists
end --show
elseif act[1]=="list" then
Note("Current sets:") 
Note(table.concat(eql.setnames,"\\\r\\\n"))
elseif act[1]=="change" then
if #act~=3 then
--Note("Sintax: eqlist update <name> <new_container>")
return
end --not 3.
eql[act[2]].container=act[3]
for i,v in pairs(eql[act[2]].pieces) do
eql.pieces[v]=act[3]
end --for
elseif act[1]=="pieces" then
tc=""
for i,v in pairs(eql.pieces) do
if v~=tc then
Note(v)
end
end
elseif act[1]=="export" then
eql.wearing=false
if eql==nil then
Note("The sets table is empty...")
return
end
require "serialize"
exf = utils.filepicker ("Choose where to save the eq database", "sets", "mushz", {mushz="MUSH-Z sets files"}, true)
if not exf then Note("cancelled.") return end
local exfw=assert(io.open(exf, "w"))
exfc=serialize.save_simple(eql)
assert (exfw:write ("eql="..exfc))
exfw:close()
Note("set saved.")
elseif act[1]=="import" then
require "serialize"

exf = utils.filepicker ("Choose where your eq database is saved", "sets", "mushz", {mushz="MUSH-Z sets files"}, false)
if not exf then Note("cancelled.") return end
Execute("eql clearsilent")
dofile(exf)
Note("sets recovered.")
SaveState()
elseif act[1]=="move" then
creatingset=false
cup={}
eql.moving=true
eql.wearing=false
if #act~=3 then
Note("sintax: eqlist move <name> <container>")
else
if eql[act[2]]==nil then
Note("Set "..act[2].." does not exist...")
else
moving=true
Execute("insult -all | prefix eqlc")
Send("lecho moving_time")
end
end
elseif act[1]=="delete" then
if #act~=2 then
Note("sintax: eqlist delete <name>")
return
end
if eql[act[2]]==nil then
Note("Set "..act[2].." does not exist...")
else
eql[act[2]]=nil
Note("set deleted.")
for i,v in pairs(eql.setnames) do
if v==act[2] then
table.remove(eql.setnames,i)
end
end
end
elseif act[1]=="mode" then
if act[3]~=nil then
if act[2]=="all" then
for i,v in pairs(eql.setnames) do
eql[v].mode=table.value(setmodes,act[3])
Note("ok")
return
end
end
if eql[act[2]]==nil then
Note("Set "..act[2].." does not exist.")
return
end
Note("Current mode for set "..act[2].." is: "..setmodes[eql[act[2]].mode])
if IsInTable(setmodes,act[3])==1 then
Note("changing to mode "..act[3])
eql[act[2]].mode=table.value(setmodes,act[3])
else
Note("Unknown mode. Possible modes are: Meticulous, fast, lightning.")
Note("Meticulous: Removes piece by piece, switches piece by piece. Slowest setting.")
Note("fast: removes all if less than 9 pieces of the set you are trying to wear coincide with the currently wearing pieces. Otherwise remove all, put all and wear piece by piece to prevent pieces with multiple locations from doing weird things.")
Note("Lightning: Remove all, check inventory to see how many more things you can carry, get as many as you can, wear all. Fastest, but unreliable for certain sets.")
return
end --unknown mode
else
Note("Current mode is: "..setmodes[eql.mode])
if #act~=2 then
Note("Possible modes are: Meticulous, fast, lightning.")
Note("Meticulous: Removes piece by piece, switches piece by piece. Slowest setting.")
Note("fast: removes all if less than 9 pieces of the set you are trying to wear coincide with the currently wearing pieces. Otherwise remove all, put all and wear piece by piece to prevent pieces with multiple locations from doing weird things.")
Note("Lightning: Remove all, check inventory to see how many more things you can carry, wield weapon, get as many as you can, wear all. Fastest, but unreliable for certain sets.")
else
if IsInTable(setmodes,act[2])==1 then
Note("changing to mode "..act[2])
eql.mode=table.value(setmodes,act[2])
else
Note("Unknown mode. Possible modes are: Meticulous, fast, lightning.")
Note("Meticulous: Removes piece by piece, switches piece by piece. Slowest setting.")
Note("fast: removes all if less than 9 pieces of the set you are trying to wear coincide with the currently wearing pieces. Otherwise remove all, put all and wear piece by piece to prevent pieces with multiple locations from doing weird things.")
Note("Lightning: Remove all, check inventory to see how many more things you can carry, get as many as you can, wear all. Fastest, but unreliable for certain sets.")
return
end --unknown mode
end --act2nil
end --set specific
elseif act[1]=="wear" then
c1 = os.clock()
zapped={}
creatingset=false
if #act~=2 then
Note("sintax: eqlist wear <name>")
else
if eql[act[2]]==nil then
Note("Set "..act[2].." does not exist...")
else
if eql[act[2]].mode==nil then
eql[act[2]].mode=eql.mode
end
cup={}
ecnum=1
eql.wearing=true
eqlwear(act[2])
end
end
elseif act[1]=="clear" then
Note("Sets cleared.")
eql=nil
eql={}
eql.setnames={}
eql.pieces={}
elseif act[1]=="clearsilent" then
eql=nil
eql={}
eql.setnames={}
eql.pieces={}
elseif act[1]=="remove" then
if (#act~=2 or eql.lastset==nil) then
Note("sintax: eqlist remove <name>")
else
if act[2]~=eql.lastset then
Note("You didn't wear this set last! The last set you wore was: "..eql.lastset)
return
end
if eql[act[2]]==nil then
Note("Set "..act[2].." does not exist...")
else
Note("removing set")
eql.wearing=false
eql.update_manual=false
Execute("eql change "..act[2].." "..eql[act[2]].container)
eql.removing=true
removedall=false
Send("insult -all | prefix eqlc")
end
end
else
Note("Unrecognized command - type eqlist help for options.")
end --command if
end --function
function dbn(text)
debugging=1
if debugging==1 then Note(text) end
end
function inote(text)
Execute("tts_stop")
Note(text)
end

function eqltrig(n,l,w)
if eql.cpieces then
eql[act[2]].pieces={}
eql.cpieces=false
end
name=w[2]
uuid=w[3]
location=w[1]
if name=="shield bone twisted" then
uuid="bone shield twisted"
end
if name=="bloody bone armor" then
uuid="bloody bone armor"
end
if eql.removing then
remeq(uuid)
end
if eql.wearing then
moving=false
else
if creatingset then
eql.pieces[uuid]=act[3]
table.insert(eql[act[2]].pieces,uuid)
end
end
if location=="head" then
if creatingset then eql[act[2]].head=uuid eql[act[2]].headn=name end
if (eql.wearing or eql.moving) then cup.head=uuid end
elseif location=="neck" then
if neck==true then
if creatingset then eql[act[2]].neck2=uuid eql[act[2]].neck2n=name end
if (eql.wearing or eql.moving) then cup.neck2=uuid end
neck=false
else
neck=true
if (eql.wearing or eql.moving) then cup.neck1=uuid end
if creatingset then eql[act[2]].neck1=uuid eql[act[2]].neck1n=name end
end
elseif location=="finger" then
if finger==true then
if creatingset then eql[act[2]].finger2=uuid eql[act[2]].finger2n=name end
if (eql.wearing or eql.moving) then cup.finger2=uuid end
finger=false
else
finger=true
if creatingset then eql[act[2]].finger1=uuid eql[act[2]].finger1n=name end
if (eql.wearing or eql.moving) then cup.finger1=uuid end
end
elseif location=="wrist" then
if wrist==true then
if creatingset then eql[act[2]].wrist2=uuid eql[act[2]].wrist2n=name end
if (eql.wearing or eql.moving) then cup.wrist2=uuid end
wrist=false
else
wrist=true
if creatingset then eql[act[2]].wrist1=uuid eql[act[2]].wrist1n=name end
if (eql.wearing or eql.moving) then cup.wrist1=uuid end
end
elseif location=="arms" then
if creatingset then eql[act[2]].arms=uuid eql[act[2]].armsn=name end
if (eql.wearing or eql.moving) then cup.arms=uuid end
elseif location=="hands" then
if creatingset then eql[act[2]].hands=uuid eql[act[2]].handsn=name end
if (eql.wearing or eql.moving) then cup.hands=uuid end
elseif location=="held" then
if (eql.wearing or eql.moving) then cup.held=uuid end
if creatingset then eql[act[2]].held=uuid eql[act[2]].heldn=name end
elseif location=="wielded" then
if creatingset then eql[act[2]].wielded=uuid eql[act[2]].wieldedn=name end
if (eql.wearing or eql.moving) then cup.wielded=uuid end
elseif location=="feet" then
if creatingset then eql[act[2]].feet=uuid eql[act[2]].feetn=name end
if (eql.wearing or eql.moving) then cup.feet=uuid end
elseif location=="legs" then
if (eql.wearing or eql.moving) then cup.legs=uuid end
if creatingset then eql[act[2]].legs=uuid eql[act[2]].legsn=name end
elseif location=="waist" then
if creatingset then eql[act[2]].waist=uuid eql[act[2]].waistn=name end
if (eql.wearing or eql.moving) then cup.waist=uuid end
elseif location=="on body" then
if (eql.wearing or eql.moving) then cup.body=uuid end
if creatingset then eql[act[2]].body=uuid eql[act[2]].bodyn=name end
elseif location=="about body" then
if creatingset then eql[act[2]].abody=uuid eql[act[2]].abodyn=name end
if (eql.wearing or eql.moving) then cup.abody=uuid end
elseif location=="shield" then
if (eql.wearing or eql.moving) then cup.shield=uuid end
if creatingset then eql[act[2]].shield=uuid eql[act[2]].shieldn=name end
end
--creatingset=false
if eql.wearing then
weareq(moving)
end
end
function md5f(name)
f= io.open (name, "rb")
 if f then
md5=string.lower (utils.tohex (utils.md5 (f:read ("*a"))))
 f:close () 
return md5
else
return "nofile"
end
end
function yspell(s)
myspecial()
require "wait"
wait.make(function()
wait.time(0.4)
ppi.play(sdir.."/sounds/spells/"..s..".ogg",0,50)
theygrunt()
end)
end
function tspell(s)
theyspecial()
require "wait"
wait.make(function()
wait.time(0.4)
ppi.play(sdir.."/sounds/spells/"..s..".ogg",0,-50)
yougrunt()
end)
end
function friends(n,l,w)
EnableGroup("friendsnotify",false)
DoAfterSpecial(3,'EnableGroup("friendsnotify",true)',12)
tfriends=split(w[1],", ")
Note(#tfriends.." are online:")
for i in pairs(tfriends) do
Note(tfriends[i])
end
end
function scan_dir (path, f)
 -- find all files in that directory
 local t = assert (utils.readdir (path .. "\\*"))

 for k, v in pairs (t) do
 
 -- recurse to process subdirectory
 if v.directory then

 if k ~= "." and k ~= ".." then
 scan_dir (path .. "\\" .. k, f)
 end -- not current or owner directory

 else -- call supplied function
 f (path .. "\\" .. k, v) 
 end -- if 
 
 end -- for
end -- scan_dir 
function countfunc(name,stats)
counter=counter+1
end
function count_files(path)
scan_dir(path,countfunc)
retcount=counter
counter=0
return retcount
end
function better_at()
random=
Sound(sdir.."/sounds/notifications/betterat/"..math.random(1,betterat)..".ogg")
end
function OnPluginSaveState()
require "serialize"
if not (gag==nil) then
local vars=GetInfo(67).."/settings/filters.mushz"
local exfw=assert(io.open(vars, "w"))
exfc=serialize.save_simple(gag)
assert (exfw:write ("gag="..exfc))
exfw:close()
end
if not (settings==nil) then
local vars=GetInfo(67).."/settings/settings.mushz"
local exfw=assert(io.open(vars, "w"))
exfc=serialize.save_simple(settings)
assert (exfw:write ("settings="..exfc))
exfw:close()
end
if not (storefilter==nil) then
local vars=GetInfo(67).."/settings/storefilter.mushz"
local exfw=assert(io.open(vars, "w"))
exfc=serialize.save_simple(storefilter)
assert (exfw:write ("storefilter="..exfc))
exfw:close()
end
if not (recast==nil) then
local vars=GetInfo(67).."/settings/recast.mushz"
local exfw=assert(io.open(vars, "w"))
exfc=serialize.save_simple(recast)
assert (exfw:write ("recast="..exfc))
exfw:close()
end
if not (counters==nil) then
local vars=GetInfo(67).."/settings/counters.mushz"
local exfw=assert(io.open(vars, "w"))
exfc=serialize.save_simple(counters)
assert (exfw:write ("counters="..exfc))
exfw:close()
end
if not (eql==nil) then
local vars=GetInfo(67).."/settings/eqlists.mushz"
local exfw=assert(io.open(vars, "w"))
exfc=serialize.save_simple(eql)
assert (exfw:write ("eql="..exfc))
exfw:close()
end
if not (charlist==nil) then
local vars=GetInfo(67).."/settings/charlist.mushz"
local exfw=assert(io.open(vars, "w"))
exfc=serialize.save_simple(charlist)
assert (exfw:write ("charlist="..exfc))
exfw:close()
end
end
function rc(spelltocast)
Execute("history_add spells="..spelltocast.." fell.")
Execute("history_add all="..spelltocast.." fell.")
end
function FileExists(filename)
 local file = io.open(filename)
 if file then
 io.close(file)
 return true
 else
 return false
 end
end
function PSend(s)
if (afk~=1) then
SendNoEcho(s)
end
end --func
function ESend(s)
if (editing~=1) then
SendNoEcho(s)
end
end --func

function move(exits)
texits={}
for w in string.gmatch(exits, "%a+") do
table.insert(texits,w)
end --for
if #texits==1 then
Send(texits[1])
else
exr=math.random(1,#texits)
Send(texits[exr])
end --texits1
end
function sec2min(secs)
if secs > 59 then
myMinutes=math.floor(secs/60);
mySeconds=secs-(math.floor(secs/60)*60);
if myMinutes==1 then minword="minute"
elseif myMinutes>1 then minword="minutes"
end --minutes
if mySeconds==0 then
myTime=myMinutes.." "..minword.." "
else --not 0
secstring=tostring(mySeconds)
if (string.sub(1,mySeconds,#secstring)=="1") then
myTime=myMinutes.." "..minword.." and "..mySeconds.." second"
else
myTime=myMinutes.." "..minword.." and "..mySeconds.." seconds"
end --if its 1
end --if0 seconds
else --if its less then 59
secstring=tostring(secs)
if (string.sub(secs,1,#secstring)=="1") then
mySeconds=secs.." second"
else
mySeconds=secs.." seconds"
end --not 1
myTime=mySeconds
end --less then59
return myTime
end --func
function ambtimer()
if (gs("ambience")==true) then
if (amb2[terrain]~=nil) then
srand("ambience/random/"..terrain, amb2[terrain])
end --nil
end --if ambience
end --func
function srand(path,x)
Sound(sdir.."/sounds/"..path.."/"..math.random(1,x)..".ogg")
end
function split(str, pat)
local t = {}
local fpat = "(.-)" .. pat
local last_end = 1
local s, e, cap = str:find(fpat, 1)
while s do
if s ~= 1 or cap ~= "" then
table.insert(t,cap)
end
last_end = e+1
s, e, cap = str:find(fpat, last_end)
end
if last_end <= #str then
cap = str:sub(last_end)
table.insert(t, cap)
end
return t
end
function theyspecial()
if (mg=="male") then
random=math.random(1,mspecial)
elseif (mg=="female") then
random=math.random(1,fspecial)
elseif (mg=="neuter") then
random=math.random(1,nspecial)
end
ppi.play(sdir.."/sounds/combat/special/"..mg.."/"..random..".ogg",0,-50)
 end
function yougrunt()
if (gender=="male") then
random=math.random(1,mgrunt[3])
elseif (gender=="female") then
random=math.random(1,fgrunt[3])
elseif (gender=="neuter") then
random=math.random(1,ngrunt)
end
ppi.play(sdir.."/sounds/combat/grunts/3/"..gender.."/"..random..".ogg",0,-50)
end
function yougrunt2()
if (gender=="male") then
random=math.random(1,mgrunt[gtype])
elseif (gender=="female") then
random=math.random(1,fgrunt[gtype])
elseif (gender=="neuter") then
random=math.random(1,ngrunt)
end
DoAfterSpecial(0.2,'ppi.play(sdir.."/sounds/combat/grunts/"..gtype.."/"..gender.."/"..random..".ogg",0,-50)',12)
end
function theygrunt2()
if (mg=="male") then
random=math.random(1,mgrunt[gtype])
elseif (mg=="female") then
random=math.random(1,fgrunt[gtype])
elseif (mg=="neuter") then
random=math.random(1,ngrunt)
end
DoAfterSpecial(0.2,'ppi.play(sdir.."/sounds/combat/grunts/"..gtype.."/"..mg.."/"..random..".ogg",0,50)',12)
end

function myspecial()
if (gender=="male") then
random=math.random(1,mspecial)
elseif (gender=="female") then
random=math.random(1,fspecial)
elseif (gender=="neuter") then
random=math.random(1,nspecial)
end
ppi.play(sdir.."/sounds/combat/special/"..gender.."/"..random..".ogg",0,-50)
 
end
function theygrunt()
if (mg=="male") then
random=math.random(1,mgrunt[3])
elseif (mg=="female") then
random=math.random(1,fgrunt[3])
elseif (mg=="neuter") then
random=math.random(1,ngrunt)
end
ppi.play(sdir.."/sounds/combat/grunts/3/"..mg.."/"..random..".ogg",0,50)
 end
function percent(v1,v2)
return v1/v2*100
end
function monitor(n,l,w)
name=w[1]
gmhp[name]=tonumber(w[4])
gmmhp[name]=w[5]
gmmn[name]=w[6]
gmmmn[name]=w[7]
gmmv[name]=w[8]
gmmmv[name]=w[9]
if (gmhp[name]/gmmhp[name]*100 < 80) then
Note(name.." "..math.floor(percent(gmhp[name],gmmhp[name])).."percent hp.")
issues=1
end
if (gmmn[name]/gmmmn[name]*100 < 70) then
Note(name.." mana. "..math.floor(percent(gmmn[name],gmmmn[name])).."percent left.")
issues=1
 end
if (gmmv[name]/gmmmv[name]*100 < 40) then
Note(name.." is growing tired. "..math.floor(percent(gmmv[name],gmmmv[name])).."percent move.")
issues=1
end
end
function antidie()
if(gs("autoheal")==true) then
if(k_hp/k_maxhp*100 < 60) then
autoheal()
end
end
if (gs("antideath")==true) and (dmg/k_hp*100 > 50) then
PSend("abort")
PSend("flee")
PSend("run")
if (kspells["wordofrecall"]==1) then
if (pose~="stand") then
PSend("stand")
end

PSend("c word")
casting="word"
else
PSend("recall")
end
return
end --50
if (gs("antideath")==true) and (dmg/k_hp*100 > 40) then
if (gs("autoheal")==true) then
autoheal()
return
end --autoheal
PSend("abort")
PSend("flee")
PSend("run")
if (kspells["wordofrecall"]==1) then
if (pose~="stand") then
PSend("stand")
end
PSend("c word")
casting="word"
else
PSend("recall")
end
return
end --40

if (gs("antideath")==true) and (dmg/k_hp*100 > 25) then
if (gs("autoheal")==true) then
autoheal()
return
end --autoheal
PSend("abort")
PSend("flee")
return
end --25
end --func
function autoheal()
require "wait"
wait.make(function()
if (spells["heal"]~=nil) then
if not (nohealing==1) then
if (pose=="rest") then
PSend("stand")
end --rest
PSend("abort")
PSend("cast "..spells["heal"])
casting=spells["heal"]
nohealing=1
wait.time(2.3)
nohealing=0
end --nohealing
else
end --I know heal
end) --wait
end --func
function login()
loggedin=1
PSend("channel listen zt | prefix mzc")
Send("level | grep cap | prefix showcap")
Send("channel listen mushznews mznews|prefix mzc")
DoAfterSpecial(15,'EnableTimer("rctimer",true)',12)
Send("set kprefix kxft | prefix mzc")
Send("set ctrigger on | prefix mzc")
EnableTimer("aminutes",true)
SetVariable("version","7 april update")
if GetVariable("oldversion")==GetVariable("version") then
else
utils.msgbox("You are now updated to mush-z "..GetVariable("version")..". If you like mush-z, please consider donating by clicking the PayPal button found on www.mush-z.com. This message will only be displayed once.")
SetVariable("oldversion",GetVariable("version"))
end
PSend("finger mushz | grep Title")
EnableGroup("show",1)
if (gs("praccing") == true) then
exptnl=2000000
classtnl="practice"
Execute("tnp")
else
EnableGroup("show",1)
DoAfterSpecial(5,'PSend("show cost")',12)
DoAfterSpecial(20,'EnableGroup("show",0)',12)
end
PSend("spell | prefix know")
PSend("autotick | prefix scr")
PSend("skill | prefix knw")
--PSend("way | prefix setway")
PSend("set echo on")
if firsttime then firsttime=0
end
PSend("whoam | grep feet | prefix gend")
jli=1
DoAfterSpecial(12, 'jli=0', 12)
PSend("stats | prefix stat")
if gs("me")=="new" then
return
end
if (charlist~=nil) then
if (IsInTable(charlist,gs("me"))==0) then
table.insert(charlist,gs("me"))
Execute("config mud")
end
else
charlist={}
table.insert(charlist,gs("me"))
Execute("config mud")
end
end
function play(snd,pan)
ppi.play(sdir.."/sounds/"..snd..".ogg",0,50)
end
function checkstats()
require "wait"
wait.make(function()
if (statcount~=1) then
statcount=1
wait.time(3)
statcount=0
PSend("stat | prefix stat")

end --if
end) --wait
end --func
function ntrunk(n)
n=tostring(n)
if not (gs("ntrunk") == true) then
return n
end
if (#n< 5) then
return n
elseif (#n == 5) then
return string.sub(n, 1, 2).."k"
elseif (#n == 6) then
return string.sub(n, 1, 3).."k"
elseif (#n == 7) then
if (string.sub(n, 2, 2) == "0") then
return string.sub(n, 1,1).." mill"
else
return string.sub(n, 1, 1).."."..string.sub(n, 2,2).."mill"
end
elseif (#n == 8) then
if (string.sub(n, 3, 3) == "0") then
return string.sub(n, 1,2).." mill"
else
return string.sub(n, 1, 2).."."..string.sub(n, 3,3).."mill"
end
elseif (#n == 9) then
if (string.sub(n, 4, 4) == "0") then
return string.sub(n, 1,3).." mill"
else
return string.sub(n, 1, 3).."."..string.sub(n, 4,4).."mill"
end
elseif (#n == 10) then
if (string.sub(n, 2, 2) == "0") then
return string.sub(n, 1,1).." bill"
else
return string.sub(n, 1, 1).."."..string.sub(n, 2,2).."bill"
end
elseif (#n == 11) then
if (string.sub(n, 3, 3) == "0") then
return string.sub(n, 1,2).." bill"
else
return string.sub(n, 1, 2).."."..string.sub(n, 3,3).."bill"
end
elseif (#n == 12) then
if (string.sub(n, 4, 4) == "0") then
return string.sub(n, 1,3).." bill"
else
return string.sub(n, 1, 3).."."..string.sub(n, 4,4).."bill"
end
end --main if
end --func
function processid()
require "wait"
wait.make(function()
wait.time(0.3)
Note(idstring)
if not vflags=="" then
Note(vflags)
end
if (affects~=nil) then
Note(table.concat(affects," "))
else
Note("No affects.")
end
affects={}
flags={}
idstring=""
end)
end
function sgag(n,line,w)
if not gag.spells then Note(line) end
end
function cngag(n,line,w)
if not gag.condition then Note(line) end
end
function skgag(n,line,w)
if not gag.skills then Note(line) end
end
function mgag(n,line,w)
if not gag.misc then Note(line) end
end
function cgag(n,line,w)
if not gag.combat then Note(line) end
end
function ngag(n,line,w)
if not gag.minions then Note(line) end
end
function OnPluginScreendraw(t,l,line)
if cmi~=1 then return end
cmistr=cmistr..line.."\r\n"
end
function PanSnd(c,m,f,v)
if v==nil then
v=ppi.getVolume() end
if gs("bars")==1 then
fid=ppi.play(f,0,0,v)
ppi.setPan((c*200/m)-100,fid)
end
if gs("bars")==2 then
fid=ppi.play(f,0,0,v)
ppi.setPitch((c*200/m)-100,fid)
end
end
function voltoggle(areaid,ambid)
if voltype==1 then
voltype=2
elseif voltype==2 then
voltype=3
elseif voltype==3 then
voltype=1
end
if voltype==1 then
Note("Changing global volume: Current value "..ppi.getVolume())
elseif voltype==2 then
if (gs("areamusic")==false or areaid==11) then
Note("Area music is not playing or disabled; Can't change volume.")
return
end
areavol=ppi.getVolume(areaid)
Note("Changing area music volume: Current value "..areavol)
elseif voltype==3 then
if (gs("ambience")==false or ambid==11) then
Note("Ambience is not playing or disabled; Can't change volume.")
return
end
ambvol=ppi.getVolume(ambid)
Note("Changing ambience volume: Current value "..ambvol)
end
end
function volup()
if voltype==1 then
if ppi.getVolume()>=100 then
Note("Volume can't go any higher.")
ppi.setVol(100,0)
ppi.play(GetInfo(67).."/sounds/luaaudio/error.ogg",0)
return
end
ppi.setVol((ppi.getVolume()+5),0)
if gs("vol_areaid")~= nil then
ppi.setVol(tonumber(gs("vol_areaid")),areaid)
end
if gs("vol_ambid")~= nil then
ppi.setVol(tonumber(gs("vol_ambid")),ambid)
end
ppi.play(GetInfo(67).."/sounds/luaaudio/up.ogg",0)
ss("vol_global",ppi.getVolume())
end
if voltype==2 then
if ppi.getVolume(areaid)>=100 then
Note("Volume can't go any higher.")
ppi.play(GetInfo(67).."/sounds/luaaudio/error.ogg",0)
ppi.setVol(100,areaid)
return
end
ppi.setVol((ppi.getVolume(areaid))+3,areaid)
ppi.play(GetInfo(67).."/sounds/luaaudio/up.ogg",0)
ss("vol_areaid",ppi.getVolume(areaid))
end
if voltype==3 then
if ppi.getVolume(ambid)>=100 then
Note("Volume can't go any higher.")
ppi.play(GetInfo(67).."/sounds/luaaudio/error.ogg",0)
return
end
ppi.setVol((ppi.getVolume(ambid)+5),ambid)
ppi.play(GetInfo(67).."/sounds/luaaudio/up.ogg",0)
ss("vol_ambid",ppi.getVolume(ambid))
end
end
function voldown()
if voltype==1 then
if ppi.getVolume()<=1 then
Note("It's muted, you noob!")
ppi.play(GetInfo(67).."/sounds/luaaudio/error.ogg",0)
ppi.setVol(0,0)
return
end
ppi.setVol((ppi.getVolume()-5),0)
if gs("vol_areaid")~= nil then
ppi.setVol(tonumber(gs("vol_areaid")),areaid)
end
if gs("vol_ambid")~= nil then
ppi.setVol(tonumber(gs("vol_ambid")),ambid)
end
ppi.play(GetInfo(67).."/sounds/luaaudio/down.ogg",0)
ss("vol_global",ppi.getVolume())
end
if voltype==2 then
if ppi.getVolume(areaid)<=1 then
Note("It's muted, you noob! If you really want to turn it off I suggest you type config area-music instead to save memory.")
ppi.play(GetInfo(67).."/sounds/luaaudio/error.ogg",0)
ppi.setVol(0,areaid)
return
end
if (ppi.getVolume(areaid)<=5) then
ppi.setVol(0,areaid)
else
ppi.setVol((ppi.getVolume(areaid))-3,areaid)
end
ppi.play(GetInfo(67).."/sounds/luaaudio/down.ogg",0)
ss("vol_areaid",ppi.getVolume(areaid))
end
if voltype==3 then
if ppi.getVolume(ambid)<=1 then
Note("It's muted, you noob! If you really want to turn it off I suggest you type config ambience instead to save memory.")
ppi.play(GetInfo(67).."/sounds/luaaudio/error.ogg",0)
return
end
if (ppi.getVolume(ambid)<6) then
ppi.setVol(1,ambid)
else
ppi.setVol((ppi.getVolume(ambid)-5),ambid)
end
ppi.play(GetInfo(67).."/sounds/luaaudio/down.ogg",0)
ss("vol_ambid",ppi.getVolume(ambid))
end
end
function resetvol()
if gs("vol_areaid")~= nil then
if areaid~=0 then
ppi.setVol(tonumber(gs("vol_areaid")),areaid)
end
end
if gs("vol_ambid")~= nil then
if ambid~=0 then
ppi.setVol(tonumber(gs("vol_ambid")),ambid)
end
end
end
function k_time(n,l,w)
timenum=tonumber(w[1])
timestr=w[3]
if (timenum>360 and timenum<1199) then
time="day"
else
time="night"
end --determine time
if time~=prevtime then
if gs("ambience")==true then
ppi.stop(ambid)
if (FileExists(sdir.."/sounds/ambience/"..terrain.."/"..time..".ogg")==true) then
ambid=ppi.playLooped(sdir.."/sounds/ambience/"..terrain.."/"..time..".ogg")
else
ambid=ppi.playLooped(sdir.."/sounds/ambience/"..time..".ogg")
end
resetvol()
end
end --prevtime
prevtime=time
end --func
function k_prompt(n,l,w)
k_hp=tonumber(w[1])
k_maxhp=tonumber(w[2])
k_mana=tonumber(w[3])
k_maxmana=tonumber(w[4])
k_move=tonumber(w[5])
k_maxmove=tonumber(w[6])
thp=percent(k_hp,k_maxhp)
if thp >= 99 then
k_cond="excellent"
elseif thp >= 90 then
k_cond="scratches"
elseif thp >= 70 then
k_cond="small wounds"
elseif thp >= 50 then
k_cond="quite a few"
elseif thp >= 30 then
k_cond="big nasty"
elseif thp >= 10 then
k_cond="pretty hurt"
elseif thp >= 0 then
k_cond="awful"
else
k_cond="awful"
end
if (lastcn == k_cond) then
else
if nfight==1 then
if (gs("music") == true) then
if (gs("musictype")==1) then
ppi.fadeout(battleid,500)
battleid=ppi.play(sdir.."/sounds/music/"..gs("musictype").."/"..k_cond..".ogg",1)
battleplaying=1
end --musictype
end --music
end --fighting
Sound(sdir.."/sounds/condition/"..gs("scheme").."/"..k_cond..".ogg")
end
lastcn =k_cond
if (k_move<=prevmv-15) or (k_move>prevmv+15) then
if announce_move==true then
announce_move=false
if k_move>prevmv then

Note("+"..k_move-prevmv.." movement.")
end --prevmv
end --anounce
if nfight==1 then
if (k_move<50) then
if (berserk==1) and (mvalarm==0) then
Sound(sdir.."/sounds/notifications/omv alarm.ogg")
mvalarm=1
if (grouped==1) and (gs("swarn")==true) then
PSend("gt area")
else
Note("You're running out of move.")
end --group
end --berserk
end --50 move
end --nfight
PanSnd(k_move,k_maxmove,sdir.."/sounds/pm/move.ogg")
prevmv=k_move
end
if (k_mana<=prevmn-15) or (k_mana>prevmn+15) then
if (math.floor(k_mana/k_maxmana*100) < 25) then
if k_mana<prevmn then
Sound(sdir.."/sounds/notifications/mana alarm.ogg")
end
end
prevmn=k_mana
PanSnd(k_mana,k_maxmana,sdir.."/sounds/pm/mana.ogg")
if (gs("bars")==3) then
Note(math.floor(k_mana/k_maxmana*100) .."percent mana.")
end
end
if (pose~="stand" and nfight~=1) then regenscr()
else
mnrnote= 0
hprnote = 0
mvrnote=0
hpnote=0
mnnote=0
mvnote=0
 end
end
function removespaces(s)
 local n = 1
 while true do
 while true do -- removes spaces
 local _, ne, np = s:find("^[^%s%%]*()%s*", n)
 n = np
 if np - 1 ~= ne then s = s:sub(1, np - 1) .. s:sub(ne + 1)
 else break end
 end
 local m = s:match("%%(.?)", n) -- skip magic chars
 if m == "b" then n = n + 4
 elseif m then n = n + 2
 else break end
 end
 return s
end
function release()
Note("OK, configured.")
settings.reclay.status=true
settings.automove.status=true
settings.shortall.status=true
settings.shortid.status=1
settings.gbot.status=false
settings.brewlog.status=true
settings.dcomps.status=false
settings.items.status=3
settings.imove.status=true
settings.ambience.status=true
settings.soulsteal.status=true
settings.dteeth.status=false
settings.antideath.status=false
settings.ticksounds.status=false
settings.randoms.status=true
settings.grandoms.status=false
settings.logpk.status=false
settings.bars.status=2
settings.areamusic.status=true
settings.musictype.status=1
settings.praccing.status=false
settings.speedwalk.status=false
settings.gdamage.status=true
settings.showtips.status=true
settings.scheme.status=2
settings.playquotes.status=true
settings.autostat.status=true
settings.autosleep.status=false
settings.autofollow.status=false
settings.firsttime.status=true
settings.autopick.status=true
settings.ifollow.status=false
settings.music.status=true
settings.autoheal.status=false
settings.chans.status=1
settings.exits.status=1
settings.ntrunk.status=true
settings.sacsplit.status=false
settings.chist.status=false
settings.tts.status=true
settings.swarn.status=false
settings.grecast.status=false
settings.recast.status=true
settings.castfail.status=false
settings.donfish.status=false
end
function sclear()
if not settings then settings={} end
if not settings.container then settings.container={} ss("container","bag") end
if not settings.ambience then settings.ambience={} settings.ambience.status=true
end
if not settings.grandoms then settings.grandoms={} settings.grandoms.status=true
end
if not settings.shortid then settings.shortid={}
ss("shortid",1)
end
if not settings.shortall then settings.shortall={} settings.shortall.status=true
end
if not settings.automove then settings.automove={} 
settings.automove.status=true end
if not settings.soulsteal then settings.soulsteal={} settings.soulsteal.status=true
end
if not settings.brewlog then settings.brewlog={} 
settings.brewlog.status=true end
if not settings.gbot then settings.gbot={} settings.gbot.status=false
end
if not settings.dcomps then settings.dcomps={} ss("dcomps",true) end
if not settings.items then settings.items={} ss("items",3) end
if not settings.reclay then settings.reclay={} settings.reclay.status=true
end
if not settings.dteeth then settings.dteeth={} settings.dteeth.status=false
end
if not settings.antideath then settings.antideath={} settings.antideath.status=false
end
if not settings.ticksounds then settings.ticksounds={} settings.ticksounds.status=false
end
if not settings.randoms then settings.randoms={} settings.randoms.status=false
end
if not settings.logpk then settings.logpk={} settings.logpk.status=false
end
if not settings.bars then settings.bars={} settings.bars.status=2
end
if not settings.areamusic then settings.areamusic={} settings.areamusic.status=true
end
if not settings.musictype then settings.musictype={} settings.musictype.status=1
end
if not settings.praccing then settings.praccing={} settings.praccing.status=false
end
if not settings.speedwalk then settings.speedwalk={} settings.speedwalk.status=false
end
if not settings.imove then settings.imove={} settings.imove.status=true end
if not settings.gdamage then settings.gdamage={} settings.gdamage.status=true
end
if not settings.showtips then settings.showtips={} settings.showtips.status=true
end
if not settings.scheme then settings.scheme={} settings.scheme.status=2
end
if not settings.playquotes then settings.playquotes={} settings.playquotes.status=true
end
if not settings.autostat then settings.autostat={} settings.autostat.status=true
end
if not settings.autosleep then settings.autosleep={} settings.autosleep.status=false
end
if not settings.autofollow then settings.autofollow={} settings.autofollow.status=false
end
if not settings.firsttime then settings.firsttime={} settings.firsttime.status=true
end
if not settings.autopick then settings.autopick={} settings.autopick.status=true
end
if not settings.ifollow then settings.ifollow={} settings.ifollow.status=false
end
if not settings.music then settings.music={} settings.music.status=true
end
if not settings.autoheal then settings.autoheal={} settings.autoheal.status=false
end
if not settings.chans then settings.chans={} settings.chans.status=1
end
if not settings.exits then settings.exits={} settings.exits.status=1
end
if not settings.ntrunk then settings.ntrunk={} settings.ntrunk.status=true
end
if not settings.sacsplit then settings.sacsplit={} settings.sacsplit.status=false
end
if not settings.chist then settings.chist={} settings.chist.status=false
end
if not settings.tts then settings.tts={} settings.tts.status=true
end
if not settings.swarn then settings.swarn={} settings.swarn.status=false
end
if not settings.grecast then settings.grecast={} settings.grecast.status=false
end
if not settings.recast then settings.recast={} settings.recast.status=true
end
if not settings.castfail then settings.castfail={} settings.castfail.status=false
end
if not settings.donfish then settings.donfish={} settings.donfish.status=false
end
settingtables()
end
function custom()
Note("OK, configured.")
Execute("filter all")
settings.shortall.status=true
settings.ambience.status=true
settings.grandoms.status=true
settings.dcomps.status=false
settings.automove.status=true
settings.items.status=3
settings.imove.status=true 
settings.shortid.status=3
settings.brewlog.status=true
settings.gbot.status=false
settings.reclay.status=false
settings.soulsteal.status=true
settings.dteeth.status=true
settings.antideath.status=false
settings.ticksounds.status=false
settings.randoms.status=true
settings.logpk.status=true
settings.bars.status=2
settings.areamusic.status=true
settings.musictype.status=1
settings.praccing.status=false
settings.speedwalk.status=false
settings.gdamage.status=true
settings.showtips.status=false
settings.scheme.status=1
settings.playquotes.status=true
settings.autostat.status=true
settings.autosleep.status=false
settings.autofollow.status=false
settings.firsttime.status=false
settings.autopick.status=true
settings.ifollow.status=false
settings.music.status=true
settings.autoheal.status=false
settings.chans.status=1
settings.exits.status=1
settings.ntrunk.status=true
settings.sacsplit.status=false
settings.chist.status=false
settings.tts.status=true
settings.swarn.status=false
settings.grecast.status=false
settings.recast.status=true
settings.castfail.status=false
settings.donfish.status=true
end
function gs(v)
if settings[v]==nil then
return nil
end
return settings[v].status
end
function ss(v,val)
if settings[v]==nil then
settings[v]={}
end
settings[v].status=val
SaveState()
end
function recastdefaults(setname)
recast[setname]["dying breath"]=true
recast[setname]["sanctuary"]=true
recast[setname]["bone shield"]=false
recast[setname]["bone armor"]=false
recast[setname]["faith shield"]=true
recast[setname]["water breathing"]=true
recast[setname]["detect poison"]=true
recast[setname]["stone skin"]=true
recast[setname]["foulblood"]=true
recast[setname]["rancid flesh"]=true
recast[setname]["dread portent"]=true
recast[setname]["dying breath"]=true
recast[setname]["bless"]=true
recast[setname]["ground"]=true
recast[setname]["fire shield"]=true
recast[setname]["ice shield"]=true
recast[setname]["protection from evil"]=true
recast[setname]["armor"]=true
recast[setname]["infravision"]=true
recast[setname]["detect invisibility"]=true
recast[setname]["sense life"]=true
recast[setname]["invisibility"]=true
recast[setname]["shield"]=true
recast[setname]["displacement"]=true
recast[setname]["fly"]=true
recast[setname]["darken"]=true
end
function recast_options(name, line, wildcards)
choices={}
if recast==nil then
recast={}
recast.active="none"
end --no recast table found
if recast.active=="none" then
Note("There is no active recast set! A default one will be created for you.")
recast.default={}
recast.active="default"
recastdefaults(recast.active)
end --no active set
repeat
for k, v in pairs (recast[recast.active]) do
local val =v
if val==true then
cstr=k.." - enabled"
end --value true
if val==false then
cstr=k.." - ".."disabled"
end --false
choices[k]=cstr
end --loop
 result = utils.choose("Choose a spell to change its setting. all changes will be applied once you click cancel", "Spells for the "..recast.active.." set",choices,result)
 -- if not cancelled, go to appropriate handler
 if result then
edit_recast(result)
 end -- if they chose something
  until not result -- loop until dialog cancelled
Note("Changes saved.")
end -- function config_options
function edit_recast(name)
confname=name
val=recast[recast.active][name]
if val==true then
default = 1 -- default to "Yes" button
 elseif val==false then
default = 2 -- default is "No" button
end
if default~=0 then
response =utils.msgbox(name.."?", "Change option", "yesnocancel", "?", default)
 if response == "cancel" then
 return
 end -- if cancelled
if response == "yes" then
recast[recast.active][name]=true
elseif response=="no" then
recast[recast.active][name]=false
end
end
end
function edit_option(name)
confname=name
val=settings[name].status
info = args[name]
if type(val)=="string" then
response =utils.inputbox(snames[name].."?", "Input", "")
if not response then
 return
 end -- if cancelled
settings[name].status=response
return
elseif type(val)=="boolean" then
if val==true then
default = 1 -- default to "Yes" button
 elseif val==false then
default = 2 -- default is "No" button
end
else
default=0
end
if default~=0 then
response =utils.msgbox(snames[name].."?", "Change option", "yesnocancel", "?", default)
 if response == "cancel" then
 return
 end -- if cancelled
if response == "yes" then
settings[name].status=true
if name=="praccing" then
classtnl="none"
exptnl=0
k_exp()
end
elseif response=="no" then
settings[name].status=false
if name=="areamusic" then
ppi.slideVol(0,areaid,2000)
end
if name=="ambience" then
ppi.slideVol(0,ambid,2000)
end

end
else
response=utils.choose(snames[name],"Change option",args[name],val)
 if response == nil then
 return
 end -- if cancelled
settings[name].status=response
end
end
function config_options(name, line, wildcards)
choices={}
repeat
for k, v in pairs (settings) do
local val =gs(k)
if snames[k]==nil then
--Note(k.." doesn't have options list.")
else
sname=snames[k]
end --snames nil
if sname then
if type(val)~="boolean" then
if snames[k]~=nil then
if type(val)=="string" then
choices[k]=sname.." - "..val
else
choices[k]=sname.." - "..args[k][val]
end
end --snames nil
else
if snames[k]~=nil then
if val==true then
str="enabled"
end --value true
if val==false then
str="disabled"
end --false
choices[k]=sname.." - "..str
end --not nil
end --not boolean
end --has a name
end --loop
result = utils.choose (
 "Choose an option to edit.\r\n\r\nClick Cancel when done (all changes will be saved).", "Options",choices,result)
 -- if not cancelled, go to appropriate handler
 if result then
edit_option(result)
 end -- if they chose something
 
 until not result -- loop until dialog cancelled
Note("Changes saved.")
end -- function config_options
function settingtables()
args={}
args.bars={"Stereo sounds", "Pitch change","Text"}
args.shortid={"disabled","output and history","history only"}
args.musictype={"Your health", "Mob health"}
args.scheme={"Original", "spoken."}
args.chans={"Text", "Text to speech only", "Sound only."}
args.exits={"Text", "Sound"}
args.items={"Put it in a container","discard it","Do nothing","Donate it","locker it"}
snames={}
snames.imove="Interrupt speech when moving"
snames.automove="follow leader's enter, climb and look commands"
snames.brewlog="Log brewed recipes"
snames.shortall="shortID appears on history all category"
snames.ambience="Room ambience sounds"
snames.container="container used for item keeping"
snames.soulsteal="Soulsteal when dread portent is on"
snames.reclay="Recast clay man when it dies"
snames.dcomps="discard corpsecutter spellcomps"
snames.items="Get item behaviour"
snames.dteeth="Discard of harvested teeth"
snames.antideath="Antideath (recalling/fleeing when hit very hard)"
snames.ticksounds="tick passing sounds"
snames.randoms="Pick up random/unique items automatically"
snames.logpk="Log pk fights in channel history"
snames.bars="Audio Prompt ..."
snames.shortid="condensed identify"
snames.areamusic="Area music"
snames.musictype="Battle music mode"
snames.praccing="practice training when possible"
snames.speedwalk="Interrupt room description and say exits for quick walking"
snames.showtips="Show mush-z newbie tips"
snames.scheme="Health condition scheme"
snames.playquotes="Play death quote voice overs"
snames.autostat="Statistics monitoring"
snames.autosleep="Automatically sleep when group leader does"
snames.autofollow="Follow automatically when beckon social is used"
snames.autopick="Retry lockpicking when it fails"
snames.ifollow="Interrupt screen reader when following someone"
snames.music="Battle music"
snames.autoheal="Automatic healing when hurt"
snames.chans="Channel sends display"
snames.exits="Room exits displays"
snames.ntrunk="Number trunkator"
snames.sacsplit="Split gold obtained from sacrificing corpses"
snames.chist="Logging of your own channel sends to history"
snames.swarn="Group warnings"
snames.grecast="Recast certain spells on group members"
snames.recast="Recast certain spells on yourself"
snames.grandoms="pick up unique items in groups where you aren't leader"
snames.castfail="Automatic recasting of failed spells"
snames.donfish="Donate fish"
end
function edit_additional(pbranch,pname,pq)
if confname==pbranch then
val=settings[pname].status
if val==true then
default = 1 -- default to "Yes" button
 elseif val==false then
default = 2 -- default is "No" button
else
default=0
end --default
response =utils.msgbox(pq, "Additional settings", "yesnocancel", "?", default)
 if response == "cancel" then
 return
 end -- if cancelled
if response == "yes" then
settings[pname].status=true
elseif response=="no" then
settings[pname].status=false
end --response
end --if recast
end
function resetspells()
rct={}
--rct["faith shield"]=true
--rct["stone skin"]=true
--rct["foulblood"]=true
--rct["rancid flesh"]=true
--rct["dread portent"]=true
--rct["dying breath"]=true
--rct["bless"]=true
--rct["protection from evil"]=true
--rct["armor"]=true
--rct["invisibility"]=true
--rct["shield"]=true
--rct["sanctuary"]=true
--rct["fly"]=true
--rct["ground"]=true
--rct["fire shield"]=true
--rct["ice shield"]=true
--rct["displacement"]=true
--rct["infravision"]=true
--rct["detect invisibility"]=true
--rct["sense life"]=true
rmt={}
rmt["faith shield"]=23
rmt["darken"]=42
rmt["water breathing"]=20
rmt["detect evil"]=12
rmt["detect poison"]=12
rmt["detect undead"]=18
rmt["bone shield"]=8
rmt["bone armor"]=12
rmt["stone skin"]=55
rmt["foulblood"]=21
rmt["rancid flesh"]=30
rmt["dread portent"]=15
rmt["dying breath"]=47
rmt["bless"]=20
rmt["protection from evil"]=15
rmt["armor"]=8
rmt["invisibility"]=45
rmt["darken"]=42
rmt["shield"]=18
rmt["sanctuary"]=75
rmt["fly"]=25
rmt["ground"]=35
rmt["fire shield"]=35
rmt["ice shield"]=35
rmt["displacement"]=30
rmt["infravision"]=12
rmt["detect invisibility"]=12
rmt["sense life"]=15
end
function rectimer()
if not gs("recast") then
return
end
if nfight==1 then return end
tocast=false
for i,v in pairs(rct) do
if rct[i]==true then
know=""
for w in string.gmatch(i, "%S+") do
know=know..w
end --for word
if kspells[know]==1 then
if k_mana>=rmt[i] then
rcspell(i)
break
else
if(prevpose~="stand") then
Send(prevpose)
ss("castfail",failstate)
prevpose="stand"
end --prevpose
return
end --k_mana
end --know spells
end --if it's true
end --for
if table.size(rct)>1 then
castlast=false
elseif table.size(rct)==1 then
castlast=true
elseif table.size(rct)<1 then
if castlast then
if(prevpose~="stand" and pose~=prevpose) then
ss("castfail",failstate)
Send(prevpose)
prevpose="stand"
end --prevpose
castlast=false
end --castlast
end --if table size
end --function
function rcspell(wtc)
require "wait"
wait.make(function()
if recast.active~=nil then
if recast[recast.active][wtc]~=true then
if recast[recast.active][wtc]==nil then
if IsInTable(falsespells,wtc)==1 then
recast[recast.active][wtc]=false
else
recast[recast.active][wtc]=true
end
end
rct[wtc]=nil
return
end
end
tocast=true
failstate=gs("castfail")
ss("castfail",false)
if (pose~="stand") then
prevpose=pose
if gs("recast")==true then
ESend("stand")
end
end --prevpose
if gs("recast")==true then
if wtc=="bone armor" then Execute("c "..wtc.." "..gs("me")) end
ESend("c "..wtc)
else
rct[wtc]=nil
end
wait.time(1)
end) --wait
end
function table.contains(table, element)
for _, value in pairs(table) do
    if value == element then
      return true
    end
  end
  return false
end
function table.haskey(table, element)
for k, _ in pairs(table) do
    if k == element then
      return true
    end
  end
  return false
end
function tracktime(n,l,w)
ntrackarea=w[1]
ntrackdist=w[3]
ntrackdistn=0
ntrackdir=w[4]
if (trackarea~="" and ntrackarea~=trackarea) then
inote("Tracking conflict! There are multiple areas being tracked with the keywords you specified. "..trackarea.." and "..ntrackarea..". Please specify which one you want to track by using the track alias")
trackconflict=1
return
elseif trackarea==ntrackarea then
if ntrackdir~=trackdir then
trackdir=ntrackdir
Sound(GetInfo(67).."/sounds/tracking/changedir.ogg")
inote(trackarea.." now "..ntrackdist.." to the "..trackdir)
end
adist()
if ntrackdistn<trackdistn then
inote(trackarea.." now "..ntrackdist.." to the "..trackdir)
Sound(GetInfo(67).."/sounds/tracking/getcloser.ogg")
elseif ntrackdistn>trackdistn then
inote("You are moving away!")
Note(trackarea.." now "..ntrackdist.." to the "..trackdir)
Sound(GetInfo(67).."/sounds/tracking/getaway.ogg")
end
trackdist=ntrackdist
elseif trackarea=="" then
trackarea=ntrackarea
trackdist=ntrackdist
trackdir=ntrackdir
Note("now tracking "..trackarea..". Current distance is "..trackdist..", to the "..trackdir)
adist()
trackdistn=ntrackdistn
end --different area states
end
function adist()
if ntrackdist=="a very short distance" then ntrackdistn=1
elseif ntrackdist=="a short distance" then ntrackdistn=2
elseif ntrackdist=="a fair distance" then ntrackdistn=3
elseif ntrackdist=="far away," then ntrackdistn=4
elseif ntrackdist=="very far away," then ntrackdistn=5
else
Note("Unrecognized distance "..ntrackdist)
end
end
function procmap(n,l,w)
if mvtime then
if k_move>65 and pose~="stand" then
Send("stand")
Send(curmap[1].." | tail 1 | prefix moving")
EnableTimer("maptimer",false)
return
end --move
if fight==0 then
Send(curmap[1].." | tail 1 | prefix moving")
EnableTimer("maptimer",false)
return
end --fight
end --mapping
end --func
function pmap()
if backtrack==nil then backtrack={}
end
if rooms[k_lastroom]~=nil then
toinsert=false
if table.contains(backtrack,k_room) then
toinsert=true
end
if (#backtrack<1 or toinsert) then
table.insert(backtrack,1,{k_room,ldir[lastdir]})
end
if rooms[k_lastroom]==nil then
else
rooms[k_lastroom][dirs[lastdir]]=k_room
rooms[k_room][dirs[ldir[lastdir]]]=k_lastroom
end
end
if mtime then
table.insert(curmap,lastdir)
end

end
function idtime(n,l,w)
if idlevel~=nil then
idlevel=string.gsub(idlevel,"(you can't use this yet)"," ")
else
idlevel=""
end
if iidflags==nil then
iidflags=""
end
if type(iworn)=="nil" then
iworn=""
end
toprint=idlevel.." "..iworn..", "..iidflags.." "
if iacapply~=nil then
toprint=toprint.."ac "..iacapply.." "
end
if iaffects~=nil then toprint=toprint..iaffects
end
if settings.shortid.status==2 then
print(toprint)
end
if (gs("shortid")==3 or gs("shortid")==2) then
Execute("history_add shortID="..toprint)
if gs("shortall") then
Execute("history_add all="..toprint)
end
end
iidflags=nil
iacapply=nil
iworn=nil
idname=nil
end

function movemapnow()
if #curmap<=0 then
Note("You have reached your destination!")
Note('that took ',os.clock()-c1..'s')
mvtime=false
mapnow=false

insertqueue=""
if not mback then
curmap=mapback
end
mback=false
return
end
if IsInTable(validdirs,curmap[1])==1 then
if not mback then table.insert(mapback,1,ldir[curmap[1]])
if insertqueue~="" then
table.insert(mapback,1,insertqueue)
insertqueue=""
end
end
Send(curmap[1].." | tail 1 | prefix moving")
else
mapnow=true
Send(curmap[1].." | tail 1")
if (string.find(curmap[1],"enter") or string.find(curmap[1],"climb")) then
if not mback then table.insert(mapback,1,curmap[1]) end
table.remove(curmap,1)
if not mback then
if insertqueue~="" then
table.insert(mapback,1,insertqueue)
insertqueue=""
end
end
else
insertqueue=curmap[1]
table.remove(curmap,1)
movemapnow()
end--stringfind
end--stringtype
end --move function
function idnote(n,l,w)
if (gs("shortid")==3 or gs("shortid")==1) then
Note(l)
end
end
function nearest()
udirs={}
unexplored={}
for k,v in pairs(backtrack) do
if v[1]~=k_room then
for kk,vv in pairs(rooms[v[1]]) do
if vv=="unexplored" then
table.insert(unexplored,walkdirs[kk])
break
elseif vv=="door" then
table.insert(unexplored,walkdirs[kk])
break
end --unexplored
end --for
if #unexplored==0 then
table.insert(udirs,v[2])
end --#unexplored
else
table.insert(udirs,v[2])
end --not k_room
end --for
Note(table.concat(udirs," "))
Note(unexplored[1])
end --function
function clear() 
rooms={}
k_room=""
k_lastroom=""
walkdirs={}
walkdirs["0"]="north"
walkdirs["2"]="south"
walkdirs["1"]="east"
walkdirs["3"]="west"
walkdirs["20"]="up"
walkdirs["30"]="down"
walkdirs["4"]="northeast"
walkdirs["7"]="northwest"
walkdirs["5"]="southeast"
walkdirs["6"]="southwest"
dirs={}
dirs["north"]="0"
dirs["south"]="2"
dirs["up"]="20"
dirs["down"]="30"
dirs["east"]="1"
dirs["west"]="3"
dirs["northeast"]="4"
dirs["northwest"]="7"
dirs["southeast"]="5"
dirs["southwest"]="6"
brewing=0
swheel=0
affs={}
affs["SAVING_ZAP"]="zapsave"
affs["SAVING_SPELL"]="spellsave"
affs["DAMROLL"]="dr"
affs["HITROLL"]="hr"
affs["SAVING_FIRE"]="firesave"
affs["SAVING_COLD"]="coldsave"
affs["MANA_REGEN"]="manaregen"
affs["MOV_REGEN"]="mv regen"
affs["HIT_POINTS"]="hp"
affs["NECR_CAST_LEVEL"]="necrocast"
affs["MAGE_CAST_LEVEL"]="magecast"
affs["CLER_CAST_LEVEL"]="clericcast"
ac=""
mtimep=false
insertqueue=""
mapnow=false
mapback={}
mback=false
donemap=0
validdirs={"north","south","east","west","up","down","northeast","northwest","southeast","southwest"}
adir=0
maxdir=0
mvtime=false
ldir={}
ldir.north="south"
ldir.south="north"
ldir.east="west"
ldir.west="east"
ldir.down="up"
ldir.up="down"
ldir.northwest="southeast"
ldir.northeast="southwest"
ldir.southeast="northwest"
ldir.southwest="northeast"
curmap={}
mtime=false
failstate=true
leader="none"
stealnext=false
trackconflict=0
trackarea=""
trackdistn=0
trackdir=""
trackdist=""
toreclay={}
table.insert(toreclay,"clayman clay")
table.insert(toreclay,"metal construct ughly animated")
table.insert(toreclay,"wood woad minion")
table.insert(toreclay,"bone guardian")

zapped={}
setmodes={"meticulous","fast","lightning"}
creatingset=false
container=""
falsespells={"bone armor","bone shield"}
cup={}
kxwts={}
elemental=false
loggedin=0
resetspells()
EnableTimer("rctimer",false)
banned={"filthy","grey","gray","blue","yellow","acid-etched","etched","acid","sentry's","sentry","sturdy","green","leather"}
pick=""
--ss("items",3)
uniques={}
areaxp=0
prevarea=""
--ss("yday",os.date("%j"))
checkfor=""
gold=0
prevgold=0
battleid=1
battleplaying=0
pose="stand"
hpregen=1
mregen=1
mvregen=1
terrains={}
terrains[1]="building"
terrains[2]="town"
terrains[3]="field"
terrains[4]="light forest"
terrains[5]="thick forest"
terrains[6]="dark forest"
terrains[7]="swamp"
terrains[8]="plateau"
terrains[9]="sandy"
terrains[10]="mountain"
terrains[11]="rock"
terrains[12]="desert"
terrains[13]="tundra"
terrains[14]="beach"
terrains[15]="hill"
terrains[16]="dunes"
terrains[17]="jungle"
terrains[18]="ocean"
terrains[19]="stream"
terrains[20]="river"
terrains[21]="underwater"
terrains[22]="underground"
terrains[23]="air"
terrains[24]="ice"
terrains[25]="lava"
terrains[26]="ruins"
terrains[27]="cave"
terrains[28]="city"
terrains[29]="marsh"
terrains[30]="wasteland"
terrains[31]="cloud"
terrains[32]="water"
Accelerator("alt+p","enter portal")
Accelerator("f10","voltoggle")
Accelerator("f12","voldown")
Accelerator("f11","volup")
voltype=1
weapon=""
nobot=false
ambid=11
areaid=11
ppi.stop(0)
tfish=0
cmistr=""
cmi=0
noreclay=false
dteeth=0
teeth=0
counter=0
brewing=0

ritems=0
recipe={}
sdir=GetInfo(57).."alteraeon"
--loading
minions={}
idstring=""
EnableTimer("ambtimer",0)
DoAfterSpecial(15,'EnableTimer("ambtimer",1)',12)
mregen=0
exptnl=0
gtype=1
adjectives={
"",
flaming=true,lunging=true,zapping=true,leaping=true,burning=true,clawed=true,fiery=true,freezing=true,icy=true,venomous=true,poisonous=true,corroding=true,acidic=true}
nouns={
"",
bite=true,chop=true,snatch=true,crush=true,slash=true,slap=true,kick=true,pierce=true,attack=true,cleave=true,punch=true,slice=true,hack=true,claw=true,blast=true,foot=true,splat=true,thwap=true,sweep=true,spit=true,gore=true,stomp=true,stab=true,pound=true,whip=true,riposte=true}
verbs={
scratches=true,hits=true,wounds=true,injures=true,mauls=true,decimates=true,devastates=true,maims=true,MUTILATES=true,DISMEMBERS=true,DISEMBOWELS=true,MASSACRES=true, ["*** MASSACRES ***"] =true,DEVASTATES=true, ["*** DEVASTATES ***"] =true, ["*** OBLITERATES ***"] =true,OBLITERATES=true,["*** DEMOLISHES ***"]=true,DEMOLISHES=true, ["*** ANNIHILATES ***"]=true,ANNIHILATES=true,["*** DESTROYS ***"]=true,DESTROYS=true}
verbs["*** DEVASTATES ***"]=true
prevpose="stand"
eventregen=1

affects={}
flags={}
area="test"
EnableTimer("ambiencetimer", true)
fc=0
prevfc=0
damages={}
damages={
scratches=true,hits=true,wounds=true,injures=true,mauls=true,decimates=true,devastates=true,maims=true,MUTILATES=true,DISMEMBERS=true,DISEMBOWELS=true,MASSACRES=true, ["*** MASSACRES ***"] =true, ["*** DEVASTATES ***"] =true, ["*** OBLITERATES ***"] =true,OBLITERATES=true,["*** DEMOLISHES ***"]=true,DEMOLISHES=true, ["*** ANNIHILATES ***"]=true,ANNIHILATES=true,["*** DESTROYS ***"]=true,DESTROYS=true}
nfight=0
res=0
exptnl=0
classtnl="none"
levtnl=0
gmhp={}
gmmhp={}
gmmn={}
gmmmn={}
gmmv={}
gmmmv={}
lastdir="north"
mg="male"
warned1={}
warned2={}
warned3={}
casting=""
if (gs("showtips")==true) then
f = io.input (GetInfo(56).."\worlds/ctips.txt")
end
fnames={}
group={}
botname=gs("botname")
truced=0
spells={}
cspells=1
kspells={}
skills={}
kskills={}
ways={}
ways2={}
cspells=1
spose=0
weapons={}
swings={}
map=0
stealth=0
jli=1
DoAfterSpecial(3, 'jli=0', 12)
exp=0
prevlength=0
prevexp=0
inv={}
dt=0
carrycount=0
carrysay=0
getcount=0
getsay=0
getitems={}
mort=0
knowref=0
smwarn=0
Sound("stop=all")
carryblock=0
getblock=0
carrycount=0
getcount=0
gender="male"
tank=0
recastwarn=0
prevmon=0
vbad={}
bad={}
poor={}
fair={}
moderate={}
avg={}
good={}
vgood={}
exceptional={}
perfect={}
EnableGroup("group", 0)
EnableGroup("cgroup", 0)
EnableGroup("frostbite", 0)
EnableGroup("fishing", 0)
prevmv=2
terrain="town"
daytime=0
prevtime=0
players = {}
prevmn =1
k_mana = 1000
prevhp = 1
k_hp = 1000
grouped=0
k_move=1000
randfunc,errfunc=assert(loadfile(GetInfo(57).."/alteraeon/randoms.txt"))
randfunc()
end
function OnPluginConnect()
end
function t_disarm(n,l,w)
if not gag.combat then Note(l) end

Sound(sdir.."/sounds/combat/parry/" .. math.random(1, tparry) .. ".ogg")
end
function OnPluginDisconnect()
--clear()
SaveState()
end
function wayadd(n,l,w)
n=tonumber(w[2])
way=w[4]
if (way=="A tranquil shrine") then
ways["tranq"]=n
table.insert(ways2, "tranq")
elseif (way=="A vine covered temple") then
ways["vine"]=n
table.insert(ways2, "vine")
elseif (way=="The inside of a small cabin") then
ways["cabin"]=n
table.insert(ways2, "cabin")

elseif (way=="A small meditation room") then
ways["small med"]=n
table.insert(ways2, "small med")
elseif (way=="The Unholy Temple of Dentin") then
ways["unholy"]=n
table.insert(ways2, "unholy")
elseif (way=="Recall") then
ways["mudschool"]=n
table.insert(ways2, "mudschool")

elseif (way=="The Temple of Zin") then
ways["zin"]=n
table.insert(ways2, "zin")
elseif (way=="Inside the Chapel") then
ways["chapel"]=n
table.insert(ways2, "chapel")
elseif (way=="A shrine to Dentin") then
ways["std"]=n
ways["s2d"]=n
ways["shrine"]=n
table.insert(ways2, "s2d")
elseif (way=="On the steps of Aomizu Temple") then
ways["aomizu"]=n
table.insert(ways2, "aomizu")
elseif (way=="The temple to Morpheus") then
ways["morph"]=n
table.insert(ways2, "morph")
elseif (way=="Warming before the hearth") then
ways["hearth"]=n
table.insert(ways2, "hearth")
elseif (way=="City of Airam, Town Square") then
ways["airam"]=n
table.insert(ways2, "airam")
else
Sound(sdir.."/sounds/grouping/beckon.ogg")
ways[way]=n
table.insert(ways2, way)
end
end
function spellfall(spell, person)
if (IsInTable(group, person)==1) then
Execute("history_add all="..person.."'s "..spell.." fell.")
Execute("history_add spells="..person.."'s "..spell.." fell.")
if(gs("grecast")==true) then
if (pose~="stand") then
prevpose=pose
PSend("stand")
end
Execute("c "..spell.." "..person)
if(prevpose~="stand") then
PSend(prevpose)
prevpose="stand"
end
end
end
end
function gclear()
gfighting=0
assisting=0
restime=0
hitting="trip"
EnableTimer("grtimer", false)
end
function exitstd(n,l,wildcs)
exitst(n,l,wildcs)
Sound(sdir.."/sounds/notifications/doors.ogg")
Note("Doors "..wildcs[2])
if rooms[k_room]~=nil then
for w in string.gmatch(wildcs[2], "%S+") do
if rooms[k_room][dirs[w]]==nil then
rooms[k_room][dirs[w]]="door"
end --rooms w
end
end
end
function exitsm(n,l,w)
if mapnow then mapnow=false end
EnableTimer("maptimer",false)
adir=adir+1
PanSnd(adir,maxdir,sdir.."/sounds/pm/map.ogg")
if (amb1[terrain] == nil) then
random=math.random(1,9)
else
random=math.random(1,amb1[terrain])
end
Sound(sdir.."/sounds/steps/"..terrain.."/"..random..".ogg")
table.remove(curmap,1)
if #curmap<=0 then
Note("You have reached your destination!")
Note('that took ',os.clock()-c1..'s')
Send("look")
mapnow=false
mvtime=false
insertqueue=""
if not mback then
curmap=mapback
end
mback=false
return
else
if k_move<20 then
EnableTimer("maptimer",true)
if kspells["refresh"]~=1 then
Send("rest")
return
end
if grouped==1 then
if kspells["arearefresh"]==1 then
Execute("c area refresh")
elseif kspells["refresh"]==1 then
Execute("c refresh")
else
Send("rest")
end --area
else
if kspells["refresh"]==1 then
Execute("c refresh")
end --know refresh
end --grouped
return
end --move
movemapnow()
end --curmap length
end --func
function movemore(pos)
table.remove(curmap,1)
Send(curmap[1].." | tail 1 | prefix moving")
if pos~=0 then
table.insert(mapback,pos,ldir[curmap[1]])
end
end
function exitst(n, l, wildcs)
for w in string.gmatch(wildcs[1], "%S+") do
if dirs[lastdir]==nil then
else
if rooms[k_room]==nil then
else
if dirs[w]~=nil then
if rooms[k_room][dirs[w]]==nil then
rooms[k_room][dirs[w]]="unexplored"
end --rooms w
end
end
k_lastroom=k_room
end
end
if mapnow then
mapnow=false
movemapnow()
end
if trackarea~="" then
Execute("ptrack "..trackarea)
end
if mtime then
if ldir[curmap[#curmap-1]]==lastdir then
Note("Last direction removed.")
table.remove(curmap)
table.remove(curmap)
end
end
if newchar==1 then
newchar=0
Execute("config mud")
login()
PSend("friend add kurek | prefix mzc")
PSend("channel listen zt | prefix mzc")
Note("Configuring new character...")
end
afk=0
gfighting=0
if (dispelling==1) then
dispelling=0
end
if (grouped==1) then
gclear()
end
if (#players>1) then
count=#players-1
if #players>0 then
Note(table.concat(players, ", ", 1, count)..", and "..players[#players]..".")
end
else
Note(table.concat(players, ", "))
end
players = {}
if (gs("speedwalk") == true) then
require "wait"
wait.make(function()
wait.time(0.2)
Execute("tts_stop")
Execute ("tts_note "..wildcs[1])
end)
end
if (gs("exits") == 1) then
Note(wildcs[1])
elseif (gs("exits") == 2) then
require "wait"
wait.make(function()
exits = wildcs[1]
for w in string.gmatch(exits, "%a+") do
wait.time(0.2)
Sound(sdir.."/sounds/exits/"..w..".ogg")
end
end)
end
if (amb1[terrain] == nil) then
random=math.random(1,9)
else
random=math.random(1,amb1[terrain])
end
Sound(sdir.."/sounds/steps/"..terrain.."/"..random..".ogg")
if autogo==1 then
ext=split(wildcs[1]," ")
if #ext>2 then
autogo=0
Execute("tts_interrupt reached intersection. "..wildcs[1])
return
end --exits more than 2.
if #ext==1 then
Execute("tts_interrupt dead end.")
end --one exit
if #ext==2 then
if (ext[1]~=ldir[lastdir]) then Send(ext[1]) lastdir=ext[1]
if mtime then
table.insert(curmap,ext[1])
end
elseif (ext[2]~=ldir[lastdir]) then Send(ext[2]) lastdir=ext[2] 
if mtime then
table.insert(curmap,ext[2])
end
--elseif ext[1]==lastdir and ext[1]==ldir.lastdir then Send(ext[1]) lastdir=ext[1]
--elseif ext[2]==lastdir and ext[2]==ldir.lastdir then Send(ext[2]) lastdir=ext[2]
--elseif ext[1]~=ldir.lastdir then Send(ext[1]) lastdir=ext[1] 
--elseif ext[2]~=ldir.lastdir then Send(ext[2]) lastdir=ext[2]
end
end --2 exits
end --autogo
end --function
function k_terrain(n,l,w)
tnum=tonumber(w[1])
if terrain~=terrains[tnum] then
if terrains[tnum]~=nil then
terrain=terrains[tnum]
else
terrain="town"
end
if terrain==nil then terrain="town" end
if (gs("ambience") == true) then
ppi.stop(ambid)
if (FileExists(sdir.."/sounds/ambience/"..terrain.."/"..time..".ogg")==true) then
ambid=ppi.playLooped(sdir.."/sounds/ambience/"..terrain.."/"..time..".ogg")
else
ambid=ppi.playLooped(sdir.."/sounds/ambience/"..time..".ogg")
end
resetvol()
end
end
end
function k_killarea(n,l,w)
if (area~="arenas") then
if gs("areamusic")==true then
if areaid~=11 then
ppi.stop(areaid)
end --areaid 11
areaid=ppi.playLooped(sdir.."/sounds/music/area/arenas.ogg")
resetvol()
end --area music is on
end
area="arenas"
end
function k_area(n,l,w)
xplog=io.open(GetInfo(67).."/xp_log.mushz","a+")
if not (area == w[2]) then
if gs("lyday")==nil then ss("lyday",os.date("%j")) end
if exp-areaxp>1000 then
if gs("lyday")~=gs("yday") then
xplog:write("\\\\r\\\\n")
xplog:write(os.date("%B %d"),"\\\\r\\\\n")
xplog:write("\\\\r\\\\n")
end
xplog:write("At "..os.date("%H:%M")..": "..area..", stayed for "..amins.." minutes and got "..exp-areaxp.." xp.","\\\\r\\\\n")
end
EnableTimer("aminutes",false)
amins=0
EnableTimer("aminutes",true)
area=w[2]
areaxp=exp
if gs("areamusic")==true then
if areaid~=11 then
ppi.stop(areaid)
end
if (FileExists(sdir.."/sounds/music/area/"..area..".ogg")==true) then
areaid=ppi.playLooped(sdir.."/sounds/music/area/"..area..".ogg")
else
areaid=ppi.playLooped(sdir.."/sounds/music/area/global.ogg")
end
resetvol()
end
Sound(sdir.."/sounds/notifications/change area.ogg")
backtrack={}
directions={}
rooms={}
rooms[k_room]={}
Note(w[2])
if trackarea~="" then
Note("tracking stopped due to area change. To track again, use the track alias.")
trackarea=""
end
end
xplog:close()
end
function k_exp(n,l,w)
exp=tonumber(w[1])
if areaxp==0 then areaxp=exp end
if (exp<prevexp) or (exp>prevexp) then
if (tonumber(exptnl)==0 and gs("praccing")==true) then
exptnl=2000000
classtnl="practice"
end
if (gs("bars")~=3) then
if (exp~=0) and (exptnl~=0) then
if not (math.floor(exp/exptnl*100)==prevxpc) then
PanSnd(exp,exptnl,sdir.."/sounds/pm/xp.ogg",100)
end
end
prevxpc=math.floor(exp/exptnl*100)
if (exp / exptnl * 100 > 100) then
if not (classtnl=="none") then
if (gs("praccing") == true) then
r="yes"
if (r=="yes") then
play("notifications/millxp",0)
PSend("train prac")
else
Execute("config praccing")
end
else
Note("You can now level "..classtnl.."!")
play("notifications/millxp",0)
end
classtnl="none"
end
end
else
if not (classtnl=="none") then
if not (math.floor(exp/exptnl*100)==prevxpc) then
Note("xp "..math.floor(exp/exptnl*100).." percent")
end
prevxpc=math.floor(exp/exptnl*100)
if (exp / exptnl * 100 > 100) then
if (gs("praccing") == true) then
r="yes"
if (r=="yes") then
play("notifications/millxp",0)
PSend("train prac")
else
Execute("config praccing")

end

else
Note("You can now level "..classtnl.." to "..levtnl.."!")
play("notifications/millxp",0)
end
classtnl="none"
end
end
end --exp
prevexp=exp
end --prevexp
end
function fprompt(n, l, w)
k_target=w[3]
k_fp=tonumber(w[1])
if (gs("music") == true) then

if (gs("musictype")==1) then
if battleplaying~=1 then
ppi.fadeout(battleid,500)
battleid=ppi.play(sdir.."/sounds/music/"..gs("musictype").."/"..k_cond..".ogg",1)
battleplaying=1
end --battle playing
end --musictype
end --music
if afk==1 then afk=0 end
if (gs("music")==true) then
if gs("areamusic")==true then
ppi.slideVol(0,areaid)
end
end
nfight=1
EnableGroup("combat",1)
if not (k_fp==nil) then
fwp=k_fp
else
Note("debug: fwp failed!")
end
if fwp~=999 then
if not (prevfp == fwp) then
if (gs("bars")~=3) then
PanSnd(fwp,100,sdir.."/sounds/pm/fp.ogg")
else
Note("mob "..fwp.."percent")
end
end
else
fwp=100
end
prevfp=fwp
--if (IsInTable(fnames,w[11])~=1) then
--table.insert(fnames,w[11])
--if (#fnames>1) then
--if (#fnames~=prevfnames) then
--Note("Now fighting "..#fnames.." oponents.")
--end --prevfnames
--prevfnames=#fnames
--end --1 or more.
--prevfnames=#fnames
--end --multiple oponents
mg=w[2]
if mg=="plural" then mg="neuter" end
fight = 1
if (k_hp/k_maxhp*100 <10) then
if (grouped==1) and (gs("antideath")==true) and (gotout~=1) then
PSend("abort")
PSend("gt im getting the fuck out.")
gotout=1
DoAfterSpecial(25,'gotout=0)',12)
if (kspells["wordofrecall"]==1) then
if (pose~="stand") then
PSend("stand")
end
PSend("c word")
casting="word"
PSend("recall")
else
PSend("recall")
end --word
end --grouped
if (gs("autoheal")==true) then
autoheal()
end --autoheal
end --hp check
getcond(k_fp)
if not k_mcond~=nil then
fc=k_mcond
end
if not (prevfc == fc) then
ppi.play(sdir.."/sounds/mobcond/"..fc..".ogg",0,50)
Note(fc)
end
if (gs("music") == true) then
if (gs("musictype")==2) then
if not (prevfc==fc) then
ppi.fadeout(battleid,500)
battleid=ppi.play(sdir.."/sounds/music/"..gs("musictype").."/"..k_mcond..".ogg",1)
end --prevfc
end --musictype
end --music
prevfc=k_mcond
EnableGroup("combat", 1)
prevhp=tonumber(prevhp)
if (k_hp<prevhp) then
dmg=prevhp-k_hp
--Note(dmg)
antidie()
end
prevhp=k_hp
end
function getcond(thp)
if thp==999 then
k_mcond="unknown"
return
end
if thp >= 99 then
k_mcond="excellent"
elseif thp >= 90 then
k_mcond="scratches"
elseif thp >= 70 then
k_mcond="small wounds"
elseif thp >= 50 then
k_mcond="quite a few"
elseif thp >= 30 then
k_mcond="big nasty"
elseif thp >= 10 then
k_mcond="pretty hurt"
elseif thp >= 0 then
k_mcond="awful"
else
k_mcond="awful"
end
end
function regenscr(n, l, w)
if (k_hp==k_maxhp) and (k_mana==k_maxmana) and (hpnote==0) and (k_move==k_maxmove) and (mvnote==0) and (mnnote==0) then
hpnote=1
mnnote=1
mvnote=1
Note("You are full.")
Sound(sdir.."/sounds/notifications/allfull.ogg")
end
if (k_hp==k_maxhp) and (k_mana==k_maxmana) and (hpnote==0) and (mnnote==0) then
hpnote=1
mnnote=1
Note("hp and mana are full.")
Sound(sdir.."/sounds/notifications/hpmanafull.ogg")
end
if (k_hp == k_maxhp) then
if (hpnote == 0) then
Note ("hp is full.")
Sound(sdir.."/sounds/misc/regenned.ogg")
hpnote = 1
end
end
if (k_mana == k_maxmana) then
if (mnnote == 0) then
Note ("mana is full.")
Sound(sdir.."/sounds/misc/regenned.ogg")
mnnote = 1
end
end
if (k_maxmove-k_move<10) then
if (mvnote == 0) then
Note ("move is full.")
Sound(GetInfo(67).."/sounds/notifications/movefull.ogg")
mvnote = 1
end
end
--**
if(eventregen==1) then
mrtime=sec2min(math.floor(math.abs((k_mana-k_maxmana)/(mregen/30))))
else
mrtime=math.abs(math.floor((k_mana-k_maxmana)/mregen))
end
if (mnrnote==0) and (mnnote~=1) then
Note("You'll need about " ..mrtime.. " to regen mana.")
mnrnote=1
end
if(eventregen==1) then
hprtime=sec2min(math.floor(math.abs((k_hp-k_maxhp)/(hpregen/30))))
else
hprtime=math.abs(math.floor((k_hp-k_maxhp)/hpregen))
end
if (hprnote==0) and (hpnote~=1) then
Note("You'll need about " ..hprtime.. " to regen hp.")
hprnote=1
end
mvrtime=sec2min(math.floor(math.abs((k_move-k_maxmove)/(mvregen/30))))
if (mvrnote==0) and (mvnote~=1) then
Note("You'll need about " ..mvrtime.. " to regen move.")
mvrnote=1
end
end
function IsInTable(t, s)
ingroup=0
for i, result in pairs (t) do
if string.match(result,s) then
ingroup=1
end --if
end --for
if (ingroup==1) then return 1
end
if (ingroup==0) then return 0
end
end --func
function grtimer()
if (job=="hitter") then
if not (nohit==1) then
nohit=1
SendNoEcho(hitting)
require "wait"
wait.make(function()
wait.time(2.8)
nohit=0
end) --wait
end --nohit
end --hit
if (job=="blaster") then
if not (noblast==1) then
PSend("c "..blasting)
noblast=1
require "wait"
wait.make(function()
wait.time(2.8)
noblast=0
casting=blasting
end) --wait
end --nohit
end --blaster
if (job=="healer") then
PSend("gr | prefix heal")
elseif (job=="healblast") then
PSend("gr | prefix heal")
elseif (job=="areaman") then
PSend("gr | prefix heal")
end
end --func
function healer(n,l,w)
if (tonumber(mana)<50) then
if (pose~="rest") then
PSend("rest")
end
return
end --mana
--gname=w[1]
--glvl=w[2]
ghp=tonumber(w[3])
gk_maxhp=tonumber(w[4])
--gmn=w[5]
--gk_maxmana=w[6]
gmv=tonumber(w[7])
gk_maxmove=tonumber(w[8])
require "wait"
wait.make(function()
if (gmv/gk_maxmove*100 < 30) then
if (kspells["arearefresh"]==1) then
if (pose~="stand") then
PSend("stand")
end
PSend("c area")
PSend("rest")
end --know area
end --max move
if(job=="healer") then
if not (nohealing==1) then
if (ghp/gk_maxhp*100 <75) then
gname=w[1]
if (pose=="rest") then
PSend("stand")
end --rest
PSend("cast "..spells["heal"].." "..gname)
casting=spells["heal"].." "..gname
PSend("rest")
nohealing=1
wait.time(2)
nohealing=0
end
else
if (job=="healblast") then
if (assisting==0) then
assisting=1
PSend("assist")
end
PSend("c "..blasting)
casting=blasting
else
if (pose~="rest") then
PSend("rest")
end
end
end --hp check
end --nohealing
end) --wait
end --func
function OnPluginInstall()
require "serialize"
Execute("eql clearsilent")
if (FileExists(GetInfo(67).."/settings/filters.mushz")==true) then
dofile(GetInfo(67).."/settings/filters.mushz")
else
gag={}
Execute("filter none")
end
if (FileExists(GetInfo(67).."/weyoun deeds.txt")==true) then
exfw=assert(io.open(GetInfo(67).."/weyoun deeds.txt", "w"))
assert (exfw:write (" "))
exfw:close()
end
if (FileExists(GetInfo(67).."/settings/eqlists.mushz")==true) then
dofile(GetInfo(67).."/settings/eqlists.mushz")
if eql.mode==nil then
eql.mode=2
end
else
eql=nil
eql={}
eql.setnames={}
eql.pieces={}
eql.mode=2
end
if (FileExists(GetInfo(67).."/settings/charlist.mushz")==true) then
dofile(GetInfo(67).."/settings/charlist.mushz")
else
charlist={}
end
if (FileExists(GetInfo(67).."/settings/counters.mushz")==true) then
dofile(GetInfo(67).."/settings/counters.mushz")
else
Execute("scm reset")
end
if (FileExists(GetInfo(67).."/settings/recast.mushz")==true) then
dofile(GetInfo(67).."/settings/recast.mushz")
else
recast={}
recast.default={}
recast.active="default"
recastdefaults(recast.active)
end
if (FileExists(GetInfo(67).."/settings/storefilter.mushz")==true) then
dofile(GetInfo(67).."/settings/storefilter.mushz")
else
storefilter={}
end

if (FileExists(GetInfo(67).."/settings/settings.mushz")==true) then
dofile(GetInfo(67).."/settings/settings.mushz")
--Note("recovered settings from "..GetInfo(67).."/settings/settings.mushz")
if gs("grandoms")==nil then
ss("grandoms",false)
end
if settings.shortid==nil then
ss("shortid",1)
else
if gs("shortid")==true then
ss("shortid",2)
elseif gs("shortid")==false then
ss("shortid",1)
end
end
if settings.shortid.status==nil then
ss("shortid",3)
end
if settings.shortall==nil then
ss("shortall",true)
end
else
--Note("settings not found. Creating new ones.")
sclear()
Execute("config release")
end
clear()
if gs("vol_global")~= nil then
ppi.setVol(tonumber(gs("vol_global")),0)
end
if gs("vol_areaid")~= nil then
ppi.setVol(tonumber(gs("vol_areaid")),areaid)
end
if gs("vol_ambid")~= nil then
ppi.setVol(tonumber(gs("vol_ambid")),ambid)
end
end
function psnd(c,m,f)
fid=ppi.play(f,0)
ppi.setPitch((c*200/m)-100,fid)
end
function sf(v,f)
CallPlugin("aedf0cb0be5bf045860d54b7", "sfreq", ""..v.."="..f)
end
function channels1()
name=string.lower(w[2])
cname=string.lower(w[1])
if (name == gs("me")) then
if (gs("chist") == true) then
Execute("history_add all="..w[1].." "..w[2]..": "..w[3])
Execute("history_add channels="..w[1].." "..w[2]..": "..w[3])
end
if (gs("chans") ==1) then
Sound(sdir.."/sounds/channels/"..cname..".ogg")
Note(w[1].." "..w[2]..": "..w[3])
elseif (gs("chans") ==2) then
Sound(sdir.."/sounds/channels/"..cname..".ogg")
Execute("tts_note "..w[1].." "..w[2]..": "..w[3])
elseif (gs("chans") ==3) then
Sound(sdir.."/sounds/channels/"..cname..".ogg")
end
else
Note(w[1].." "..w[2]..": "..w[3])
Execute("history_add all="..w[1].." "..w[2]..": "..w[3])
Execute("history_add channels="..w[1].." "..w[2]..": "..w[3])
Sound(sdir.."/sounds/channels/"..cname..".ogg")
end
end
function castalias(n, l, w)
--if(pose~="stand") then
--prevpose=pose
--PSend("stand")
--end
counters.cast=counters.cast+1
Send("cast "..w[1])
if(nfight==0) then
casting=w[1]
end
end
function bfight(n)
gfighting=1
if (grouped==0) then
return
end
if (IsInTable(group,n)==1) then
if (job=="tank") then
if (restime==1) or (notank==1) then
PSend("rescue "..n)
res=n
end
elseif (job=="hitter") then
if (hitting==nil) then
if (kskills["disarm"]==1) then
hitting="disarm"
else
if (kskills["trip"]==1) then
hitting="trip"
else
if (kskills["bash"]==1) then
hitting="bash"
end --bash
end --no disarm
end --skills
end --nil hit
if (assisting==0) then
PSend("assist")
assisting=1
EnableTimer("grtimer", true)
end --assist
elseif (job=="healer") then
EnableTimer("grtimer", true)
elseif (job=="healblast") then
EnableTimer("grtimer", true)
elseif (job=="areaman") then
EnableTimer("grtimer", true)
elseif (job=="blaster") then
if (assisting==0) then
PSend("assist")
assisting=1
EnableTimer("grtimer", true)
end --assist
end --jobs
end --in group
end --function
function follow(n,l,w)
if (IsInTable(group,w[1])==1) then
Sound(sdir.."/sounds/grouping/follow.ogg")
if (map==1) then
AppendToNotepad("map", w[2]..";")
end
if (gs("ifollow")==true) then
Execute("tts_interrupt "..w[2])
else
Note(w[2])
end
else
Note(l)
end
end --func
function fightfunc(who,wtype,weapon,damtype,towho)
if(who=="Your") then
counters.enemyhits=counters.enemyhits+1
fight_swing(weapon)
else--if I was not the one to hit
if(towho=="you") then--if attack is directed at you
counters.hits=counters.hits+1--counter
fight_attack()--scream
 
else--if neither
if(IsInTable(group,towho)==0) then
return
end
gfighting=1
if (gs("gdamage")==true) then
if (swings[weapon] == nil) then
else
random=math.random(1,swings[weapon])
end
Sound(sdir.."/sounds/combat/weapon swings/"..weapon.."/"..random..".ogg")
end
end --if at you
end--main hit condition
fight_damtype(damtype,who,towho)
if wtype~= none then
fight_weapon(weapon,who,towho,wtype)
else
fight_weapon(weapon,who,towho,"none")
end
--grunt
if(who=="Your") then
theygrunt2()
else
if(towho=="you") then
yougrunt2()
end
end
end--func
function fight_attack()
if (mg=="male") then
random=math.random(1,mattack)
elseif (mg=="female") then
random=math.random(1,fattack)
elseif (mg=="neuter") then
random=math.random(1,nattack)
end
ppi.play(sdir.."/sounds/combat/attack/"..mg.."/"..random..".ogg",0,50)
end
function fight_weapon(weapon,who,towho,wtype)
if not (who=="Your") and not (towho=="you") then
if(IsInTable(group,towho)==1) then
if(gs("gdamage")==false) then
--Note("return")
return
end
end
end
--Note("new wtype is "..wtype)
if(wtype~="none") then
ppi.play(sdir.."/sounds/combat/weapon sounds/elemental/"..wtype..".ogg",0)
end
if(who=="Your") then
DoAfterSpecial(0.2,'ppi.play(sdir.."/sounds/combat/weapon sounds/"..weapon.."/"..math.random(1,weapons[weapon])..".ogg",0,50)',12)
else
if(towho=="you") then
if (weapons[weapon] == nil) then
return
end
DoAfterSpecial(0.2,'ppi.play(sdir.."/sounds/combat/weapon sounds/"..weapon.."/"..math.random(1,weapons[weapon])..".ogg",0,-50)',12)
end
end
end
function fight_swing(weapon)
if (swings[weapon] == nil) then
 else
random=math.random(1,swings[weapon])
end
ppi.play(sdir.."/sounds/combat/weapon swings/"..weapon.."/"..random..".ogg",0,-50)
end
function fight_damtype(damtype,who,towho)
if not (who=="Your") or not (towho=="you") then
if(gs("gdamage")==false) then
--Note("return")
return
end
end
DoAfterSpecial(0.2,'ppi.play(sdir.."/sounds/combat/damage/"..damtype..".ogg",0)',12)
if (damtype=="scratches") or (damtype=="hits") or (damtype=="injures") or (damtype=="wounds") or (damtype=="mauls") then
gtype=1
elseif (damtype=="decimates") or (damtype=="devastates") or (damtype=="maims") then
gtype=2
elseif (damtype=="MUTILATES") or (damtype=="DISMEMBERS") or (damtype=="DISEMBOWELS") or (damtype=="MASSACRES") then
gtype=3
elseif (damtype=="*** DEVASTATES ***") then
DoAfterSpecial(0.2,'ppi.play(sdir.."/sounds/combat/damage/devastates2.ogg",0)',12)
gtype=4
elseif (damtype=="*** MASSACRES ***") then
DoAfterSpecial(0.2,'ppi.play(sdir.."/sounds/combat/damage/massacres2.ogg",0)',12)
gtype=4
elseif (damtype=="*** OBLITERATES ***") then
DoAfterSpecial(0.2,'ppi.play(sdir.."/sounds/combat/damage/obliterates.ogg",0)',12)
gtype=4
elseif (damtype=="*** DEMOLISHES ***") then
DoAfterSpecial(0.2,'ppi.play(sdir.."/sounds/combat/damage/demolishes.ogg",0)',12)
gtype=4
elseif (damtype=="*** ANNIHILATES ***") then
DoAfterSpecial(0.2,'ppi.play(sdir.."/sounds/combat/damage/annihilates.ogg",0)',12)
gtype=4
elseif (damtype=="*** DESTROYS ***") then
DoAfterSpecial(0.2,'ppi.play(sdir.."/sounds/combat/damage/destroys.ogg",0)',12)
gtype=4
end
end
function fighting(n,l,wl)
if not gag.fights then Note(wl[1]) end
w={}
for wr in string.gmatch(wl[1], "%S*") do
if not (wr=="") then
table.insert(w,wr)
end--empty string
end--for
verb=0
for i, result in pairs (w) do
if verbs[w[i]] then
verb=i
end--if
end --for
if verb == 0 then return end
if(w[verb-1]=="***") then
str="*** "..w[verb].." ***"
damtype=str
--Fote("damage "..damtype)
str=""
weapon=""
if nouns[w[verb-2]] then
weapon=w[verb-2]
wpos=verb-2
else
wpos=verb-1
end
--fote("weapon "..weapon)
npos=verb+2
else --if without stars
npos=verb+1
damtype=w[verb]
--fote("damage "..damtype)
str=""
weapon=""
if nouns[w[verb-1]] then
--fote("weapon yes")
weapon=w[verb-1]
wpos=verb-1
else
--fote("weapon no")
wpos=verb
end
--fote("weapon "..weapon)
end--no stars
wtype=none
text=w[wpos-1]
if adjectives[text] then
wtype=text
whopos=wpos-2
else
whopos=wpos-1
end
for i=1, whopos do
str=str..w[i].." "
end--for h
who=str
who=string.sub(who,1,#who-1)
str=""
if (string.sub(who,#who-1,#who)=="'s") then
who=string.sub(who,1,#who-2)
end
--Note("who "..who)
for i=npos, #w do
str=str..w[i].." "
end--for h
towho=string.sub(str,1,#str-2)
--fote("to who "..towho)
--fighting separator
if weapon=="" then
weapon="punch"
fightfunc(who,"none",weapon,damtype,towho)
return
end
if not (wtype==nil) then
--Note("works up to here")
elemental=true
fightfunc(who,wtype,weapon,damtype,towho)
return
else
elemental=false
fightfunc(who,"none",weapon,damtype,towho)
return
end--weapon
end--func
Accelerator("alt+f12", "areavolume_down")
Accelerator("alt+f11", "areavolume_up")
Accelerator("alt+s","config speedwalk")
Accelerator("alt+i", "n")
Accelerator("alt+k", "s")
Accelerator("alt+l", "e")
Accelerator("alt+j", "w")
Accelerator("alt+o", "ne")
Accelerator("alt+u", "nw")
Accelerator("alt+,", "se")
Accelerator("alt+n", "sw")
Accelerator("alt+e", "stand")
Accelerator("alt+d", "_sleep")
Accelerator("alt+r", "u")
Accelerator("alt+f", "d")
Accelerator("alt+shift+s", "stealth")
Accelerator("alt+m", "mapping")
Accelerator("F3", "macro-sacc")
Accelerator("F4", "macro-sacc2")
Accelerator("ctrl+l", "redo")
Accelerator("alt+t", "opentxt")

Accelerator("ctrl+alt+l", "goldlog")
Accelerator("ctrl+F1", "macro-recast")
Accelerator("shift+esc", "macro-abort")
Accelerator("alt+g","automaticmove")

]]>
</script>
</muclient>