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
umdbandit
Wanderer


Joined: 31 Oct 2004
Posts: 94

PostPosted: Mon Mar 13, 2006 5:14 pm   

something wrong with trigger firing
 
Ok, so i've written my own slow walk system which pushes me around the game based on the prompt.
Basically

Code:
#TRIGGER "engine" {HP~:%d EP~:%d} {stepstep} "" {nocr|prompt}


so this works fine.

the stepstep is an alias which increments through a string list of directions.

Here's the problem. I want my walker to stop for some NPCS (and kill them :)). Its doing this about half of the time. The other half of the time, the stop trigger fires late, and while i will attack the NPC, the walker will already take another step, and keep walking.
Code:

#TRIGGER {An experience snail} {
  #T- slengine   <------- this is supposed to turn off the walk trigger
  @target = snail  <--------- sets the target
  botmobs off <------- this makes sure it only attacks one
  assess @target  <------- assesses target
  }


so basically i'm not sure whats going, and why the walker turns off in time some of the time, but not others of the time. Also i dont really understand what is the difference between newline triggers and prompt triggers.


thanks for all yours guys's help :)
_________________
Rufus- Winner of Stuff
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Mar 13, 2006 10:20 pm   
 
Newline -- your pattern is matched, the script code does NOT execute until the next newline code (Linefeed and/or Carriage Return) is found.

Prompt -- your pattern is matched, the script code executes immediately.
_________________
EDIT: I didn't like my old signature
Reply with quote
umdbandit
Wanderer


Joined: 31 Oct 2004
Posts: 94

PostPosted: Tue Mar 14, 2006 8:32 am   not working
 
when i make the mob triggers prompt triggers, they do not fire at all. No idea why this is.
_________________
Rufus- Winner of Stuff
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Mar 14, 2006 11:31 am   
 
Your prompt trigger appears to have an ID of "engine", while your mob trigger looks to be turning off "slengine". So that isn't too likely to work. Also the contents of your botmobs alias may cause a problem if it is using a looping command. The solution for that would be to eliminate the loop or enclose it in a #PRIORITY command.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
umdbandit
Wanderer


Joined: 31 Oct 2004
Posts: 94

PostPosted: Tue Mar 14, 2006 4:22 pm   
 
sl engine is the class that contains the engine trigger. Sorry i didnt specify before. Also not so sure what you mean by a looping command.

For reference, a sample room would look like this

The Arena(n, e, s, w)
An experience slug
HP:21234 EP:15422>
_________________
Rufus- Winner of Stuff
Reply with quote
umdbandit
Wanderer


Joined: 31 Oct 2004
Posts: 94

PostPosted: Mon Mar 20, 2006 4:54 am   
 
#PRI worked real nicely

thanks a lot for the help
_________________
Rufus- Winner of Stuff
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Fri Mar 24, 2006 2:00 pm   
 
Might have been a typo but the line:

@target = snail <--------- sets the target

Creates a variable called @target to snail. If target=wolf then wolf=snail.

#VAR target snail
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