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


Joined: 18 May 2004
Posts: 16
Location: USA

PostPosted: Mon Sep 12, 2005 5:30 pm   

Alias help?
 
I'm not quite sure what I need, but here is the problem:

Here are six commands: +bg, +pers, +skills, +res, +powers, +flaws

There are multiple sections to each of these commands, they in fact display a character's traits.

What I need is something like an alias, though I'm not entirely sure, that will allow me to type any of these commands without the plus sign. In addition I also need to be able to have a number following the command, such as this: bg1

After that I need to be able to type a character's name such as this: bg1 lurk

I understand that I could create about 20 alias' for each command to do just this, but I am really hoping that it won't come to that.
Reply with quote
Carabas
GURU


Joined: 28 Sep 2000
Posts: 434
Location: USA

PostPosted: Mon Sep 12, 2005 7:22 pm   
 
What does the number do?

There are two ways off the top of my head to do this. One is just a simple alias and the second is a #ONINPUT trigger. I'll give you two variations of both.

#ALIAS bg {+bg}

input: bg 1 lurk
output: +bg 1 lurk

#ALIAS bg {+bg%1 %2}

input: bg 1 lurk
output: +bg1 lurk

#ONINPUT {^bg(%d) (%w)$} {#SUB {+bg %1 %2}}

input: bg1 lurk
output: +bg 1 lurk

#ONINPUT {^bg(%d) (%w)$} {#SUB {+bg%1 %2}}

input: bg1 lurk
output: +bg1 lurk

What is the syntax for the MUD commands +bg, +pers, etc?
_________________
Carabas
Reply with quote
Trajet
Beginner


Joined: 18 May 2004
Posts: 16
Location: USA

PostPosted: Mon Sep 12, 2005 8:17 pm   
 
SYNTAX: +bg(number) (character name)

(number): Say you have 5 bg entries, each on of those entries is a number: +bg1 lurk, +bg2 lurk, etc.
--------------------------------------------

I was wondering if there was a way to maybe make it so I could type in:

(character name) bg(number)

EX: lurk bg1

I'm just asking because it's quite a hassle having to place the cursor near the beginning of the command when I want to be able to quickly change a 1 into a 2.

If not, it's okay, you have done more than enough.

By the way I used the #ONINPUT one.
Reply with quote
DeReP
Adept


Joined: 14 Jun 2003
Posts: 222
Location: Chile

PostPosted: Mon Sep 12, 2005 11:11 pm   
 
#ONINPUT {^(%w) bg(%d)$} {#SUB {+bg%2 %1}}
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