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
xekon
Apprentice


Joined: 11 Oct 2007
Posts: 154

PostPosted: Thu Nov 08, 2007 4:11 am   

Aardwolf weapon keyword reference similar to an alias
 
OK here is my dilema, I have 2 aardwolf weapons every 20 levels and they look identicle in my bag.

there is only one identifier that makes them unique, they have a serial number you can use as a keyword.

so in my inventory I see: ( 2) (K)(G)(H) Dagger of Aardwolf [80]
(269252) is my Mainhand
(268130) is my Offhand

now I can do the following with an alias,
hold (269252)
dual (268130)

but this is just lame, here is what I would like to be able to do:
I would like to be able to reference them with an alias but without the alias being the first word if you know what i mean.

m80 = (269252) is my Mainhand
o80 = (268130) is my Offhand

so I could type:

hold m80
dual o80

cast id m80
cast id o80

give o80 johnny

put o80 bag

get 080 bag

etc, etc, etc....

the problem is alias only works if the keyword is the first word going out on the mud, so how can I pull this off?
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Thu Nov 08, 2007 11:00 am   
 
Use a variable.

#trig {(~(%d~)) is my Mainhand} {main = %1}
#trig {(~(%d~)) is my Offhand} {off = %1}
hold @main
give @off johnny

etc etc.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
xekon
Apprentice


Joined: 11 Oct 2007
Posts: 154

PostPosted: Thu Nov 08, 2007 1:18 pm   
 
Variables cannot be used from the command line, it sends the @main through as @main instead of the value that it contains.

If there is a way to send a variable from the comand line somehow, then please correct me.
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Thu Nov 08, 2007 1:49 pm   
 
If you want to use it from the command line (I was sure there was an option to expand variables on the command line, but I can't find it - perhaps it's only in CMUD) you could use an oninput trigger:

#oninput {o80} {#sub "(268130)"}
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Thu Nov 08, 2007 2:05 pm   
 
If you go to View - Preferences, Then select Script Parser -> General Parsing you'll see the option to expand variables from the command line. For more details on these options you can click help in zMUD or the online reference
_________________
Asati di tempari!
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Thu Nov 08, 2007 2:10 pm   
 
Prefs->script parser->expand vars

This lets you use variables in the command line. They will be expanded automatically.

If you would rather be able to type the variable but only expand it sometimes there is the allow <> for expand option found in the same location.

Prefs->script parser->allow <> for expand

There you go.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
xekon
Apprentice


Joined: 11 Oct 2007
Posts: 154

PostPosted: Thu Nov 08, 2007 11:57 pm   
 
OMG THAT WORKS BEUTIFULLY!!!

Thank you very much for:

#oninput {o80} {#sub "(268130)"}
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