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
Amylon
Novice


Joined: 31 Jan 2003
Posts: 49
Location: Australia

PostPosted: Fri Jun 25, 2004 11:02 am   

Creating Macro's from a script
 
I am at present writing a script and need to be able to give the user the ability to set the macros to what they desire. I tried like this but it failed, am I doing it wrong? (NOTE: If pasted into command line it works fine, if Brought in through settings/import/Ascii script it fails)

#CLASS WOOD
#PR woodkey "Set wood to which key? e.g F3 F4 etc"
#PR metalkey "Set metal to which key? e.g. F3, F4 etc"
#KEY @metalkey {mine metal}
#KEY @woodkey {chop wood}
#CLASS 0
Reply with quote
Zener
Wanderer


Joined: 31 May 2004
Posts: 54
Location: USA

PostPosted: Fri Jun 25, 2004 1:15 pm   
 
quote:
Originally posted by Amylon

I am at present writing a script and need to be able to give the user the ability to set the macros to what they desire. I tried like this but it failed, am I doing it wrong? (NOTE: If pasted into command line it works fine, if Brought in through settings/import/Ascii script it fails)

#CLASS WOOD
#PR woodkey "Set wood to which key? e.g F3 F4 etc"
#PR metalkey "Set metal to which key? e.g. F3, F4 etc"
#KEY @metalkey {mine metal}
#KEY @woodkey {chop wood}
#CLASS 0



I hate to tell you but when I copy/pasted it into an alias and it worked just fine.

Note: Do NOT copy/paste the following with a blank line between the 2 aliases. Make sure to delete the blank line.

#ALIAS Setwood {#CLASS WOOD
#PR woodkey "Set wood to which key? e.g F3 F4 etc"
#KEY @woodkey {chop wood}
#CLASS 0}

#ALIAS Setmetal {#CLASS WOOD
#PR metalkey "Set metal to which key? e.g. F3, F4 etc"
#KEY @metalkey {mine metal}
#CLASS 0}

~Zener
Reply with quote
Amylon
Novice


Joined: 31 Jan 2003
Posts: 49
Location: Australia

PostPosted: Fri Jun 25, 2004 1:48 pm   
 
Seems it was a timing issue with its place within the script.
By placing the code you did near the top and also adding a
#alarm +3 {setwood;setmetal} at the end its all works now when imported as a script. Cut and Paste is just bad news with zmud is the main reason I wanted this fixed.

Thanks for pointing out the obvious to me, seems often the simplist of things is overlooked, I never even considered doing it with an alias! :)

:)Thanks:)
Reply with quote
nabob
Beginner


Joined: 01 Aug 2004
Posts: 10

PostPosted: Sun Aug 01, 2004 8:27 pm   
 
I have experienced a lot of difficulty with import/ascii.
Sometimes it works just fine, and sometimes it works not at all.
I recently copy/pasted a class including several multi-state triggers put together by a friend. Everything looks fine in notepad, but when I import it.. the trigger patterns show up in the triggers with the braces included, not everything is imported, and generally, it is all messed up.

I went through and deleted all the blank lines between trigger definitions and still, Zmud choked on it.

Is there some kind of trick to getting Zmud to reliably import ascii scripts?
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