|
derekthano Newbie
Joined: 05 Oct 2005 Posts: 3
|
Posted: Thu Oct 06, 2005 3:25 am
Trigger on Prompt Issue |
My apologies if this was already covered somewhere else, I didn't find anything relevant when searching.
In advance, ths version of zMUD in question is 7.2, the MUD is Achaea, Dreams of Divine Lands
My problem is this, I have a prompt trigger, set as trigger on prompt, which works fine except when receiving a large block of text from the MUD. All the trigger does is use a SAYP command to indicate that it successfully read the prompt. This isn't normally what the trigger does, but for debugging purposes, I made this instead.
The trigger line text is:
Code: |
^(%d)h, (%d)m ([cexkdb@])- |
The command executed is:
Code: |
#SAYP %ansi(grey)Trigger Fired |
Here is an example from the Achaea, using that trigger(Whatever is a command used for generating multiple prompts):
Code: |
2631h, 2225m cexk-Trigger FiredWhatever
Whatever
Whatever
Whatever
Whatever
Whatever
Whatever
Whatever
Whatever
Whatever
Please restate.
2631h, 2225m cexk-Trigger Fired
Please restate.
2631h, 2225m cexk-Trigger Fired
Clarification is in order.
2631h, 2225m cexk-
I missed that altogether.
2631h, 2225m cexk-
Come now, you don't really mean that.
2631h, 2225m cexk-
You've baffled me!
2631h, 2225m cexk-
Brilliant! Dumb it down for me?
2631h, 2225m cexk-
That went right over my head.
2631h, 2225m cexk-
I do not understand.
2631h, 2225m cexk-
Quit trying to confuse me.
2631h, 2225m cexk-Trigger Fired |
Notice how the first two prompts worked, then only the last one worked. Due to slight latency, my commands weren't received all at once, so the first two generated prompts in seperate message chunks, the last group, without all the trigger fired prompts, was one large group.
Is there a workaround for this, am I doing something wrong, or is this an unfixed bug? |
|
_________________ (Dirje in Achaea) |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Thu Oct 06, 2005 7:58 am |
I am going to guess you have the options set for prompt and not newline. This causes it to not fire unless there is a small pause there. Because the mud is sending a large block of text quickly it is likely that it was sent in larger packets and there was no sort of prompt delay in the packets. As long as your just looking to grab variables you can simply check both prompt and newline on the options. If you are doing more complex code then you may have to add some checking to make sure you don't create a trigger loop when having both checked. Also you should turn off the Trigger on Trigger option.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
derekthano Newbie
Joined: 05 Oct 2005 Posts: 3
|
Posted: Thu Oct 06, 2005 2:50 pm |
Sorry if the OP wasn't clear, yes I trigger on prompt, not newline, and I don't trigger on trigger.
So my best bet is to trigger on newline as well, or instead of prompt? Is this something from zMUD, where it won't trigger on more than one prompt per message chunk, or is it more likely the MUD is only sending one prompt code per message chunk?
Edit: Also, the prompt is for much more than just variable gathering, but I can code it to not repeat itself on both newline and prompt triggering if need be. |
|
_________________ (Dirje in Achaea) |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Thu Oct 06, 2005 9:35 pm |
If you can handle the coding of it then you should have it trigger on both prompt and newline. The true details of how zMud handles it are little obscure, but suffice it to say if you create a trigger that has both prompt and newline turned off it will never fire. Basically what happened it that the proper prompt conditions were not met so the trigger was never checked. Having both options on causes the trigger to be checked in each state. The coding for properly avoiding a double firing of the trigger built this way often involves adding a captured * wilcard to the end (note * supports 0 or more characters). This allows detection of sent commands within the code of the trigger. Anyhow just have them both checked and your problem will be covered, the fallout is yours; at least until you can define the scope of it, then maybe I can lend a few brain cells.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
derekthano Newbie
Joined: 05 Oct 2005 Posts: 3
|
Posted: Sun Oct 09, 2005 5:12 am |
I can handle the coding, and thanks for the help, was just hoping I didn't have to resort to that.
|
|
_________________ (Dirje in Achaea) |
|
|
|
|
|
|
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
|
|