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
Gwaethiel
Beginner


Joined: 23 Feb 2011
Posts: 13

PostPosted: Wed Feb 23, 2011 11:14 pm   

Stopping scripts.
 
Hello!

I have question. I write a script like a:

Code:

#15 {e;szukaj listery;#wait %random(8000, 11000)}


For example. After 6 locations i decide to stop it, but i don't have mind how can i do this. Can you help me? And if i load script from *.txt file, that will be work? (Ofc. if there is a solution for my problem.)

Edit.

I remember i can use ESC, but it sending rest of commands to MUD. I like to avoid this.
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Thu Feb 24, 2011 5:07 am   
 
Maybe you can use #SUSPEND or #ABORT depending on what else you are trying to do.
_________________
Asati di tempari!
Reply with quote
Gwaethiel
Beginner


Joined: 23 Feb 2011
Posts: 13

PostPosted: Thu Feb 24, 2011 12:25 pm   
 
#ABORT don't work that i like, cause it sending next command to MUD without #wait, and script continues.

#SUSPEND don't work at all.

I try to explain what i need. For example i take script wich i have in *.txt file.

Code:

sd
#wait %random(8000, 11000)
se
sd
#wait %random(8000, 11000)
e
sd
#wait %random(8000, 11000)
e
sd
#wait %random(8000, 11000)
se
sd
#wait %random(8000, 11000)
e
sd
#wait %random(8000, 11000)
se
sd
#wait %random(8000, 11000)
e
sd
#wait %random(8000, 11000)
se
sd
#wait %random(8000, 11000)
e
sd
#wait %random(8000, 11000)
se
sd


My char going to directions what i write and searching something (sd is an alias). But there is no 'something' in this location, co i decide to abort script without sending rest of commands to MUD. I need something stoping that script. Something, when i send a command my char didn't go more, but stop and stay in place.
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Thu Feb 24, 2011 6:09 pm   
 
Sounds like you may need to come up with your own queuing solutions. So I would have the script put the commands to a list then pop each command from the list. When and if you decide to abort you just stop. Alternatively you can build a short-circuit into the script.

Code:
 #15 {#IF (!@StopNow) {e;szukaj listery;#wait %random(8000, 11000)}}


Then you can just set stop now when you want to abort.
_________________
Asati di tempari!
Reply with quote
myddrun
Wanderer


Joined: 31 Mar 2005
Posts: 58

PostPosted: Thu Mar 03, 2011 11:00 am   
 
How about putting in to a class and turning the class on and off with #t+ and #t-?
Will that work?
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