Alright I'm writing a script for Aardwolf just a very simple vorpal counter it works fine when set up in the client but when trying to put it into a plugin format for clannies Im running into a strange problem with * and %1 that has effectively stumped the late night crew on tech channel.
Everything in the script works fine except for capturing the name of the vorpalled mob and reporting it back in the string. The %1 returns a blank space instead of the mob name. Replacing the %1 with a setvariable and getvariable does nothing still returns a blank space. Defining a variable and having it getvariable and calling it with @variable returns the default string set to the variable in the script. Anyways enough with the rambling I'll put a copy of the plugin script here so you can take a looksy.
the setvariable of VorpVictim was a test after the original * and %1 didn't work the original code had no VorpVictim variable and had just a %1 in the quotes of said text on the channel. This had no different effect from the code above both post a blank character
said code I am testing using the echo command on aardwolf
PS: as a side note thanks in advance but Im going to bed here soon and leave on vacation later today so I most likely wont be able to post with feedback on how this worked or not for about a week.
Everything in the script works fine except for capturing the name of the vorpalled mob and reporting it back in the string. The %1 returns a blank space instead of the mob name. Replacing the %1 with a setvariable and getvariable does nothing still returns a blank space. Defining a variable and having it getvariable and calling it with @variable returns the default string set to the variable in the script. Anyways enough with the rambling I'll put a copy of the plugin script here so you can take a looksy.
<plugin
name="VorpalCounter"
author="Starky"
id="a234cd0873b23a1f234e826c"
language="lua"
purpose="Simple vorpal counter which tallies per mort and total"
date_written="2007-12-22 02:24:45"
save_state="y"
>
</plugin>
<variables>
<variable name="VorpChan">gt</variable>
<variable name="VorpCount">0</variable>
<variable name="VorpTotal">0</variable>
</variables>
<aliases>
<alias
match="vorpchan *"
enabled="y"
send_to="12"
sequence="100"
>
<send>SetVariable ("VorpChan", "%1" )
</send>
</alias>
<alias
match="vorpreset"
enabled="y"
send_to="12"
sequence="100"
>
<send>SetVariable ("VorpCount", "0")
</send>
</alias>
</aliases>
<triggers>
<trigger
enabled="y"
group="Vorpal"
match="Your weapon glows brightly and decapitates *"
regexp="y"
expand_variables="y"
send_to="12"
sequence="100"
>
<send>SetVariable ("VorpVictim", "%1")
SetVariable ("VorpCount",tonumber(GetVariable("VorpCount") +1))
SetVariable ("VorpTotal",tonumber(GetVariable("VorpTotal") +1))
SendNoEcho(GetVariable ("VorpChan") .. " I just vorpalled " ..
GetVariable("VorpVictim") .. "! Which is " ..
GetVariable("VorpCount") .. " total vorpals this remort, and " ..
GetVariable("VorpTotal") .. " since added on Dec 12th 2007!")
</send>
</trigger>
</triggers>
the setvariable of VorpVictim was a test after the original * and %1 didn't work the original code had no VorpVictim variable and had just a %1 in the quotes of said text on the channel. This had no different effect from the code above both post a blank character
said code I am testing using the echo command on aardwolf
Quote:
echo Your weapon glows brightly and decapitates test
Your weapon glows brightly and decapitates test
2499/2499 100%hp 1984/1984 100%mn 2205mv 4291tnl 127626gol 0tell 0quest (Reply: Marcellous)
(Group) Mad Hermit Starky: 'I just vorpalled ! Which is 4 total vorpals this remort, and 4 since added on Dec 12th 2007!'
echo Your weapon glows brightly and decapitates test
Your weapon glows brightly and decapitates test
2499/2499 100%hp 1984/1984 100%mn 2205mv 4291tnl 127626gol 0tell 0quest (Reply: Marcellous)
(Group) Mad Hermit Starky: 'I just vorpalled ! Which is 4 total vorpals this remort, and 4 since added on Dec 12th 2007!'
PS: as a side note thanks in advance but Im going to bed here soon and leave on vacation later today so I most likely wont be able to post with feedback on how this worked or not for about a week.