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
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Mon Apr 19, 2004 9:32 pm   

Capturing the current command buffer
 
On the mud I play you regain balance after completing actions. I'd like to set up a system where if I type 'punch rat' for example, then press shift-enter then it will take what is currently in the command buffer and only send it to the mud once the regain trigger is fired.

So in the command buffer is 'punch rat'
I hit shift-enter and it stores 'punch rat' in a variable called nextcommand for example. Then on regain I execute whatever is inside nextcommand.

Thanks in advance for any help (or if it just can't be done)

Guinn
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Mon Apr 19, 2004 9:46 pm   
 
It works, you're a genius. Thanks for the quick reply :)
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Mon Apr 19, 2004 9:57 pm   
 
Hmm, how in the world did I delete a reply by someone else. Apologies whoever that was.

Anyways, I think I got carried away a bit... appears previous triggers etc made me think that the answer had fixed it, but alas. Anyways... It's two main questions I've got here...

Firstly: Can you assign a macro to shift-enter? whenever I try then it doesn't seem to work?
Secondly: Can you capture the current command before you've actually sent it to the game (before you've hit enter basically)?

Apologies to whichever reply I seem to have wiped out.
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: Mon Apr 19, 2004 10:31 pm   
 
Heh, I deleted it myself, actually, intending to replace it with a modified version.
To use the macro Shift-Enter, I think you need to specify in Preferences, to use Macros ahead of Zmud default shortcuts.
Secondly, I don't think you can copy what's in the command bar without first manually copying it the the clipboard or sending it to the mud.
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Fri Apr 23, 2004 10:35 pm   
 
Thanks to Zugg for helping me out.

As you mentioned Danlo, you can't assign a macro to Shift-Enter.

Using the %selected function though you can capture what's in the current command buffer. So have assigned F12 to capture what's the the command buffer to then fire on regaining balance.

Guinn
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