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
➜ Health and Experience and Bars, oh my!
Health and Experience and Bars, oh my!
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1
2
3
4
Posted by
| Twisol
USA (2,257 posts) Bio
|
Date
| Reply #45 on Tue 01 Mar 2011 06:44 AM (UTC) |
Message
|
Caelen said: I'm not sure what you're asking for... what I pasted above included the command (hp and hpp respectively), the output from the game (the line with HP quantity and HP %), and then what was printed by the debugg scripts.
Oh, heh. I must be more tired than I thought. |
'Soludra' on Achaea
Blog: http://jonathan.com/
GitHub: http://github.com/Twisol | Top |
|
Posted by
| Caelen
(81 posts) Bio
|
Date
| Reply #46 on Tue 01 Mar 2011 06:50 AM (UTC) |
Message
|
Twisol said:
Oh, heh. I must be more tired than I thought.
I broke it down for ya in an edit :x | Top |
|
Posted by
| Caelen
(81 posts) Bio
|
Date
| Reply #47 on Tue 01 Mar 2011 07:04 AM (UTC) |
Message
| hp
HP:246/306 SP:33/238 EP:113/155
>
hpp
HP:80% SP:13% EP:72%
HP:244/306%80 -- printed
SP:30/238%13 -- printed
EP:20/155%72 -- printed
>
printing all from the do_prompt_percent...
the HP one looks right, and the SP one too...
but the EP? O_o | Top |
|
Posted by
| Caelen
(81 posts) Bio
|
Date
| Reply #48 on Tue 01 Mar 2011 07:06 AM (UTC) |
Message
|
Caelen said:
function do_prompt_percent (name, line, wildcards)
hpp = tonumber (wildcards [1])
spp = tonumber (wildcards [2])
epp = tonumber (wildcards [3])
hp = max_hp * ( hpp / 100 )
sp = max_sp * ( spp / 100 )
ep = max_ep * ( spp / 100 )
print ("HP:" .. hp .. "/" .. max_hp .. "%" .. hpp)
print ("SP:" .. sp .. "/" .. max_sp .. "%" .. spp)
print ("EP:" .. ep .. "/" .. max_ep .. "%" .. epp)
draw_the_bars ()
end -- do_prompt_percent
...
I found the problem XD
ep = max_ep * ( spp / 100 )
spp, not epp... fixed! | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #49 on Tue 01 Mar 2011 07:34 AM (UTC) |
Message
| So the debugging prints helped, huh?
That's what usually happens to me. I'm not trying to be smart, I make lots of mistakes. But debugging techniques help find them. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Twisol
USA (2,257 posts) Bio
|
Date
| Reply #50 on Tue 01 Mar 2011 07:39 AM (UTC) |
Message
| D'oh! :D |
'Soludra' on Achaea
Blog: http://jonathan.com/
GitHub: http://github.com/Twisol | 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.
128,279 views.
This is page 4, subject is 4 pages long:
1
2
3
4
It is now over 60 days since the last post. This thread is closed.
Refresh page
top