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


Joined: 02 Nov 2012
Posts: 5

PostPosted: Fri Nov 02, 2012 9:22 pm   

Cancelling pending items
 
So... suppose I run:

take stone;#wa 5000;drop stone;#wa 5000;take stone;#wa 5000;drop stone;#wa 5000;take stone;#wa 5000;drop stone;#wa 5000;take stone;#wa 5000;drop stone;#wa 5000;

and then... 2 seconds in I realize I need to do something else first... How can i cancel the pending items so they don't spam up my connection?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4662
Location: Pensacola, FL, USA

PostPosted: Fri Nov 02, 2012 10:24 pm   
 
well with all the waits it should make a separate thread, which you can #STOP
problem is you will have to supply the thread number, which you can get by using the #THREAD command by itself
_________________
Discord: Shalimarwildcat
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Nov 02, 2012 10:56 pm   
 
If you just sent a whole stack of commands like that, then you'd do the below:

1)use #THREAD to get the thread id number (don't think #WAIT lets you name threads it creates, but even if it did you didn't do that so the only way to refer to this thread is by number)
2)use #STOP on that thread id number

That's not too intuitive, though, so you might want to consider a command queueing script.
_________________
EDIT: I didn't like my old signature
Reply with quote
boncne
Newbie


Joined: 02 Nov 2012
Posts: 5

PostPosted: Fri Nov 02, 2012 11:50 pm   
 
The #thread did it. Many thanks!
Reply with quote
Fizgar
Magician


Joined: 07 Feb 2002
Posts: 333
Location: Central Virginia

PostPosted: Sat Nov 03, 2012 11:43 am   
 
By using the #THREAD command, you can specify a name for the thread, which you can use to refer to it, rather than looking up the number to use with the #STOP command.

For example:
Code:
#THREAD stone;take stone;#wa 5000;drop stone;#wa 5000;take stone;#wa 5000;drop stone;#wa 5000;take stone;#wa 5000;drop stone;#wa 5000;take stone;#wa 5000;drop stone;#wa 5000;


By adding #THREAD stone to the above string you can stop it any time just by typing #STOP stone.
_________________
Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34
Reply with quote
rozdwojeniejazni
Wanderer


Joined: 13 Aug 2011
Posts: 74

PostPosted: Sun Nov 04, 2012 12:17 am   
 
Bla bla bla, you're just too wise, guys.

Just press escape, boncne!
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Nov 05, 2012 1:03 pm   
 
Escape will not work, because the commands are running in a separate thread. That's why he needs to use the #THREAD and #STOP commands.
Reply with quote
rozdwojeniejazni
Wanderer


Joined: 13 Aug 2011
Posts: 74

PostPosted: Tue Nov 06, 2012 2:33 pm   
 
Yes, escape will work.
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