Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Al
Newbie


Joined: 05 Jul 2005
Posts: 5

PostPosted: Sat Jan 26, 2013 8:53 pm   

sending #walk commands from an array
 
Hi,

I am trying to write a script that will let me move around an area in a set path (using an array).

Having a few issues - firstly, if I try typing @arrayname.1 into the command line, then that is sent to the mud (obviously not doing much!)

I got around that by creating an alias called movenow which just sends @arrayname.1 - that seems to work fine for any normal directions that I put into the array, however if @arrayname.1 is a #walk command, it ends up sending #walk directly to the mud, instead of making me speedwalk to the room I want.

Is there a way to get CMud to parse whatever comes out of the array, so that I can use it to fire aliases or other commands? I want to make the first element in the array a command to get me to the area I want, and the last element to get me home again, using speedwalks.

If this isn't clear, let me know and I will attempt to clarify.

Thanks

Al
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Sat Jan 26, 2013 10:58 pm   
 
You'll need to use #execute.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Jan 27, 2013 12:36 am   
 
Keep in mind that with #execute and #execwin, there's usually always a better way.
_________________
EDIT: I didn't like my old signature
Reply with quote
Al
Newbie


Joined: 05 Jul 2005
Posts: 5

PostPosted: Sun Jan 27, 2013 8:40 pm   
 
Perfect, thanks!

That is the command I was looking for, assuming I can't think of a better way!

Al
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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