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
crimson150
Beginner


Joined: 19 Jun 2004
Posts: 13
Location: USA

PostPosted: Fri Jun 17, 2011 1:01 am   

Need help with gossip alias
 
I am looking to make a gossip alias that would be something along these lines

you enter gos blah blah

and it does a [Winning] Blah Blah [Winning]

i cant figure out how to get the tags before and after the text im looking to gossip

ive tried lots of things and in-mud alias's dont work.
_________________
"This is your world, these are your people, you can live for yourself today, or help build tomarrow for everyone.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Jun 17, 2011 1:58 am   
 
Code:
#oninput {^gossip (*)$} {
  //this kills whatever you originally typed so that it does not get sent to the mud along with the result you're looking for
  #noinput
  //this is where you do all the scripty stuff to get what you want
  #send %format("gossip [Winning] &s [Winning]",%1)
}
_________________
EDIT: I didn't like my old signature
Reply with quote
crimson150
Beginner


Joined: 19 Jun 2004
Posts: 13
Location: USA

PostPosted: Fri Jun 17, 2011 2:03 am   
 
is this to be setup as an alias, i dont even know what the code thing is and you use commands im not familiar with at all, is that cmud or zmud? cause i use zmud
_________________
"This is your world, these are your people, you can live for yourself today, or help build tomarrow for everyone.
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Fri Jun 17, 2011 8:35 am   
 
MattLofton seems to have made it a bit harder than it needs to be.

Honestly, you can do this:

Code:
#ALIAS gos {#SEND "gossip [Winning] "%-1"[Winning]"}


MattLofton's example would have been entered on the command line. It creates an 'oninput' trigger type that executes like an alias. #SEND and %format, as well as #oninput, all happen to be in zMUD, too. But for simplicity, you can do what I have.

Just make sure you use "gossip" in the #SEND part, otherwise it'll go into recursion.
Reply with quote
crimson150
Beginner


Joined: 19 Jun 2004
Posts: 13
Location: USA

PostPosted: Fri Jun 17, 2011 10:14 pm   
 
if you remove the #send from the beginng of it it fixes the issue, i guess the #Send is not neccesary when using it as an alias
_________________
"This is your world, these are your people, you can live for yourself today, or help build tomarrow for everyone.
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