|
rikard_grankvist Newbie
Joined: 01 Aug 2005 Posts: 1
|
Posted: Mon Aug 01, 2005 11:00 pm
Implementation of third-party scripting languages |
Hi, I don't MUD much myself, and have never used zMud. However, a mudding friend of mine has asked me to write a few scripts for him. Looking around this website, I see that zMud advertises that you can use Microsoft VBScript for scripting, and I would like to do that, rather than having to learn the zMud scripting language. I'm just wondering if somebody would give me a few tips and pointers on how the VBScripts are implemented in zMud. I will of course look into it myself, but I would gladly appreciate a friendly nudge in the right direction... :)
Cheers,
/R |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Aug 05, 2005 5:53 pm |
When you create a script in zMUD (for a trigger, alias, macro, etc) there is a tab called "MSScript" for using the Microsoft scripting engine. Click that and you'll see a pulldown to select the scripting language. Set this to VBScript. Then just write your script in the window.
To access zMUD commands and functions from a VBScript you will need to use the zMUD COM language. This is defined in the Support/zMUD Support section of the web site in the "Using zMUD as a COM Server" article. The zMUD COM object as well as the current session COM object are already added to the VBScript namespace. So you should be able to use any of those COM properties and methods directly in your script.
However, keep in mind that for most MUD tasks, the zMUD scripting language has been optimized for this task, whereas the VBScript engine is not. So in many situations your zMUD script will be more efficient. But if you have a long script, the parsing in the Microsoft Scripting engine is faster than the zMUD parser, so longer scripts might be faster. It's just a trade off that you'll need to play with (which is why zMUD lets you do both) |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|