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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Ggoss
Apprentice


Joined: 01 Nov 2006
Posts: 114

PostPosted: Wed May 14, 2008 5:39 pm   

Little help please
 
Ok what i want is basically something on my status bar that says Bracer: Ready Bracer: NotReady

when i tap my bracer it gives me this msg

As you tap on bracer of the whirlwinds an immense rush of vibrating energy flows down your limbs!.

When it becomes tappable agian it gives me this msg.

Your bracer of the whirlwinds starts vibrating and humming quietly.

Hell it could be a red and green light for all i care, just something that tells me when its rdy. Not sure how i could code something to do that. Thanks in advance.
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Wed May 14, 2008 5:44 pm   
 
Here you are:

Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <var name="Bracer" type="Literal">Ready</var>
  <trigger priority="30">
    <pattern>As you tap on bracer of the whirlwinds an immense rush of vibrating energy flows down your limbs!</pattern>
    <value>Bracer="Not Ready"</value>
  </trigger>
  <trigger priority="40">
    <pattern>Your bracer of the whirlwinds starts vibrating and humming quietly.</pattern>
    <value>Bracer="Ready"</value>
  </trigger>
  <stat name="Bracer" priority="10">
    <value>Bracer: @Bracer</value>
  </stat>
</cmud>


Copy everything inside the code block there, highlight wherever you want it to go in the treeview of the package editor (eg, a new class called "bracer") and press Ctrl+V. Job done.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Wed May 14, 2008 5:47 pm   
 
What you'll want is something that records the message and turns something on, perhaps a variable so...

Code:

#var brdy "not ready" _nodef

#TRIGGER ready {^Your bracer of the whirlwinds starts vibrating and humming quietly. $} {brdy="Ready"}

#STATUS {Bracer: @brdy}


Forgot a turn off mechanism, and the Guru beat me anyways.

Code:

#TRIGGER notready {^As you tap on bracer of the whirlwinds an immense rush of vibrating energy flows down your limbs!. $} {brdy="Not Ready"}


Turn off mechanism
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Wed May 14, 2008 5:49 pm   
 
Code:

#status {bracer: @bracerready} someclassname bracerstatus

#trig {As you tap on bracer of the whirlwinds an immense rush of vibrating energy flows down your limbs!.} {#var bracerready "NotReady"} someclassname

#trig {Your bracer of the whirlwinds starts vibrating and humming quietly.} {#var bracerready "Ready"} someclassname

That will actually put both triggers and the statusbar object under a single class, making it easier to play with.
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Wed May 14, 2008 5:56 pm   
 
bah! bested on my own advice. Razz
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Ggoss
Apprentice


Joined: 01 Nov 2006
Posts: 114

PostPosted: Wed May 14, 2008 5:57 pm   
 
Awesome, that was fast, thanks guys.
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