[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Plugins
. . -> [Subject]  Plugins for Aardwolf MUD
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Plugins for Aardwolf MUD
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please)
Maximum of 6000 characters. Text only please, no HTML.
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Pages: 1  2 3  

Posted by Nick Gammon   Australia  (19,616 posts)  [Biography] bio   Forum Administrator
Date Tue 20 Sep 2011 11:26 PM (UTC)  quote  ]
Message
I didn't write this so it is hard to know exactly what is going on. From what I can see, @clevel is not set (that is, the variable "clevel" does not exist).

This sets it (amongst other things):


 <trigger
   group="FingerInfo"
   match="^Level (\d+) (none|male|female) .* \(Tier (\d)\)\.$"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>world.setvariable "clevel", "%1"
world.setvariable "tiers", "%3"
world.setvariable "alevel", (%1 + (%3 * 10))</send>
  </trigger>


So if you can get that processed it might work.

Maybe add:


 SetVariable "clevel", "1"


to inside lvlsetup, and then type "lvlsetup" again.

eg. here:


world.EnableTriggerGroup "FingerInfo", True
world.setvariable "Classes", "1"
world.send "finger"
end if

 SetVariable "clevel", "1"

</send>


Maybe ditto for "tiers" and "classes".

Sorry, it is hard to debug something written 5 years ago, by someone else, for a MUD I don't play frequently, in a language I don't use very often.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by DaemonChilde   (3 posts)  [Biography] bio
Date Tue 20 Sep 2011 07:37 PM (UTC)  quote  ]
Message
Nothing I guess? :(
[Go to top] top

Posted by DaemonChilde   (3 posts)  [Biography] bio
Date Mon 12 Sep 2011 03:37 AM (UTC)  quote  ]
Message
Nick Gammon said:

Can you post the whole thing? It is hard to debug out of context.
I can't since I can't post large scripts (can't even quote them apparently)
On the 1st page the, the LevelTracker is it.
<!-- Plugin "LevelTracker" generated by Plugin Wizard -->
[Go to top] top

Posted by Nick Gammon   Australia  (19,616 posts)  [Biography] bio   Forum Administrator
Date Sat 10 Sep 2011 01:21 AM (UTC)  quote  ]
Message
Can you post the whole thing? It is hard to debug out of context.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by DaemonChilde   (3 posts)  [Biography] bio
Date Fri 09 Sep 2011 02:38 AM (UTC)  quote  ]

Amended on Fri 09 Sep 2011 02:41 AM (UTC) by DaemonChilde

Message
Bevern said:

Sorry to bump an extremely old thread but I'm having problems with the leveltracker plugin. When I run lvlsetup I get the error message:

Script error
Plugin: LevelTracker (called from world: Aardwolf)
Execution of line 6 column 98
Immediate execution
Syntax error
Line in error:
world.ansinote ansi(32) & ansi(1) & "Total levels gained: " & ansi(36) & ansi(1) & ((5 - 2) + ( * 1393) + ((1 - 1) * 199)) & ansi(33) & ansi(1) & " (" & ansi(32) & (13930 - ((5 - 2) + ( * 1393) + ((1 - 1) * 199))) & " to go!" & ansi(33) & ansi(1) & ")"

Near as I can tell its a problem with the variable @clevel but I'm not sure how to fix it. Any ideas?
Guess I'm bumping it even older...
I'm brand new to mushclient and I have the same problem.
The part of the code itself looks like this
(i hope this parses correctly)

if "@clevel" = "201" then
 world.ansinote ansi(32) &amp; ansi(1) &amp; "Total levels gained: " &amp; ansi(36) &amp; ansi(1) &amp; ((@clevel - 2) + (@tiers * 1393) + ((@classes - 1) * 199))  &amp; ansi(33) &amp; ansi(1) &amp; " (" &amp; ansi(32) &amp; (13930 - ((@clevel - 2) + (@tiers * 1393) + ((@classes - 1) * 199))) &amp; " to go!" &amp; ansi(33) &amp; ansi(1) &amp; ")"
else
 world.ansinote ansi(32) &amp; ansi(1) &amp; "Total levels gained: " &amp; ansi(36) &amp; ansi(1) &amp; ((@clevel - 1) + (@tiers * 1393) + ((@classes - 1) * 199))  &amp; ansi(33) &amp; ansi(1) &amp; " (" &amp; ansi(32) &amp; (13930 - ((@clevel - 1) + (@tiers * 1393) + ((@classes - 1) * 199))) &amp; " to go!" &amp; ansi(33) &amp; ansi(1) &amp; ")"
end if


the error happens as soon as lvlsetup tries to send the "finger" command and continues to happen even when you type it manually.
I wonder if the problem is because the script language is VBscript rather than Lua?

EDIT: Guess it being VBscript has nothing to do with it. I changed the setting to use VBscript, installed the script, ran it and had the same error.
[Go to top] top

Posted by Chicomecoatl   USA  (25 posts)  [Biography] bio
Date Sun 10 May 2009 07:14 AM (UTC)  quote  ]
Message
One other thing i forgot to mention:

This will also trigger during battle, to prevent this if you don't like it simply turn of savetell function.
[Go to top] top

Posted by Chicomecoatl   USA  (25 posts)  [Biography] bio
Date Sun 10 May 2009 07:12 AM (UTC)  quote  ]
Message
I have made a little trigger here for those who don't want to go afk but still let others know they are afk. The bonus is that it will only reply to same person once in a row. I know it isn't very complicated but i looked and looked but never found a plugin for this. So i made one for you. It also includes a sound for Vista (easily removed if not desired) to alert you when a tell is received.


The entire trigger is turned off/on by the Aardwolf 'catchtell' command.

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Sunday, May 10, 2009, 1:56 AM -->
<!-- MuClient version 4.37 -->

<!-- Plugin "AFK_message" generated by Plugin Wizard -->

<!--
The purpose of this Script is to help those who don't always like to flag themselves AFK.
Going afk, even client-side, stops spellups and thus is a hassle when you return. This script will allow you to be afk without that hassle. When someone sends you a message you will reply (with your own personal message) informing them that you are indeed afk. The bonus added is that it wont send to the same person twice in a row, thus keeping your tell history nice and tidy.
-->

<muclient>
<plugin
name="AFK_message"
author="Darkknowing"
id="38ed3b99246044ba207233fc"
language="Lua"
purpose="To alert someone you are AFK, if you don't want to actually go into AFK mode"
save_state="y"
date_written="2009-05-10 01:52:14"
requires="4.37"
version="1.0"
>

</plugin>


<!-- Get our standard constants -->

<include name="constants.lua"/>

<!-- Triggers -->

<triggers>
<trigger
enabled="y"
expand_variables="y"
match="* just sent you a tell."
send_to="12"
sequence="100"
sound="C:\WINDOWS\Media\Windows Battery Critical.wav"
>
<send>lastsent = GetVariable ("lastsent")
if lastsent == "%1" then
Note ("The same guy sent you two tells in a row")
elseif lastsent ~= "%1" then
Send ("reply @afkmessage
end
SetVariable ("Lastsent", "%1")</send>
</trigger>
</triggers>

<!-- Variables -->

<variables>
<variable name="timereturn">""</variable>
<variable name="afkmessage">""</variable>
</variables>

</muclient>


I apologize if this is shoddy workmanship, this is my very first attempt and any sort of scripting. Please send notes to Darkknowing on Aardwolf if you have any tips/suggestions.
[Go to top] top

Posted by KimW   (3 posts)  [Biography] bio
Date Thu 06 Nov 2008 12:01 PM (UTC)  quote  ]

Amended on Thu 06 Nov 2008 05:52 PM (UTC) by KimW

Message
for those of you who would like Gammon's autohunt with a few small tweeks, to make it a little faster and has the ability to open doors please use the plugin below, mind you it is a trial run (my first plugin written in Lua):

<?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 2 seconds."
date_written="2008-11-05 11:15:29"
requires="3.65"
version="1.11"
>
<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="The trail of (.*?) is confusing, but you\'re reasonably sure .* headed (.*?)\.$"
name="autohunter1"
regexp="y"
script="autohunt"
send_to="12"
sequence="100"
>
</trigger>
<trigger
enabled="n"
group="autohunter"
match="You are confident that (.*?) passed through here\, heading (.*?)\.$"
name="autohunter2"
regexp="y"
script="autohunt"
send_to="12"
sequence="100"
>
</trigger>
<trigger
enabled="n"
group="autohunter"
match="^(.*?) is (.*?) from here\.$"
name="autohunter5"
regexp="y"
script="autohunt"
send_to="12"
sequence="100"
>
</trigger>
<trigger
enabled="n"
group="autohunter"
match="^The .* is closed."
regexp="y"
script="autohuntdoor"
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)
world.SetVariable("autohuntdoors",string.lower(wildcards[2]))
Send(wildcards[2])
DoAfterSpecial(2,'Send("hunt " .. world.GetVariable("autohuntmob"))',12)
end -- autohunt

function autohuntdoor(sName,sLine,wildcards)
Send("open " .. world.GetVariable("autohuntdoors"))
end -- autohuntdoor

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>
[Go to top] top

Posted by Nick Gammon   Australia  (19,616 posts)  [Biography] bio   Forum Administrator
Date Wed 05 Nov 2008 06:19 PM (UTC)  quote  ]
Message
Lua is case-sensitive, the function is Send, not send.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by KimW   (3 posts)  [Biography] bio
Date Wed 05 Nov 2008 05:15 PM (UTC)  quote  ]
Message
Opening doors still not working :(
- added this triger
<trigger
enabled="n"
group="autohunter"
match="^The door is closed."
regexp="y"
script="autohuntdoor"
send_to="12"
sequence="100"
>

- and changed autohunt function to this
function autohunt(sName,sLine,wildcards)
world.SetVariable("autohuntdoors",string.lower(wildcards[2]))
Send(wildcards[2])
DoAfterSpecial(3,'Send("hunt " .. world.GetVariable("autohuntmob"))',12)
end -- autohunt

- and added this new function
function autohuntdoor(sName,sLine,wildcards)
send("open " .. world.GetVariable("autohuntdoors"))
end -- autohuntdoor

When i try to use it i get
Run-time error
Plugin: Aardwolf_AutohunterLUA (called from world: Aardwolf)
Function/Sub: autohuntdoor called by trigger
Reason: processing trigger ""
[string "Plugin"]:163: attempt to call global 'send' (a nil value)
stack traceback:
[string "Plugin"]:163: in function <[string "Plugin"]:162>
Error context in script:
163*: send("open " .. world.GetVariable("autohuntdoors"))
- this line is in the autohuntdoor function

Anybody have any ideas why this does not work?

Thank you for your time and effort.
Regards,
ME
[Go to top] top

Posted by KimW   (3 posts)  [Biography] bio
Date Wed 05 Nov 2008 12:42 PM (UTC)  quote  ]

Amended on Wed 05 Nov 2008 07:47 PM (UTC) by KimW

Message
Hello all,
I am new to MushClient and I am trying to fix the auto hunt script becuase the trigger for hunting has changed. Here are two examples.
"The trail of A Zombied Thief is confusing, but you're reasonably sure he headed west."
"The trail of Questor is confusing, but you're reasonably sure it headed down."
the match i am trying to create looks like this so far, mind you I have never coded in lua so something is missing.
match="The trail of (.*?) is confusing, but you\'re reasonably sure * headed (.*?)\.$"
I understand the (.*?) is for the two variables but how do I basiclly ignore text, in zmud all i have to use is * but that is not working for me.
any help would be appreciated.
My next project is to get autohunter to open doors. If anybody has some good ideas how to get that started let me know as well.
Thank you for your time and effort.
regards,
Me

PS. figured out i need to use .* so now I am going to work on how to make it open doors, any ideas?

Looks like as you go up in hunting ability you get new sayings so here are the first two, i will post the rest as they come:
1) match="The trail of (.*?) is confusing, but you\'re reasonably sure .* headed (.*?)\.$"
2) match="You are confident that (.*?) passed through here\, heading (.*?)\.$"
[Go to top] top

Posted by Nick Gammon   Australia  (19,616 posts)  [Biography] bio   Forum Administrator
Date Fri 01 Aug 2008 01:10 AM (UTC)  quote  ]
Message
See this new thread:

http://www.gammon.com.au/forum/?id=8834

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Laviunt   (3 posts)  [Biography] bio
Date Thu 31 Jul 2008 09:54 AM (UTC)  quote  ]
Message
Ok I'm still very new to mush and very used to zmud.
I wonder if there is a nice handy speedwalk plugin that would allow me to enter//edit speedwalks much like zmud/cmud does.

Aardwolf uses it's own inbuilt run command which is very handy. Thought every time i try to run to a new area I press ctrl+s to get my speedwalk window open and choose which area to run to... obviously this doesn't work. :P

Anyone mind pointing me to a simple plugin or perhaps even write one? Because im more and more walking away from zmud to mush. :)

Lavi.
[Go to top] top

Posted by Nick Gammon   Australia  (19,616 posts)  [Biography] bio   Forum Administrator
Date Wed 30 Jul 2008 05:47 AM (UTC)  quote  ]
Message
Also try going to the Game menu and turning on Trace - that shows which triggers, aliases, etc. have fired.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (19,616 posts)  [Biography] bio   Forum Administrator
Date Wed 30 Jul 2008 05:46 AM (UTC)  quote  ]
Message
If scripting is enabled, and you make "/" the scripting prefix on the script configuration page, try typing:


/Debug "plugins"


That might show what you need to know.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


46,135 views.

This is page 2, subject is 3 pages long:  [Previous page]  1  2 3  [Next page]

It is now over 60 days since the last post. This thread is closed.   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Web site powered by FutureQuest.Net]