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


Joined: 18 Jan 2001
Posts: 116
Location: USA

PostPosted: Mon Nov 26, 2001 12:40 am   

Trigger to intercept command input?
 
I'd like to make a spells queue so that no matter how fast I input spells, they only get sent to the mud one at a time. When I input a spell, I'd like it to get added to the queue. Then, as I receive output from the mud indicating a spell was cast... I'll throw the next spell in the queue. I'd like to avoid making an alias that I use when casting spells, and to instead use a trigger that fires whenever I attempt to send a command to the mud that starts with:

{c|ca|cas|cast} '

The problem is I'd like this trigger to intercept the command. I don't want the command sent until its turn in the queue.

I can figure out how to create and process the queue, but is there a way to use a command input trigger that blocks the command?

Thanks,
Eupher
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Nov 26, 2001 2:09 am   
 
quote:

I'd like to make a spells queue so that no matter how fast I input spells, they only get sent to the mud one at a time. When I input a spell, I'd like it to get added to the queue. Then, as I receive output from the mud indicating a spell was cast... I'll throw the next spell in the queue. I'd like to avoid making an alias that I use when casting spells, and to instead use a trigger that fires whenever I attempt to send a command to the mud that starts with:

{c|ca|cas|cast} '

The problem is I'd like this trigger to intercept the command. I don't want the command sent until its turn in the queue.

I can figure out how to create and process the queue, but is there a way to use a command input trigger that blocks the command?

Thanks,
Eupher



An #ONINPUT trigger with an #IF conditional should work. Unless you don't want it to trigger in a multiple-command situation (ie, cast 'spell';cast 'spell'), you're probably going to have to use %* instead of *.

li'l shmoe of Dragon's Gate MUD
Reply with quote
eupher
Apprentice


Joined: 18 Jan 2001
Posts: 116
Location: USA

PostPosted: Mon Nov 26, 2001 2:18 am   
 
I'm not sure what solution you are suggesting here. What condition would you put in the #IF? Or more importantly, what command would you use to block the input being sent to the mud?

Yes, I want it to work in multiple input situations.. that is largely the goal.

#15 cast 'detect invis'

should add 15 entries to the spells queue, and start sending them one at a time as each one fires. It should not immediately send all 15 at once... which leads to my question:

How do you prevent the input commands from being sent to the mud?

Eupher
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