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 ➜ Plugin to show an experience bar

Plugin to show an experience bar

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


Pages: 1  2  3 

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #30 on Thu 10 Feb 2011 08:04 PM (UTC)
Message
So %X is xp_to_level?

And if you were at level 2, and levelled at 10000 XP, and had 9000 XP, then it would show:


9000/1000


Because you have 1000 to go?

It seems to me then that max_xp = 5000, because we are always trying to get to 5000. And current_xp is 5000 minus the wildcard (eg. 5000 - 1000 = 4000). Thus we now get:

4000/5000



function do_prompt (name, line, wildcards, styles)

  current_xp = 5000 - tonumber ((string.gsub (wildcards [5], ",", "")))
  max_xp = 5000
  
  draw_bar ()
  
end -- do_prompt


If that doesn't work throw in a print statement or two to see what the figures are.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Aurion   (6 posts)  Bio
Date Reply #31 on Sat 12 Feb 2011 08:36 PM (UTC)
Message
Ok, I believe that would work but your Health Bar plugin and this plugin do not have the same default prompt. How could I change the prompt for the XP plugin to be "<%h/%H hp %m/%M m %v/%V mv %x/%X xp>" ?
Top

Posted by Renox Dashin   (17 posts)  Bio
Date Reply #32 on Wed 01 Jun 2011 05:31 PM (UTC)
Message
okay so here goes :P
if it is a number that goes downward. such as on my prompt, it was 5678 tnl and i killed something and it goes down. Can I set up the reverse? where its full and as the number gets smaller so does the bar?
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #33 on Wed 01 Jun 2011 10:22 PM (UTC)
Message
Well we still need to know the maximum right? Because it has to be 5678 out of <something>. Once you know that it is easy.

Let's say the maximum is 10000. If you have 5678 to next level, then you have done 4322. So normally I would supply 4322 (that is, the maximum minus the current), and 10000, so the bar shows you as 43.22 percent done.

But you could just not subtract, so it would show 5678/10000 and then get lower and lower.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Renox Dashin   (17 posts)  Bio
Date Reply #34 on Wed 01 Jun 2011 10:28 PM (UTC)
Message
theres no way to convert it to a % as the number gets lower, the bar gets higher? We don't have the max exp shown on our MUD it only shows how much you have to go till the next lvl :(
Top

Posted by Renox Dashin   (17 posts)  Bio
Date Reply #35 on Wed 01 Jun 2011 10:28 PM (UTC)
Message
I really appreciate your help Nick. Its like getting help from a MUD celebrity lol. The creator of Mushclient :P
Top

Posted by Butlerreuben   (1 post)  Bio
Date Reply #36 on Sat 27 Apr 2013 11:51 PM (UTC)
Message
Im trying to configure this addon for 3kingdoms.

I do not have xp on the bar it comes from typing XP and then I get this:

You have 14,725,973 total xp.
You need 49,027 experience to achieve your next level.
You have 1,975,973 to spend.

XP Gain for the last 30 minutes: 61,605
At this rate you will level in 23 minutes

I seem to be having tons of issues in regards to adapting plugins to this MUD.

I even tried adapting the autohealer and failed.
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.


130,190 views.

This is page 3, subject is 3 pages long:  [Previous page]  1  2  3 

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.