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


Joined: 16 Jan 2017
Posts: 19
Location: Oregon

PostPosted: Mon Jan 16, 2017 5:46 am   

Help with alias/variable
 
Hi all. New to Zmud. Have made a little progress but ran into an obstacle and hoping some kind people might help me out.

Game syntax is get itemname backpack
I'd like to make an alias gb where I can type gb itemname and that itemname is retrieved and also becomes a variable that I can use for selling

so like gb taco

get taco from backpack and sell it to merchant

Any help will be greatly appreciated.

sincerely,
Mike
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Jan 16, 2017 5:58 pm   
 
Copy and paste into the command line and then modify it in the settings editor as needed.
Code:
#CLASS Backpack
#VAR GetItem {} {}
#ALIAS gb {#IF (%1<>"") {GetItem=%1;#SEND {get %1 backpack}} {#IF (@GetItem<>"") {#SEND {get @GetItem backpack}}}}
#ALIAS sell {#IF (@GetItem<>"") {#SEND {sell @GetItem}}}
#CLASS 0
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
milty111
Beginner


Joined: 16 Jan 2017
Posts: 19
Location: Oregon

PostPosted: Mon Jan 16, 2017 9:59 pm   
 
Thank you so much! Works great! Now I just need to figure out what it all means...LOL
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