From Discworld MUD Wiki
Jump to: navigation, search


I'm no longer active as an admin here, or especially active on the MUD.

MajorTimer upgrade

My upgraded version of Garrion's MajorTimer plugin: User:Ilde/MajorTimer

Post I made on Priests board about it:

Greetings! I've upgraded Garrion's MajorTimer plugin. Briefly, the new version is more accurate (as long as it knows your correct bonus), is capable of pausing the timer while you're logged off, and can deal with multiple characters.

This is more or less priests-only, since it won't work properly if you perform from a baton. This is because the performing-from-a-baton penalty varies, a lot, and I haven't figured out how it works or how to properly account for it (it seems that it can, but doesn't necessarily, vary depending on whether your hands are full. I don't even know what to do with that). You can still use it; it's just that the duration will likely be off unless you figure out what rod penalty you get and customize it.[0]

If you install the plugin while you're logged on, you should then use the mtchar ("mtchar yourcharactername") command to tell it what character you're logged on as. You only need to do this once.

New stuff:
*Duration is now much more accurate, using a new and better formula[1], and takes ritual bonuses and penalties into account. (It may still be a few seconds off per performance, though, since the close to/far from altar bonus and penalty vary in a way it can't detect. Lag can also mess with duration.)
*It saves the amount of time you had left on a shield when you logged off, and restores it when you log back on to that character. So, logging off with a shield up won't mess it up.
*It saves bonus info (and remaining time) on a per character basis.
*It can update itself from the output of the "shields" command (although only if you actually have a Major shield up or no arcane shielding at all). E.g. if "shields" says you will be protected for at least two days, meaning you have between 48 and 72 hours' worth of shielding, and the plugin thinks you have an amount of shielding outside that range, it will update so that it's inside the range (while being as close to what it thought you had before as possible: if it thought you had 80 hours, it'll reduce the time left to just under 72 hours, whereas if it thought you had 32 hours, it'll increase the time left to 48 hours). This is obviously only as precise as the ranges themselves, but it should be nice if you already have a large amount stacked up and don't want to multiply up the minutes.

Optional new stuff:
*There's a new command, mtclear, which clears the timer just as if it had seen the shield expire.
*There's another new command, mtaddone, which adds one performance's worth of shielding to the timer.
*You can have it update your bonus from skills output. This only works if you have skills output in list mode, however.[2] This is off by default to stop it from setting itself from stuff in people's finger info.
*You can set a verbose mode, which makes it show a message when it detects your character name, when it detects your bonus (also showing the base duration for that bonus), when it detects ritual modifiers (also showing your "effective bonus"), and when it adds a performance's worth of shielding (showing how many seconds were added). This is off by default, so unless you specifically turn this on it won't suddenly be extra-spammy.
*You can make it able to detect your character from whoami output. This shouldn't normally be necessary, since it detects your character name when you log in or su, *and* you can manually set it with mtchar, but I found it convenient to use during testing and have left it in. This is also off by default, since it can wrongly detect things in people's finger info as whoami output (and possibly even unrelated messages with the same format, although I did prevent that with as many as I could find).

It should be possible to just use it the same way as version 2.1, if you don't want to mess with the new commands. All the old commands still work, and help majortimer shows the (updated) help file.

It will still get confused (that is, add the wrong duration) if you use Minor Shield[3] or if someone else performs Major Shield on you (unless that person happens to have the same bonus as you!). It can also miss getting your character name if you log in too quickly (i.e. send your name before it actually sees the line saying to enter your name), which is why you can set your character manually with mtchar <name>.

I gave it a different id than the old version, so it can be used alongside it if you like. There's probably no reason to do this, but it was handy for testing and I left it in.

So, here it is:
(It's also here. )

To use:
*Copy and paste into a text editor, then save as an xml file in MUSHclient's plugins folder. If you don't know where that is, it's probably C:\Program Files\MUSHclient\worlds\plugins
*Make sure there's also a "state" folder in the plugins folder. Settings and so on are saved in a file in that folder.
*When you close MUSHclient (every time), it'll ask you if you want to save. It doesn't seem to matter what you pick. I don't know why it does this, but it was such a pain getting it to save things at all that I don't want to mess with it now.

If you find any bugs,[4] you can leave a note on the talk page (or mudmail me). Ditto for suggestions (no promises that I'll actually implement them, though). I've been using it with MUSHclient version 4.43, and it seems stable (I'm honestly not sure what version is actually *required*, though). If you want to make your own version based on it, use bits of it in another plugin, etc., go ahead.

[0]You're on your own for figuring out what to set it to, but the relevant lines are 693 and 694: change each "56" to however much your effective bonus is actually reduced by.
[1]As seen here: It's been tested for bonuses up to 489. (Special thanks go to Yukk for providing a large amount of the duration data, without which this would not have been possible!)
[2]I might be able to make it work for branched mode, too, if someone can explain how to do a multi-line trigger and have it actually work.
[3]It has a different bonus-to-duration conversion formula, which is not built into the plugin because I haven't figured out what it is. And also because there's no way to distinguish between the two in instances where there aren't any ritual bonuses or penalties.
[4]I already know about the one where if you quit with a shield up, and then close MUSHclient (but not if you quit, leave the client open, then reconnect later), it will inexplicably count the time between quitting and closing the client. I just don't know how to fix it.



Still to do:

  • Rivers:
    • River Djel
    • River Tsort
    • River Smarl
    • River Ankh
    • River Istanzia
    • Chimeria River
    • Koom River?
    • Any other named rivers
    • Any other unnamed rivers
    • Figure out which rivers are different
  • Empty swamp around Koom Valley
  • Roads

What about city terrains?

  • Parks in AM
  • Tuna Bay, Tang Bay, Fang lake, river through BP


Pre-formatted text. <code>
 line 2
 line 3

new thing outside of pre



Not just redirects:

You sense that Sek does not want you to have insects. (Creeping Doom failure)

Sek does not heed your call. (Holy Weapon failure)




  1. This is how you do a footnote.