|
umdbandit Wanderer
Joined: 31 Oct 2004 Posts: 94
|
Posted: 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 |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
umdbandit Wanderer
Joined: 31 Oct 2004 Posts: 94
|
Posted: 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 |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: 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 |
|
|
|
umdbandit Wanderer
Joined: 31 Oct 2004 Posts: 94
|
Posted: 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 |
|
|
|
umdbandit Wanderer
Joined: 31 Oct 2004 Posts: 94
|
Posted: Mon Mar 20, 2006 4:54 am |
#PRI worked real nicely
thanks a lot for the help |
|
_________________ Rufus- Winner of Stuff |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: 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 |
|
|
|
|
|