Currently playing bard so I got about 10 protections i want to keep track off, first i thought i'd do it in the statusbar nick did but i couldn't figure any good way to update it. So this is what i need help with;
Would it be possible to write one function for doing this, and if so, how do i add it to mushclient?
Was thinking I'd do something like this:
def ibar(prot)
if prot == 'Up!':
world.InfoColour ("green")
world.Info("prot " + prot + "; ")
else:
world.InfoColour ("red")
world.Info("prot " + prot + "; ")
I can't figure how to make it print the name of the variable though :(
You could put it into a function, or just put the whole lot into a timer "send" box, set the timer to fire every couple of seconds, and "send to script". That way, the commands get done every couple of seconds.
Now what I would like to do that instead of the last line that prints out all the stuff on infobar I want to make a pythoon function to which i send the variables and then colour that part of info text red respectively green wether the value of the variable is "Up!" or "Down!".
My biggest problem is to make python print the name of the variable and also to put the function in a script file and make it "callable" from MC.
This is done on all Up/Down triggers
Update var that changes. Get all vars. Clear infobar and set font and then send all the vars together with a name to the IBar function.