Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
LordFett213
Novice


Joined: 20 Aug 2008
Posts: 34

PostPosted: Sun Mar 22, 2009 8:22 am   

How to stop #ts at 0 and not restart?
 
I have a couple skills that are on long timers, when I use them I have #ts to the time of the refresh and then also an #alarm for the refresh +1 second to set the #ts to -1 such as this:

#ts 1440
#alarm +1441 {#ts -1}

This way when the timer is NOT running I know the skill is usable. Is there a way to have the #ts end at 0 and not start over?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4689
Location: Pensacola, FL, USA

PostPosted: Sun Mar 22, 2009 8:45 am   
 
#TI?
_________________
Discord: Shalimarwildcat
Reply with quote
LordFett213
Novice


Joined: 20 Aug 2008
Posts: 34

PostPosted: Sun Mar 22, 2009 9:31 am   
 
Hmm but then I'd still have to use the same setup as I am using now. Was hoping there was something I could do in the original trigger to tell it only count once then stop.
Reply with quote
LordFett213
Novice


Joined: 20 Aug 2008
Posts: 34

PostPosted: Sun Mar 22, 2009 9:42 am   
 
I guess I missunderstood #ti I see what it does now. Thanks shalimar.
Reply with quote
LordFett213
Novice


Joined: 20 Aug 2008
Posts: 34

PostPosted: Tue Mar 24, 2009 5:41 pm   
 
This doesn't seem to be working. I've tried disabling the tick time, setting it to 0 -1 1440 and nothing works. All it does it turn it on or off but not set the time when it starts.

I've tried a value of {#ti 1440} and using the F1 dialog it gave me #timer {1440} {#say assassinate ready} which doesn't work either.
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Wed Mar 25, 2009 6:58 am   
 
Instead of doing that, it sounds like what you really need is a visual indicator of if the skill is usable or not. Why not use Toggle button that goes on or off as the skills is usable. Better yet, use a regular button and disable/enable it using the alarm. If the buttons is visible, then you know you can use it.
_________________
Asati di tempari!
Reply with quote
Skookie
Newbie


Joined: 07 Dec 2008
Posts: 3

PostPosted: Sat Apr 04, 2009 6:06 am   
 
The notion of manipulating a toggle button is something that I have been trying to figure out for a good number of days now. I need to create a button that lets me know that I can perform a spell action again. I use an alias to cast the spells so just finding the command to switch the button state from up to down would be a HUGE help. Yes GUI programing is by far and away my worst skillset.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sat Apr 04, 2009 10:44 am   
 
There's a field for buttons, "Expr:" that lets you use an expression to determine the state that's active. The expression should return a number that's the number of the state you want to activate - the base state is 0.

So all you need to do is put a variable in there and change the value of the variable. It looks like this:

Code:
<button copy="yes">
  <caption>on</caption>
  <expr>@lol</expr>
  <state caption="off"></state>
</button>


lol=0 makes the button display "on", lol=1 makes it display "off".
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Sylmannemo
Beginner


Joined: 20 Oct 2006
Posts: 18

PostPosted: Fri Apr 10, 2009 9:22 pm   
 
If I'm understanding properly, instead of using a toggle, you could always just create a gauge and color coordinate it. Have the value toggle at the appropriate times and if the button is green you can cast, red you can't, etc.

Code:

#BUTTON # {Cast Spell} {} {} {} {@cancastspell} {} {} {} {} {} {} {} {} {} {} {Gauge||12|1|0|7} {} "" {Explore|Inset} {} {}
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net