Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Plugins
➜ How-To?
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| PJ
USA (48 posts) Bio
|
| Date
| Tue 21 Jan 2003 02:59 AM (UTC) |
| Message
| | There a Plugin How To site? If there isn't could you briefly describe "exactly" what to do for a basic plugin that includes Scripts, Aliases, and Triggers? | | Top |
|
| Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Tue 21 Jan 2003 04:06 AM (UTC) |
| Message
| There isn't much to it. Make and test your scripts, aliases and triggers using the normal GUI interface, and then when it is working use the Plugin Wizard to copy them into a plugin file. This removes them from your main world to avoid duplication.
You get to choose which triggers, aliases etc. are moved to the plugin, and can edit the script to remove stuff that isn't relevant to the plugin.
If you are using script calls that rely on the plugin being a plugin you might have to do most of it in the GUI and then tidy it up by editing the plugin file once it has been produced. However most simple plugins can be done that way.
If you aren't sure, try a simple one to start with, backing up your world file before you start, in case you want to redo it.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Ked
Russia (524 posts) Bio
|
| Date
| Reply #2 on Tue 21 Jan 2003 05:12 AM (UTC) |
| Message
| I've wondered about the same thing, Monkey. Arrived at the same answer that Nick gave you already - not much to put on website.
Personally I prefer to write plugins from scratch (in a text file) and then just remove whatever I use from the world file. For some reason I feel much safer when doing it that way :)
If you want to learn how to write a plugin, then there's an easy way to learn how to do it.
1. Look through the sample plugin's text. It is included in the recent versions of MC. Check the syntaxt and marvel at its simplicity. Carefully read the instructions, especially the part about the 'id' attribute.
2. Start writing plugins. When you don't know the exact syntax for something (like a timer), check step 3...
3. Open a world file (.mcl) in a text editor. search for a component you want (e.g. a timer) and check the syntax.
That's how I do it and it has never failed me so far.
Disclaimer: My not using MC's Plugin Wizard has nothing to do with any functional specifics of the said Wizard - in fact I've never used it, so how would I know about any of its specifics? It is explained by my strange fear of anything that requires me to press buttons and results in textual output. For exactly the same reason I never use HTML editors :P | | Top |
|
| Posted by
| PJ
USA (48 posts) Bio
|
| Date
| Reply #3 on Tue 21 Jan 2003 05:28 AM (UTC) |
| Message
| | That'd be why, I never searched through the menu bars enough to notice a plugin wizard.. Lol, thanks Nick, thanks Ked for alternative.. | | Top |
|
| Posted by
| Shadowfyr
USA (1,791 posts) Bio
|
| Date
| Reply #4 on Tue 21 Jan 2003 08:09 AM (UTC) |
| Message
| | I tend to agree Ked. Punching buttons is good only when you can tell what it is doing. lol In my case I created a plugin to handle something I didn't want in my main script using the wizard and lost about 20 triggers that where auto-deleted when the plugin was generated. My main world handled the messaging, but the new plugin used the same triggers to handle generation of a custom generated status display. Was a major 'woops!'. lol Needless to say you have to be quite sure that you know what removing a trigger or alias from the main world is going to effect before doing it that way. Coding from scratch is safer and helps anyway, since you learn how to properly code one for when you end up needing to edit or add something to it. ;) | | Top |
|
| Posted by
| Poromenos
Greece (1,037 posts) Bio
|
| Date
| Reply #5 on Wed 22 Jan 2003 11:11 AM (UTC) |
| Message
| | Actually, shadowfyr, that is VERY easily fixed, as you can paste the triggers you want from the plugin into mushclient by copying and hitting the "paste" button... just don't forget to add <triggers> and </triggers> |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | | 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.
21,761 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top