[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  SetStatus not updating with variables

SetStatus not updating with variables

You need to log onto the forum to reply or create new threads.

  [Refresh] Refresh page


Posted by Rahrah   (2 posts)  [Biography] bio
Date Wed 26 Jun 2024 09:29 AM (UTC)

Amended on Wed 26 Jun 2024 10:01 AM (UTC) by Rahrah

Message
Hi!
Lurker here since I started to mud again. Mush been my choice of client, but now I'll start with a problem I cant find any info on.

SetStatus is not updating any variables other way than when I do the whole /SetStatus line again? Is this intentional and I should have SetStatus on the trigs etc. that affect those variables? Or is there something to update SetStatus otherwise.

/SetStatus ("TARGET = ", GetVariable("target"), "| cTRANCE: ", GetVariable("trance"), "| RUSH: ", GetVariable("adrenaline_rush"), "| PREF: ", GetVariable("monk_pref"))

is what I have on my status and everything works, but only if I type that.


EDIT: In real time figuring this out after all, but still might need guide on the way. So now I have an alias which sets the bar(not the program one) right, should I make it do this on timer or put this on varibles that affecting the status

EDIT2: Yeah, my solution was to make a timer that sends alias that sends the whole set as it refreshes the variables. What do you think of the sollution?

thanks
rah
[Go to top] top

Posted by Fiendish   USA  (2,525 posts)  [Biography] bio   Global Moderator
Date Reply #1 on Wed 26 Jun 2024 12:54 PM (UTC)

Amended on Wed 26 Jun 2024 12:55 PM (UTC) by Fiendish

Message
Quote:
SetStatus is not updating any variables other way than when I do the whole SetStatus line again?

This is correct. The documentation using multiple arguments and variable names is a bit misleading/confusing there. SetStatus literally only takes some text and puts it on top of the status bar area replacing whatever text was there before. It doesn't actually understand variables at all. In order to update the status with a complex collection of many variables, you must build the entire text again each time.


Quote:
Yeah, my solution was to make a timer that sends alias that sends the whole set as it refreshes the variables. What do you think of the sollution?

I would probably make the timer do the work itself instead of asking an alias to do it, but you got it to work the way you did, which is good success.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Rahrah   (2 posts)  [Biography] bio
Date Reply #2 on Thu 27 Jun 2024 11:28 AM (UTC)
Message
yes, put the /setstatus to timer, no need to have alias do it(it was from debugging the works of /setstatus and just felt lazy east :D)


Thanks alot for explaining and optimization.
[Go to top] 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.


237 views.

You need to log onto the forum to reply or create new threads.

  [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]