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
➜ MXP and Pueblo
➜ infobars not updating when receiving mxp vars
infobars not updating when receiving mxp vars
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Hawgpadre
(5 posts) Bio
|
Date
| Sat 10 Mar 2012 06:54 AM (UTC) Amended on Sat 10 Mar 2012 06:55 AM (UTC) by Hawgpadre
|
Message
| I'm sure I'm doing something wrong. The world properties show the MXP vars are updating correctly, so I think maybe the WatchValue call is wrong? Or the way I'm making a local copy of the variable in OnMXPVariable? Not sure as I can't find much info on it. Any help would be appreciated!
<!-- Script -->
<script>
require "InfoBox"
require "wait"
-- PLUGIN GLOBALS
statusbar = InfoBox:New("Menu")
statusbar.window_width = 200
statusbar:Columns(1)
statusbar:Rows(3)
mxp_health=0
mxp_credits = 0
hpbar = statusbar:AddBar("Health", 80, "green")
hpbar.padding = 4
hpbar.threshold = 100
hpbar:WatchValue("mxp_health")
cashbar = statusbar:AddBar("Credits", 80, "green")
cashbar.padding = 4
cashbar:WatchValue("mxp_credits")
cashbar.threshold = 100
statusbar.windowposition = InfoBox.windowPositions.SE
-- Do on connect thing
function OnPluginDisconnect ()
end --function
function OnPluginConnect ()
-- show windows
statusbar:Update();
-- bind keys
end -- function
-- Updates the info bar
function OnMXPvariable(key, value)
SetVariable(key, value)
hpbar:Update()
cashbar:Update()
statusbar:Update()
end -- function
-- ... unrelated code
</script>
| 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.
9,582 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top