Thanks Nick and Artel! I fixed those errors as well as a couple others and now it seems to work.
<?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_cphunterLUA" generated by Plugin Wizard -->
<muclient>
<plugin
name="Aardwolf_cphunterLUA"
author="Anatema"
id="e5ba9d8d543592b7ae80926b"
language="Lua"
purpose="This will locate your cp mob's room."
date_written="2006-07-26 11:15:29"
requires="3.74"
version="1.1"
>
<description trim="n">
<![CDATA[
Aardwolf_cphunterLUA Help File
cphunt MOBNAME - Turns on cphunting of MOBNAME
cphunt off - Turns off cphunting
cphunt delay # - Sets the Delay in seconds between hunt movements (single digit 1-9, Default 3)
cphunt help - Displays this help file
]]>
</description>
</plugin>
<!-- Get our standard constants -->
<include name="constants.lua"/>
<!-- Triggers -->
<triggers>
<trigger
enabled="n"
group="cphunter"
match="^You have no idea what you\'re doing\, but maybe (.*?) left (.*?)\?$"
name="cphunter1"
regexp="y"
script="cphunt"
send_to="12"
sequence="100"
>
</trigger>
<trigger
enabled="n"
group="cphunter"
match="^The trail of (.*?) is confusing\, but you\'re reasonably sure (?:.*?) headed (.*?)\.$"
name="cphunter2"
regexp="y"
script="cphunt"
send_to="12"
sequence="100"
>
</trigger>
<trigger
enabled="n"
group="cphunter"
match="^You are confident that (.*?) passed through here\, heading (.*?)\.$"
name="cphunter3"
regexp="y"
script="cphunt"
send_to="12"
sequence="100"
>
</trigger>
<trigger
enabled="n"
group="cphunter"
match="^There are traces of (.*?) having been here\. Perhaps they lead (.*?)\?$"
name="cphunter4"
regexp="y"
script="cphunt"
send_to="12"
sequence="100"
>
</trigger>
<trigger
enabled="n"
group="cphunter"
match="^You are almost certain that (.*?) is (.*?) from here\.$"
name="cphunter5"
regexp="y"
script="cphunt"
send_to="12"
sequence="100"
>
</trigger>
<trigger
group="cphunter"
match="You seem unable to hunt that target for some reason\.$"
regexp="y"
script="cphunthere"
send_to="12"
sequence="100"
sound="C:\windows\media\tada.wav"
sound_if_inactive="y"
>
</trigger>
<trigger
enabled="n"
group="cphunter"
match="^(You see no (.*) here\.|No way\! You are still fighting\!|No\-one in this area by that name\.)$"
regexp="y"
script="cphuntstop"
send_to="12"
sequence="100"
>
</trigger>
</triggers>
<!-- Aliases -->
<aliases>
<alias
name="cphunter_alias"
match="^cphunt (off|help|delay ((?:\d+)?\.?\d+)|(.*?))$"
enabled="y"
expand_variables="y"
regexp="y"
script="cphuntalias"
send_to="12"
ignore_case="y"
sequence="100"
>
</alias>
<alias
name="cphunter_alias2"
match="^ah (off|help|delay ((?:\d+)?\.?\d+)|(.*?))$"
enabled="y"
expand_variables="y"
regexp="y"
script="cphuntalias"
send_to="12"
ignore_case="y"
sequence="100"
>
</alias>
</aliases>
<!-- Plugin help -->
<script>
<![CDATA[
huntdelay = GetVariable("huntdelay")
if huntdelay == nil or huntdelay == "" then
huntdelay = 3
SetVariable("huntdelay", 3)
ColourNote("white","green","cphunter Delay, Set to Default: ","yellow","green","3")
end -- if
direction = none
function cphuntalias(sName,sLine,wildcards)
if string.lower(wildcards[1]) == "off" then
ColourNote("white", "red", "cphunter OFF")
EnableTriggerGroup("cphunter",false)
elseif string.lower(wildcards[1]) == "help" then
OnHelp()
elseif string.find(string.lower(wildcards[1]),"delay ",1,true) then
if tonumber(wildcards[2]) < 0.5 or wildcards[2] == "" then
ColourNote("white","red","cphunter Delay Invalid, Setting to Default: ","yellow","red","3")
SetVariable("huntdelay",3)
SaveState()
else
ColourNote("white","green","cphunter Delay set to: ","yellow","green",tonumber(wildcards[2]))
SetVariable("huntdelay",tonumber(wildcards[2]))
SaveState()
end -- if
else
Send("hunt " .. string.lower(wildcards[1]))
ColourNote("white", "green", "cphunter ON! (Hunting " .. wildcards[1] .. ")")
SetVariable("cphuntmob",string.lower(wildcards[1]))
EnableTriggerGroup("cphunter",true)
end
end -- cphuntalias
function cphunt(sName,sLine,wildcards)
if GetVariable("mobnum") == nil or GetVariable("mobnum") == "" then
SetVariable("mobnum",1)
end -- if
DoAfterSpecial(tonumber(GetVariable("huntdelay")),'Send("hunt " .. GetVariable("mobnum").."."..GetVariable("cphuntmob"))',12)
SetVariable("mobnum", tonumber(GetVariable("mobnum"))+1)
end -- cphunt
function cphunthere(sName,sLine,wildcards)
if GetVariable("mobnum") == nil or GetVariable("mobnum") == "" then
Send("where " ..GetVariable("cphuntmob"))
elseif tonumber(GetVariable("mobnum")) == 1 then
Send("where " .. GetVariable("mobnum").. "."..GetVariable("cphuntmob"))
else
--SetVariable("mobnum", tonumber(GetVariable("mobnum"))-1)
SetVariable("mobnum", tonumber(GetVariable("mobnum")))
Send("where " .. GetVariable("mobnum").. "."..GetVariable("cphuntmob"))
end -- if
ColourNote("white", "green", "Your CP mob was located!")
SetVariable("mobnum",1)
EnableTriggerGroup("cphunter",false)
end -- cphunthere
function cphuntstop(sName,sLine,wildcards)
ColourNote("white", "red", "cphunter OFF")
SetVariable("mobnum",1)
EnableTriggerGroup("cphunter",false)
end -- cphunthere
function OnPluginInstall()
OnHelp()
end -- OnPluginInstall
function OnHelp ()
Note(GetPluginInfo(GetPluginID(),3))
end
]]>
</script>
</muclient>
|