Unknown2007-09-04 05:44:46
I'm doing a lot of ratting right now...yes I know I asked myself why too.
Anyways, I was wondering if someone could help me make a rat counter script for Lua in MushClient please. Would be greatly appreciated.
Anyways, I was wondering if someone could help me make a rat counter script for Lua in MushClient please. Would be greatly appreciated.
Arundor2007-09-04 05:56:07
You can pretty much do this with a single trigger and alias.
    match="^You have slain(.+)rat"
    enabled="y"
    regexp="y"
    send_to="12"
    sequence="100"
    >
   Â
        SetVariable("rats", GetVariable("rats") + 1)
   Â
    match="rats"
    enabled="y"
    send_to="12"
    sequence="100"
    >
   Â
        Note("You have slain " .. GetVariable("rats") .. " rats."
   Â
CODE
    enabled="y"
    regexp="y"
    send_to="12"
    sequence="100"
    >
   Â
        SetVariable("rats", GetVariable("rats") + 1)
   Â
    enabled="y"
    send_to="12"
    sequence="100"
    >
   Â
        Note("You have slain " .. GetVariable("rats") .. " rats."
   Â
Unknown2007-09-04 06:24:16
Error number: 0
Event: Compile error
Description: :1: ')' expected near ''
Called by: Immediate execution
I got that message after putting the stuff in and hit rats to test it. What does it mean and how do I fix it?
Event: Compile error
Description: :1: ')' expected near '
Called by: Immediate execution
I got that message after putting the stuff in and hit rats to test it. What does it mean and how do I fix it?
Arundor2007-09-04 06:46:21
Meh, my fault for not testing. Sorry. Try this.
    enabled="y"
    match="^You have slain(.+)rat"
    regexp="y"
    send_to="12"
    sequence="100"
    >
   Â
    if (GetVariable("rats") ~= nil) then
        SetVariable("rats", GetVariable("rats") + 1)
    else
        SetVariable("rats", "1")
    end
   Â
    match="rats"
    enabled="y"
    send_to="12"
    sequence="100"
    >
   Â
    if (GetVariable("rats") ~= nil) then
        Note("You have slain " .. GetVariable("rats") .. " rats.")
    else
        Note("You have slain 0 rats.")
    end
   Â
CODE
    match="^You have slain(.+)rat"
    regexp="y"
    send_to="12"
    sequence="100"
    >
   Â
    if (GetVariable("rats") ~= nil) then
        SetVariable("rats", GetVariable("rats") + 1)
    else
        SetVariable("rats", "1")
    end
   Â
    enabled="y"
    send_to="12"
    sequence="100"
    >
   Â
    if (GetVariable("rats") ~= nil) then
        Note("You have slain " .. GetVariable("rats") .. " rats.")
    else
        Note("You have slain 0 rats.")
    end
   Â
Unknown2007-09-14 03:01:48
I use VBscript in mush. How could I do the same thing? It'd be a Kephera counter, though. Any help would be appreciated
Arundor2007-09-14 03:25:55
I am not familiar with VBscript. However, you can use Lua and VBscript at the same time with MUSHClient's plugin system.
Try the attached plugin. It is modified to count kephera simply by changing all instances of the word "rat" to "kephera", and as a plugin it should work alongside any other scripts in other languages you may have.
Type 'kephera' to get your kephera kill count.
Try the attached plugin. It is modified to count kephera simply by changing all instances of the word "rat" to "kephera", and as a plugin it should work alongside any other scripts in other languages you may have.
Type 'kephera' to get your kephera kill count.
Unknown2007-09-14 05:44:43
Thanks man. Works like a charm.
Much <3
Much <3