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.
Entire forum
➜ MUSHclient
➜ Suggestions
➜ Editable "plugin preferences"
Editable "plugin preferences"
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Cernunnos
Poland (3 posts) Bio
|
Date
| Thu 06 Jan 2005 02:30 PM (UTC) |
Message
| Hello everyone.
There is one thing I'd really like to have in MUSHclient - an ability to define my own "plugin preferences".
Now let me explain on an example.
I wrote a plugin which is logging current quests and displays its targets on infobar. This plugin checks if the character name said by the questmaster matches the name of my character (stored in a variable in a plugin) so that it won't catch some other guys quest. Now for every character I own I need different (but really the same) plugin with different charname in its variable. I know that I could create a variable in my character profile and refer to that but that's not very portable (I'm planning to release this plugin for other players of my mud). So an ability to change such things from the plugin preferences page would be nice. It could be some kind of flag added to certain variables in a plugin thet "marks" them as editable from plugin prefs. And additional it would be nice to have some simple boolean variables available as checkboxes to customise (a different flag, variables has to be '0' or '1' or truth of false or whatever).
And a button on plugin preferences displaying only for those plugins that have them (so maybe another flag on plugin details).
Now how about that? ;) | Top |
|
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Reply #1 on Thu 06 Jan 2005 06:50 PM (UTC) |
Message
| Hmm, that IS useful, although I just use aliases, like Plugin:SetName <name>... |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #2 on Thu 06 Jan 2005 07:53 PM (UTC) Amended on Thu 06 Jan 2005 07:55 PM (UTC) by Flannel
|
Message
| Or use entities. And then give a nice helpful note on install that tells them what they need to do to tweak the plugin to their own character.
Or, you could have a trigger that matches on whatever score screen if it contains their name, and set that to a variable.
Or if you knew their client was set to autoconnect, you could use GetInfo (or GetLoadedValue, or GetAlphaOption) and get their character name. You could even prompt them to ask if it was correct (or have them confirm/edit) by sending your alias (Plugin:SetName <namefound>) to the command line, so all they would have to do is hit enter. And if there was no name in the auto-connect, that would be their opportunity to enter it. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Cernunnos
Poland (3 posts) Bio
|
Date
| Reply #3 on Fri 07 Jan 2005 12:15 AM (UTC) |
Message
| Well, yes Flannels solution could work for me if mud was in english but I'm from Poland, mud is in polish and our language is not that simple. I don't know even how to explain that in english but my dictionary says it is called declension ;)
Basically it means that charname said by questmaster is little different from the one in autoconnect, so it will not work without users input. | Top |
|
Posted by
| Nick Gammon
Australia (23,120 posts) Bio
Forum Administrator |
Date
| Reply #4 on Fri 07 Jan 2005 05:34 AM (UTC) |
Message
|
Quote:
Now for every character I own I need different (but really the same) plugin with different charname in its variable.
The whole idea of plugins "saving state" is to handle that. The plugin saves data relevant to itself and the current world which is saved in a "state" file for that plugin/world combination. If you have multiple characters (presumably in multiple worlds) then each one will have its own state, and thus you can save the character name there.
All the plugin has to do is prompt the player to enter the name, which the plugin can catch as an alias. Something like this:
if GetVariable ("charname") == "" then
Note ("Please enter: charname <your name>")
end -- if
Then make an alias "charname *" to accept the character name, and save it to a variable.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Cernunnos
Poland (3 posts) Bio
|
Date
| Reply #5 on Fri 07 Jan 2005 03:44 PM (UTC) |
Message
| Hmmm, good point. I guess I'll do it that way.
Thanks for help everyone. | 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.
16,476 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top