|
crimson150 Beginner
Joined: 19 Jun 2004 Posts: 13 Location: USA
|
Posted: 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. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
crimson150 Beginner
Joined: 19 Jun 2004 Posts: 13 Location: USA
|
Posted: 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. |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: 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. |
|
|
|
crimson150 Beginner
Joined: 19 Jun 2004 Posts: 13 Location: USA
|
Posted: 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. |
|
|
|
|
|