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


Joined: 12 Feb 2005
Posts: 4

PostPosted: Fri Mar 04, 2005 10:37 am   

#PAUSE doesnt work
 
i have a combat bot that walks around and kills things. problem is when it pauses the slowwalk to kill a mob zmud continues to send directions and then aborts slowwalk altogether.

An old rat pokes into the room in search of scraps to eat.
Slow walking paused
slash rat
H:74 M:76 <eb>
slash rat
You slash viciously into an old rat with a sturdy shortsword.
H:74 M:76 <e->
You must regain balance first.
H:74 M:76 <e-> nw

There is no exit in that direction.
H:74 M:76 <e->
You have recovered balance.
H:74 M:76 <eb>
Squeaking at you wildly, a rat appears from a dark corner.
H:74 M:76 <eb>
slash rat
You slash viciously into an old rat with a sturdy shortsword.
H:74 M:76 <e->
You must regain balance first.
H:74 M:76 <e->
An old rat wounds you with a glancing cut.
H:69 M:76 <e-> Slow walking aborted

You have recovered balance.
H:69 M:76 <eb>
slash rat

here is the code for the bot

Code:
#CLASS {ratbot|main}
#TRIGGER {You see exits leading north, northeast, east, south, and northwest} {#slow 2jn2hw2ks2l}
#TRIGGER {You see exits} {#OK}
#CLASS 0

#CLASS {ratbot|main|bash}
#TRIGGER {H:(%d) M:(%d) <eb>} {#IF ((@currenthp < 15)) {portals;#wait (1500);quit};#IF ((@currenthp < 30)) {drink health};slash rat}
#TRIGGER {{final blow|Nothing can be seen here by that name.|I do not recognize anything called that here.|You detect nothing here by that name.|You do not see that individual here}} {#class getrat 1;#class bash 0}
#CLASS 0

#CLASS {ratbot|main|getrat}
#TRIGGER {recovered balance} {get rat;#class rest 1;sleep;#class getrat 0}
#TRIGGER {<eb>} {get rat;#class rest 1;sleep;#class getrat 0}
#CLASS 0

#CLASS {ratbot|main|rest}
#TRIGGER {well-rested} {stand;#class look 1;#step;#class rest 0}
#CLASS 0

#CLASS {ratbot|main|look}
#VAR dir {w}
#TRIGGER {{rat appears|rat darts|rat pokes|rat dashes}} {#pause;slash rat;#pause;#class bash 1;#pause;#class look 0}
#CLASS 0


as you can see ive tried spamming the pause command but it still doesnt seem to work. Mad frustrating!
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Fri Mar 04, 2005 10:59 am   
 
I can't see anything odd about what's there - try enabling 'Show Triggers' in Settings -> Preferences -> General Parsing

That'll show exactly which trigger is firing to try making you step once you've attacked. Was wondering if there was another class somewhere that's getting in the way?
Reply with quote
Magilicutty
Newbie


Joined: 12 Feb 2005
Posts: 4

PostPosted: Fri Mar 04, 2005 7:04 pm   
 
just tried your idea, and nothing seems to be firing to cause that. slowwalk just doesnt pause.
Reply with quote
Dharkael
Enchanter


Joined: 05 Mar 2003
Posts: 593
Location: Canada

PostPosted: Fri Mar 04, 2005 7:41 pm   
 
a few problems i can see
Code:
#CLASS {ratbot|main}
#TRIGGER {You see exits leading north, northeast, east, south, and northwest} {#slow 2jn2hw2ks2l}
#TRIGGER {You see exits} {#OK}
#CLASS 0

You see exits leading north, northeast, east, south, and northwest
will fire both triggers above so you might you'll get an extra #OK that might be messing things up causing you to walk an extra step;
Also if An old rat pokes into the room in search of scraps to eat.
is the description of the mob you see when you look then:
Code:
#TRIGGER {You see exits} {#OK}

that trigger will fire when you see the exits as you walk into the room
then you'll see the description of the rat and:
Code:
#TRIGGER {{rat appears|rat darts|rat pokes|rat dashes}} {#pause;slash rat;#pause;#class bash 1;#pause;#class look 0}

that trigger will fire after you've already #OK the step;
_________________
-Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style."
Reply with quote
Magilicutty
Newbie


Joined: 12 Feb 2005
Posts: 4

PostPosted: Fri Mar 04, 2005 7:49 pm   
 
Okay, fixed the first thing you said, any idea how i can acomplish the second?
Reply with quote
Dharkael
Enchanter


Joined: 05 Mar 2003
Posts: 593
Location: Canada

PostPosted: Fri Mar 04, 2005 7:57 pm   
 
Quick answer instead of having the You see exits
trigger send #OK have it #PAUSE instead and have your prompt
send a #STEP command if didnt see anything to fight.
_________________
-Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style."
Reply with quote
Magilicutty
Newbie


Joined: 12 Feb 2005
Posts: 4

PostPosted: Sat Mar 05, 2005 10:35 am   
 
hmm tried it that way and it still wont pause... wierd Crying or Very sad
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