[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  Prompt line parsing and output parsing.
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Prompt line parsing and output parsing.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Madjack   Ukraine  (16 posts)  [Biography] bio
Date Fri 15 Apr 2005 10:50 PM (UTC)
Message
I need to set trigger for mud prompt. But triiger fires when prompt you send something to mud and prompt displays in output. For example:

<20/20 100/100 100/100> <--- HERE FIRES OK

say Hello
You saying: Hello
<20/20 100/100 100/100> <--- HERE FIRES OK

<20/20 100/100 100/100> <--- HERE NOT FIRES
------------------------------------------------

What i can do, to hook mud prompt?

Macbook pro late 2008 (MB471)
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #1 on Fri 15 Apr 2005 11:55 PM (UTC)
Message
Does the prompt occur everytime you send something? (and other times on its own, of course)

Can you copy/paste some output from the server here? We'll need to see the exact spacing of the prompt (use the [code] [/code] tags to keep the forum from eating whitespace).

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by Madjack   Ukraine  (16 posts)  [Biography] bio
Date Reply #2 on Sat 16 Apr 2005 02:31 AM (UTC)

Amended on Sat 16 Apr 2005 02:35 AM (UTC) by Madjack

Message
I'am not a newbie in programming :-) And problem in other things. I'am from russian, so sorry for bad english:-)

look
131/131 154/154 115/115 3 | evil | "Underground" | 11587 | UD# 

131/131 154/154 115/115 3 | evil | "Underground" | 11587 | UD# 


131/131 154/154 115/115 4 | evil | "Underground" | 11587 | UD# 


Mud address: aladon.sovintel.ru:9000

First bottom line is server prompt. When i send something to mud, prompt dublicates up to output and after that triggers fires. But! In this sample you can see, that in server prompt line time = 4, but triggers can't fire and set var to 4. When i send something to mud prompt sends to output and triggers fires.

Macbook pro late 2008 (MB471)
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Mon 18 Apr 2005 07:08 AM (UTC)
Message
Triggers are evaluated at the newline character (\n) so possibly your problem is that the line has not been terminated by a newline.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Madjack   Ukraine  (16 posts)  [Biography] bio
Date Reply #4 on Mon 18 Apr 2005 07:22 PM (UTC)
Message
Yes. Prompt don't have new line symbol. And i don't think, that i can insert a new line symbol at the end of my prompt line. Can you add special trigger for hooking prompt line?

Macbook pro late 2008 (MB471)
[Go to top] top

Posted by Larkin   (278 posts)  [Biography] bio
Date Reply #5 on Mon 18 Apr 2005 08:50 PM (UTC)
Message
One of the key changes in version 3.66 allows you to add a carriage return to the end of most MUD prompts. You'll find an option to replace the IAC GA/EOR bytes with CR/LF bytes. Try that and see if it helps you with your triggers.
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #6 on Mon 18 Apr 2005 09:16 PM (UTC)
Message
You can currently trigger the prompts (without the newline) with a plugin, and then either add the newline yourself, or just use the values.

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=5020
that should get you started.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


6,037 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]