Register forum user name Search FAQ

Gammon Forum

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 ➜ Level Timer

Level Timer

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Sun 10 Aug 2003 09:44 PM (UTC)
Message
This plugin displays how long it takes you to level.

Just install it and it will do its stuff. You probably need to change the "level" message (4th line) to correspond to what you see from your MUD when you level. Add wildcards (asterisks) where variable information might appear. For instance, if you see something like:


You gain 234 experience points. You are now level 23.


Then the level message would be:


You gain * experience points. You are now level *.


You can copy the level timer from this page, or download it from:


http://www.gammon.com.au/mushclient/plugins/




<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE muclient[ <!ENTITY trigger_match "*You raised a level!" > ]> <!-- Saved on Monday, August 11, 2003, 7:34 AM --> <!-- MuClient version 3.42 --> <!-- Plugin "Level_Timer" generated by Plugin Wizard --> <!-- Change the entity above to reflect the message you get when you level. --> <muclient> <plugin name="Level_Timer" author="Nick Gammon" id="5f4928cc5f9e2306d3b0a361" language="VBscript" purpose="Displays how long it take you to level" save_state="y" date_written="2003-08-11 07:32:28" requires="3.24" version="1.0" > <description trim="y"> <![CDATA[ When installed, this plugin will display how long it takes you to level. ]]> </description> </plugin> <!-- Triggers --> <triggers> <trigger custom_colour="7" enabled="y" match="&trigger_match;" script="OnLevel" sequence="100" other_text_colour="black" other_back_colour="black" > </trigger> </triggers> <!-- Script --> <script> <![CDATA[ sub OnLevel (name, line, wildcards) dim oldtime dim newtime dim days, hours, minutes dim s1, s2, s3 dim msg oldtime = GetVariable ("last_level_time") ' ' First time - just remember when we levelled ' if IsEmpty (oldtime) or not IsDate (oldtime) then SetVariable "last_level_time", now Note "Level time noted." exit sub end if ' ' Find total minutes it took to level ' minutes = DateDiff ("n", CDate (oldtime), Now) ' ' Convert to days, hours, minutes ' days = Fix (minutes / 1440) minutes = minutes - (days * 1440) ' remainder hours = Fix (minutes / 60) minutes = minutes - (hours * 60) ' remainder ' ' Add "s" if plural ' s1 = "s" s2 = "s" s3 = "s" if days = 1 then s1 = "" if hours = 1 then s2 = "" if minutes = 1 then s3 = "" ' ' Make message ' msg = "Time to level = " _ & days & " day" & s1 & ", " _ & hours & " hour" & s2 & ", " _ & minutes & " minute" & s3 & "." ColourNote "white", "blue", msg SetVariable "last_level_time", now end sub ]]> </script> </muclient>

- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


8,140 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.