<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Wednesday, July 26, 2006, 11:18 AM -->
<!-- MuClient version 3.74 -->

<!-- Plugin "Aardwolf_AutohunterLUA" generated by Plugin Wizard -->

<muclient>
<plugin
   name="Aardwolf_AutohunterLUA"
   author="Onoitsu2"
   id="e5ba9d8d543592b7ae80926a"
   language="Lua"
   purpose="This will hunt and move toward a mob every 3 seconds."
   date_written="2006-07-26 11:15:29"
   requires="3.65"
   version="1.1"
   >
<description trim="n">
<![CDATA[
Aardwolf_AutohunterLUA Help File
autohunt MOBNAME          - Turns on autohunting of MOBNAME
autohunt off              - Turns off autohunting
autohunt help             - Displays this help file

]]>
</description>

</plugin>


<!--  Get our standard constants -->

<include name="constants.lua"/>

<!--  Triggers  -->

<triggers>
  <trigger
   enabled="n"
   group="autohunter"
   match="^(.*?) is (.*?) from here\.$"
   name="autohunter"
   regexp="y"
   script="autohunt"
   send_to="12"
   sequence="100"
  >
  </trigger>
  <trigger
   group="autohunter"
   make_underline="y"
   match="^(.*?) is here\!$"
   regexp="y"
   script="autohunthere"
   send_to="12"
   sequence="100"
  >
  </trigger>
  <trigger
   enabled="n"
   group="autohunter"
   make_underline="y"
   match="^You couldn\'t find a path to (.*?) from here\.$"
   regexp="y"
   script="autohunthere"
   send_to="12"
   sequence="100"
  >
  </trigger>
</triggers>


<!--  Aliases  -->

<aliases>
  <alias
   name="autohunter_alias"
   match="^autohunt (off|help|(.*?))$"
   enabled="y"
   expand_variables="y"
   omit_from_command_history="y"
   regexp="y"
   script="autohuntalias"
   send_to="12"
   ignore_case="y"
   sequence="100"
  >
  </alias>
</aliases>

<!--  Plugin help  -->

<script>
<![CDATA[
function autohuntalias(sName,sLine,wildcards)
if string.lower(wildcards[1]) == "off" then
ColourNote("white", "red", "Autohunter OFF")
world.EnableTriggerGroup("autohunter",false)
elseif string.lower(wildcards[1]) == "help" then
OnHelp()
else
Send("hunt " .. wildcards[1])
ColourNote("white", "green", "Autohunter ON! (Hunting " .. wildcards[1] .. ")")
world.SetVariable("autohuntmob",string.lower(wildcards[1]))
world.EnableTriggerGroup("autohunter",true)
end
end -- autohuntalias

function autohunt(sName,sLine,wildcards)
Send(wildcards[2])
DoAfterSpecial(3,'Send("hunt " .. world.GetVariable("autohuntmob"))',12)
end -- autohunt

function autohunthere(sName,sLine,wildcards)
ColourNote("white", "red", "Autohunter OFF")
world.EnableTriggerGroup("autohunter",false)
end -- autohunthere

function OnPluginInstall()
OnHelp()
end -- OnPLuginInstall

function OnHelp ()
  world.Note (world.GetPluginInfo (world.GetPluginID (), 3))
end
]]>
</script> 

</muclient>

