|
Jezuit Beginner
Joined: 02 Nov 2002 Posts: 27 Location: USA
|
Posted: Wed Mar 24, 2004 7:06 am
Using Newline/Prompt triggers |
I know pretty much what both of these do, and in order to ensure some things go off, I like to have both of them selected (paranoia, perhaps?). However, I was wondering if there are instances where one or the other would not work when receiving text. I noticed that Newline won't update variables on, say, a prompt, until another command is sent, or until another line of text is received from the mud, so in this case it'd probably be best to use prompt...
Is there any situation, however, that would make either of these -not- work when receiving the correct pattern from the mud? |
|
|
|
Pega Magician
Joined: 08 Jan 2001 Posts: 341 Location: Singapore
|
Posted: Thu Mar 25, 2004 12:41 pm |
#ignore?
Sometimes Case, Verbatim, ANSI Colors alters the 'correct pattern'. In the past, I have no idea why but there were times when I found that Verbatim worked where Case mixed with Verbatim did not work. It was strange. |
|
|
|
Jezuit Beginner
Joined: 02 Nov 2002 Posts: 27 Location: USA
|
Posted: Fri Mar 26, 2004 5:18 am |
I only asked because I've seen a few times, where, if I have prompt selected and not newline, the trigger simply doesn't fire. Then, if I select both newline AND prompt, it fires twice when I get the message. But if I have just newline selected, it does it on the newline once. Weird stuff.
|
|
|
|
Serentus Apprentice
Joined: 28 Sep 2001 Posts: 103 Location: USA
|
Posted: Fri Mar 26, 2004 6:58 am |
To put it simply, the Prompt and Newline flags determine when a trigger pattern tested.
MUDs generally send a line of text followed by a 'newline' (carriage return/linefeed) or (linefeed/carriage return). You don't see this, but this what tells the client to start a new line. If the newline flag is set the trigger pattern is not tested until that is received.
If the prompt flag is set then the trigger is tested even if there is no 'newline' sent, as in most MUD prompts.
So most triggers for normal MUD lines only need the newline option set. You only need to set the prompt flag for the MUD prompt. Setting the newline option for it may result in it double firing, depending on your other settings.
EXAMPLE:
The MUD sends...
You attack the giant orge. (carriage return/linefeed)
You did 120 points of dammage. (carriage return/linefeed)
HP:500 MN:400 >
At the mud prompt no 'newline' is sent, and if you send a command it appears on the same line as the prompt. If the prompt flag is not set it will not fire. If it is set then zMUD knows to test it anyway.
Hope that helps. |
|
|
|
Pega Magician
Joined: 08 Jan 2001 Posts: 341 Location: Singapore
|
Posted: Sat Mar 27, 2004 2:28 pm |
I scripted on a prompt intensive game several years ago. I swung between 2 different clients - zMUD and a general purpose german-made (character mode only) telnet client which uses REXX scripts, in conjuction with a 'number crunching'/'dynamic-(graphical-)map-generator'/database/dedicated-helper. The game runs in character mode, not the line mode we are used to on muds. Don't ask me for the scripts, I don't play that game any more, it was too intense. A generally non multi-playing botters' paradise, with 'combat/radar/navigation/resource building/evasive maneuvering' (real-time) scripting techniques. Annual tournaments. 24 hourly events. Sci-fi. RTS. It used to be a BBS door-game. Ever since it got onto the internet the multi-user in real-time dimension took off. EGOs on BOTs. [8D]
Every prompt was very important. In zMUD, I used both prompt and new-line for my triggers. I think I ended up making duplicate triggers for the same pattern prompt. One trigger for prompt another for new-line, both with differing purposes. |
|
|
|
|
|
|
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
|
|