Tick Timer

Posted by Serve on Thu 31 Jan 2008 11:12 PM — 11 posts, 40,424 views.

#0
I wanted to know why this wont work on my client

<triggers>
<trigger
custom_colour="2"
enabled="y"
match="*(Advice:*"
send_to="12"
sequence="100"
>
<send>world.DoAfterNote 35, "gt tick coming ..."
</send>
</trigger>
</triggers>

i have triggers and script enabled and timers
Australia Forum Administrator #1
In what way does it not work? The trigger doesn't fire? The message doesn't appear? There is a script error message?

What script language have you got set in the scriting configuration tab?

If it is Lua, you need to put the arguments in brackets, like this:


world.DoAfterNote (35, "gt tick coming ...")

#2
nothing happend, i chagned script to lua and added the bracets so going to see how that goes.This is what it looks like and its just not going off.


*(Advice:*

world.DoAfterNote 35, ("gt tick coming ...")
USA #3
Try enabling that thing which turns on messaging about the triggers... Well, I guess this does not help if I do not have a copy of MUSHclient around to remind me of how to turn that on. Just try this instead to see if it really is firing:

<triggers>
  <trigger
   custom_colour="2"
   enabled="y"
   match="*(Advice:*"
   send_to="12"
   sequence="100"
  >
   <send>Note( "Advice trigger fired." )
   </send>
  </trigger>
</triggers>


Also, please note a few things. DoAfterNote will diplay the message on the screen, and you want DoAfter if you wish to have the tick message displayed over gtell. Also, both DoAfter and DoAfterNote use timers for the delay. Double check to make sure that you have timers enabled in the timer configuration dialog. No error messages are given if timers are not used, so this can be missed easily.
Australia Forum Administrator #4
I said:


world.DoAfterNote (35, "gt tick coming ...")


You wrote:


world.DoAfterNote 35, ("gt tick coming ...")


Note that you put the bracket in a different place.

Did the trigger match at all? If you edit the trigger look in the middle of the dialog box for something like "0 matches". If it says "10 matches" then it is matching, but not doing the right thing. If it says "0 matches" then it is not matching.

It would help to post an example line which you are trying to match on.
#5
I did that and it still has 0 matches

*(Advice:*

world.DoAfterNote (35, "gt tick coming ...")

timers enabled
lua script enabled
Germany #6
"0 matches" means, that the match-string ( match="*(Advise:*" does not fit the input string.

There are multiple options:
if * should tell mushclient "0-n characters" and you haven't specified in the trigger, that this should be a regular expression.
So either delete the "*" from the match string or you switch on RegularExpression on this Trigger.
You may have a look in Game->TestTrigger and the online help of triggers and RegularExpressions to approximate the correect match string.

And for testing the match string first do the world.Note("Fired") and when the match is working fine, change it toe world.DoAfterNote ...

Hope that helps
StuDraKi.
Amended on Fri 01 Feb 2008 02:06 AM by StuDraKi
USA #7
Kasata: could you also post some lines off of the mu* that you are trying to capture? 1-2 lines above, one or two messages, and one or two lines after? For the post, please put this between the code tags for the forum code, like so:


[code]
here is stuff on line 1
(Advice: look at this message!)
here is more stuff on line 2
[/code]
Australia Forum Administrator #8
Quote:

timers enabled
lua script enabled


So far your problem is that the trigger is not firing. Are triggers enabled?

As I asked before, if you post the actual text from the MUD it will help a great deal. Sometime people think that extra spaces here and there don't matter, when they do.


Copy and paste, don't retype it.
Amended on Fri 01 Feb 2008 04:37 AM by Nick Gammon
#9
okay so when you say test from the mud i am not sure what text you are talking about but this is the trigger

*(Advice:*

send
world.DoAfterNote (35, "gt tick coming ...")

triggers enabled
lua enabled
timers enabled

trigger wont fire so i am guessing somthing in the trigger: (blank)
is not how it should be. Do i need some type of text from the mud tick to base it off of or something? Do i need to have it keep evaluating or anything like that
Amended on Fri 01 Feb 2008 06:22 PM by Serve
Australia Forum Administrator #10
All I want you to do is copy and paste an example of what you see arriving from the MUD, that should fire the trigger, but doesn't.