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
Shanerz
Newbie


Joined: 27 May 2003
Posts: 4
Location: USA

PostPosted: Tue May 27, 2003 5:43 pm   

Delaying the sending of input
 
The mud I play on has implmented variable timed spells. When a spell is cast the line, "You start casting a spell..." is sent. During the casting of a spell there's some progress output (declining line of stars). When the spell completes one of a few spell-independent lines of text is sent.

My problem arises since commands sent to the mud during the spell are ignored. I have a trigger to get and wield any fumbled weapon, but if the timing is just right (or wrong) I'll start casting a spell before the trigger fires. The get/wield commands are then discarded by the mud.

Is there any way to make zmud queue the things I type until my spell completes (potentially at the peril of my character)? Is there any way to empty that queue? Do I have to write my own "command stack" code? With a trigger/alias for every command sent to the mud? Ughh

-Shanerz
Reply with quote
Anabasis
Wanderer


Joined: 26 Jan 2001
Posts: 74

PostPosted: Tue May 27, 2003 8:01 pm   
 
quote:
Is there any way to make zmud queue the things I type until my spell completes (potentially at the peril of my character)? Is there any way to empty that queue?


Yes.

#ALARM {-03} {#IF (still casting spell) {#ABORT} {#IF (@queue) {#EXECUTE {%item( @queue, 1)};#VARIABLE queue {%delitem( %item( @queue, 1), @queue)}}}}

This will check every three seconds (adjust time to personal tastes) to see if you're still casting the spell. You just need to come up with some way to check for that condition. You can then just fill up the @queue variable with the commands you need and it will fire them off three seconds apart as long as you're not casting.


quote:
Do I have to write my own "command stack" code? With a trigger/alias for every command sent to the mud?



#ADDI queue "do this"

Ana
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