Try looking at my YouTube video about making plugins:
http://www.youtube.com/watch?v=wITS3hw1Ynk
You can in fact read the main world's variables but you are better off making the plugin self-contained, as Blainer said. If you establish a "target" variable inside the plugin, that same plugin can refer to it. Just don't try to refer to the main world's target variable.
Amended on Fri 13 Nov 2009 12:42 AM (UTC) by Blainer
Message
Not sure of the way to get a world variable from a plugin but I never do that. Nick made plugins to not interfere with each other. If I make a plugin with a variable named target and you install it it would override your world variable target.
I have a plugin that uses the world's target variable (or any variable you set) I use Execute to send stuff to the MUD. Then in the world I have an alias that catch's the command and sends it to the MUD with the target variable. Execute from a pluign forces the command to be tested against all the world files aliases just like a command entered from the command line.
So the plugin can do all the processing of which attack command is needed and then execute it. The attack_alias in the world file catches it and sends the attack command and the contents of the target variable to the MUD.
For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.
First off, I need to make the warning that I'm pretty much lost when it comes to Mushclient coding (except for simplistic stuff).
That said, I'm trying to make some plugins that will contain various aliases/triggers. All's well and good, but I cannot figure out how to make the plugin items recognize and otherwise manipulate my world variables.
For example, I have a world variable called target.
A plugin alias that should do "bite @target"
But so far, I can't make it see the variable I already have, and I keep hitting a "Variable 'target' is not defined" error.
Basically, I'd just want to know what I need to make my plugin triggers/aliases interact with variables I create in the world. (Use them, change them, etc.)
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.