I've got two to post here first I need help on second is just because I wrote it to fill a gap that nobody seems to have coded for.
The first one is that speedwalker plugin Lasher has asked for it searches speedwalks keywords pulls out the area names and speedwalks and creates aliases so that you can have a plugin that only uses 1 command to update itself instead of having to manually update it every time an area is added but I'm running into two problems:
1) First of all I can't seem to get the AddAlias command to work properly, I've got it to the point where the GetAlias command I've added that uses the getaliasinfo function shows all of the areas on the alias list and the aliasinfo command I"ve added shows the speedwalk under the info but they won't activate at all when trying to use them. I dont know if I have to use some special command structure to activate the aliases once they're added or what.
2) Secondly I tried using the DoAfterSpecial function so that it would switch on for so many seconds capture then switch off but using that it would always miss the first page of speedwalks for some reason so I've switched to a simple EnableTriggerGroup true argument the problem being theres no way to switch it off. I've asked Lasher if he could add an endline onto the speedwalks command so that I could have it switch off using that to which he agreed but he's been busy with the academy and hasnt done that yet. So in the meantime I have it trying to trigger to switch off using the last speedwalk on the list but the trigger refuses to activate.
anyways heres the script I realize it's horribly inefficient but I"m still teaching myself Lua and I'm trying not to get ahead of myself
The first one is that speedwalker plugin Lasher has asked for it searches speedwalks keywords pulls out the area names and speedwalks and creates aliases so that you can have a plugin that only uses 1 command to update itself instead of having to manually update it every time an area is added but I'm running into two problems:
1) First of all I can't seem to get the AddAlias command to work properly, I've got it to the point where the GetAlias command I've added that uses the getaliasinfo function shows all of the areas on the alias list and the aliasinfo command I"ve added shows the speedwalk under the info but they won't activate at all when trying to use them. I dont know if I have to use some special command structure to activate the aliases once they're added or what.
2) Secondly I tried using the DoAfterSpecial function so that it would switch on for so many seconds capture then switch off but using that it would always miss the first page of speedwalks for some reason so I've switched to a simple EnableTriggerGroup true argument the problem being theres no way to switch it off. I've asked Lasher if he could add an endline onto the speedwalks command so that I could have it switch off using that to which he agreed but he's been busy with the academy and hasnt done that yet. So in the meantime I have it trying to trigger to switch off using the last speedwalk on the list but the trigger refuses to activate.
anyways heres the script I realize it's horribly inefficient but I"m still teaching myself Lua and I'm trying not to get ahead of myself
<muclient>
<plugin
name="Speedwalker"
author="Starky"
id="a234cd0873b23a1f234e826f"
language="lua"
purpose="Runto Command Plugin"
date_written="2008-05-26 23:10:20"
save_state="y"
>
<description trim="n">
<![CDATA[
Only one command for this plugin
swalkupdate - updates the alias list with speedwalks to areas
]]>
</description>
</plugin>
<aliases>
<alias
match="^swalkupdate$"
ignore_case="y"
enabled="y"
group="Commands"
regexp="y"
send_to="12"
script="start"
sequence="100"
>
</alias>
<alias
match="^testrun$"
ignore_case="y"
enabled="y"
group="Commands"
regexp="y"
send_to="12"
sequence="100"
>
<send>
AddAlias("food_alias", "%1", "run %2", alias_flag.Enabled, "")
</send>
</alias>
<alias
match="^aliasinfo (.*?)$"
enabled="y"
ignore_case="y"
group="Commands"
regexp="y"
send_to="12"
sequence="100"
>
<send>
var.aliasnum = "%1"
Note (GetAliasInfo(var.aliasnum, 2))
</send>
</alias>
<alias
match="^getalias$"
ignore_case="y"
enabled="y"
group="Commands"
regexp="y"
send_to="12"
script="aliaslist"
sequence="100"
>
</alias>
<alias
match="^paging (.*?)$"
enabled="y"
group="Commands"
regexp="y"
send_to="12"
sequence="100"
>
<send>
var.paging = "%1"
</send>
</alias>
</aliases>
<triggers>
<trigger
enabled="n"
group="disabled"
match="^@paging"
expand_variables="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>
SendNoEcho ( "" )
</send>
</trigger>
<trigger
enabled="n"
group="Capture"
match="^(.*?)\srun\s(.*?)$"
omit_from_output="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>
AddAlias("%1", "%1", "run %2", alias_flag.Enabled, "")
</send>
</trigger>
<trigger
enabled="n"
group="Capture"
match="^pyre\s$"
regexp="y"
send_to="12"
sequence="100"
>
<send>
EnableTriggerGroup ("Capture" , false)
SendNoEcho( "Gt off")
</send>
</trigger>
</triggers>
<script>
require "var"
var.paging = var.paging or "[ Paging \: (Enter), (T)op, (Q)uit, (B)ack, (R)efresh, (L)ast, (A)ll ]:"
var.areaname = var.areaname or "0"
var.speedwalk = var.speedwalk or "0"
var.aliasname = var.aliasname or "0"
function OnPluginInstall()
OnHelp()
end -- OnPluginInstall
function OnHelp ()
Note (GetPluginInfo (GetPluginID (), 3))
end
function start ()
EnableTriggerGroup ("Capture", true)
SendNoEcho( "speedwalk keywords" )
end
function aliaslist ()
al = GetAliasList()
if al then
for k, v in ipairs (al) do
Note (v)
end -- for
end -- if we have any aliases
end
</script>
</muclient>