Hello everyone, I'm new to MUSHclient and new to LUA and I would like a bit of direction to accomplish a task!
I would like to cast a debuff on a target, have that debuff landing trigger a timer on my status bar that ticks down the seconds til the debuff wears off.
I did this in another mud client by creating a trigger that set a variable "HiltDuration" to 33, it then set off a while loop that waited 1 second, then added -1 to the variable, and cycled until 0, at which point it removed the debuff displayed from my status bar.
Here's the landing message...
"You deftly slam the pommel of your weapon into {&HiltTarget}'s hand, impairing his ability to parry."
Here's the "send" of the trigger...
#T+ Hilt [this line adds the debuff to the status bar]
#VAR HiltDur 33 [this line sets the duration to 33]
#WHILE (@HiltDur >= 0) {#WAIT 1000;#IF (@HiltDur = 0) { #T- Hilt } {#ADD HiltDur -1}} [this line has the while loop that updates the variable and removes the debuff from the status bar when it hits 0]
Curious how the status bar updates. Is it whenever a variable on it is updated, or like every second, or what?
I would like to cast a debuff on a target, have that debuff landing trigger a timer on my status bar that ticks down the seconds til the debuff wears off.
I did this in another mud client by creating a trigger that set a variable "HiltDuration" to 33, it then set off a while loop that waited 1 second, then added -1 to the variable, and cycled until 0, at which point it removed the debuff displayed from my status bar.
Here's the landing message...
"You deftly slam the pommel of your weapon into {&HiltTarget}'s hand, impairing his ability to parry."
Here's the "send" of the trigger...
#T+ Hilt [this line adds the debuff to the status bar]
#VAR HiltDur 33 [this line sets the duration to 33]
#WHILE (@HiltDur >= 0) {#WAIT 1000;#IF (@HiltDur = 0) { #T- Hilt } {#ADD HiltDur -1}} [this line has the while loop that updates the variable and removes the debuff from the status bar when it hits 0]
Curious how the status bar updates. Is it whenever a variable on it is updated, or like every second, or what?