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

Play Nodeka
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Dakina
Novice


Joined: 22 Apr 2011
Posts: 36
Location: Colorado

PostPosted: Fri Apr 22, 2011 11:09 am   

Need help with Triggers and a timer
 
Hey All, ok here's my issue

Im trying to make a couple buttons, actually got them made. However I need them to update right away off the command prompt as soon as it generates.

Here's my command prompt:

216H 118V 2065655X 439C Exits:NE>

and it works out to:
Current HP, Current Move, XP to next level, Coins, and of course exits

My buttons are:
HP: Current/max, MV: current/Max, XP tnl

I also have a status prompt right above it, that also dosnt update right away


The set prompt command dosnt work for me


My triggers I use are:
(%d)H (%d)V (%d)X (%d)C Exits:(%w)
#var hp %1;#var mv %2;#var xptnl %3;#var cn %4;#var xt %5

My status bar:
@{hp}/@{maxhp}H @{mv}/@{maxmv}V @{xp}X @{cn}C+@{bankc}BC Exits:@{xt}

My Hp button:
HP: @hp / @maxhp

options: Type: Gauge, Expr: @hp,
Gage: Caption HP: @hp / @maxhp
Value @hp
Max @maxhp

script:
<button type="Gauge" autosize="false" width="90" height="23" autopos="false" toolbar="2" color="lime" textcolor="red" border="black" gaugelowcol="red" priority="5" id="434">
<caption>HP: @hp / @maxhp</caption>
<expr>@hp</expr>
<gaugemax>@maxhp</gaugemax>
<gaugelow>0</gaugelow>
</button>

So how do I make that button change as I get hit and hp goes down?


K next question,

I have a tic timer that goes off every 60 seconds, and resets on numerous triggers because arctic dosnt use exactle 60 seconds, and with server lag exc it gets off occasionally.

What I want to do is make a Additional timer, this one to count down from 5, deducting 1 each time the original tic timer rolls over from 0 back to 60.

How do I do that?


Thanks guys
Reply with quote
shalimar
Wizard


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

PostPosted: Fri Apr 22, 2011 1:18 pm   
 
So long as your triggers are setting the same variables the button gauges use, it should adjust flawlessly... if its not, check for duplicate variables.

As for the counter, you could actually put it in the same tick timer script you have now

#IF (@tickCount=0) {do some stuff;tickCount=5} {#ADD tickCount -1}
_________________
Windows 7 Home Premium 64-bit SP1
AMD Phenom II x6 1055T 2.8GHz 16GB
CMUD Pro v3.34
Reply with quote
Dakina
Novice


Joined: 22 Apr 2011
Posts: 36
Location: Colorado

PostPosted: Fri Apr 22, 2011 2:04 pm   Buttons
 
Problem on the buttons is there not adjusting properly, they only update every time the tic timer rolls over I believe (which is about once every minute)
Reply with quote
Dakina
Novice


Joined: 22 Apr 2011
Posts: 36
Location: Colorado

PostPosted: Fri Apr 22, 2011 2:15 pm   
 
Can you clarify for me what that script will do to my tic timer?

I want the tic timer to fire every 60 seconds and show the 60 second count down in the status bar, but I want a 2nd countdown that counts down from 5 to 0 over 5 mins time and maybe even at the end of that time outputs "Beseech, Scribe, or brew time" or some such
Reply with quote
Dakina
Novice


Joined: 22 Apr 2011
Posts: 36
Location: Colorado

PostPosted: Fri Apr 22, 2011 2:55 pm   
 
Ok Ive discovered it dosnt seem to store my variables until there about half way up the screen or maybe it was when tic rolled over?:

448H 130V 1307362X 258C Mem:1 Exits:EW> TICK IN 5 SECONDS.
say @mem
You say '@mem'

448H 130V 1307362X 258C Mem:1 Exits:EW> say @mem
You say '@mem'

448H 130V 1307362X 258C Mem:1 Exits:EW> say @mem
You say '@mem'

448H 130V 1307362X 258C Mem:1 Exits:EW> say @mem
You say '@mem'

448H 130V 1307362X 258C Mem:1 Exits:EW> say @mem
You say '@mem'

448H 130V 1307362X 258C Mem:1 Exits:EW> say @mem
You say '@mem'

448H 130V 1307362X 258C Mem:1 Exits:EW> say @mem
say @mem
You say '@mem'

448H 130V 1307362X 258C Mem:1 Exits:EW> You say '@mem'

448H 130V 1307362X 258C Mem:1 Exits:EW> say 1
You say '1'

448H 130V 1307362X 258C Mem:1 Exits:EW> say 1
You say '1'

448H 130V 1307362X 258C Mem:1 Exits:EW>
Reply with quote
Dakina
Novice


Joined: 22 Apr 2011
Posts: 36
Location: Colorado

PostPosted: Fri Apr 22, 2011 3:11 pm   
 
Could the problem be that CMUD dosnt understand where to watch for the input to start or the prompt or something? I have yet to figure out the set prompt command and have it do anything

The thing is I need the buttons to instantly update on any change on the mud or they really do me no good :-P
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2307

PostPosted: Fri Apr 22, 2011 6:01 pm   
 
The problem might be that the trigger capturing the prompt information needs to be marked Trigger On Prompt, and turn off Trigger On Newline. If Trigger On Prompt is not turned on, the trigger will not fire immediately--it will wait until a newline comes.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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