Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ ROM ➜ Running the server ➜ Rom Derivitive, MXP and Mobprogs

Rom Derivitive, MXP and Mobprogs

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


Posted by Thalor42   (4 posts)  Bio
Date Thu 03 Mar 2011 02:37 PM (UTC)
Message
Ok I've gone over this as much as I can on my code....

In ZMUD when I send the CLI command #MXP <SEND>Look</SEND>

Which displays look

I click on it and it sends look to the mud and the mud looks.....Thats great.

I can also have the mud send MXP to the client as well.

Example:

Code (text):


write_to_buffer( d, MXPTAG ("!ELEMENT look \"<send href='look'>\""),0);

LATER ON IN CODE

stc( "* " MXPTAG("look") "@Rlook@x" MXPTAG("/look")"",ch);



Which displays look. I click it and it looks for me.

My problem stems from wanting mobprogs to send the codes to the client.

Im probably being REAL stupid about it....

I am using



mob echoat $n #MXP <SEND>look</SEND>

and

mob echoat $n #MXP \x03send\x04 look \x03/send\x04


to try to get it to send. It prints on the screen.


All I get is whatever I type into the mobprog displayed on the screen, zmud either wont interpret it OR
its not being translated properly in the code before being sent to the character.

Is this a case of mob echoat not using write_to_buffer and going right to act?

Any help with this would be great! Thanks!
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Fri 04 Mar 2011 09:28 PM (UTC)
Message
I'm not sure how to help as I'm not sure how you implemented MXP in the code. The stuff about:

Quote:

mob echoat $n #MXP \x03send\x04 look \x03/send\x04


... sounds like what I suggested to do for the < and > signs, which get converted back at the last moment (and thus don't become MXP tags).

If you get a packet debug (MUSHclient will do that) then you can at least see what is arriving from the MUD. If zMUD is not displaying the hyperlinks you are probably getting &lt; rather than <, but it is hard to be sure.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Thalor42   (4 posts)  Bio
Date Reply #2 on Sat 05 Mar 2011 01:46 AM (UTC)
Message
I';m using your implementation of MXP from your page. It's been driving me nutty...im going to see if I can see the output of the string as it leaves the server.... if you can think of ANYTHING let me know!

Thanks!
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #3 on Sat 05 Mar 2011 02:37 AM (UTC)

Amended on Sat 05 Mar 2011 02:38 AM (UTC) by Nick Gammon

Message
I think I see what your problem is now. And I think I had it backwards about the \x03. That is what gets converted to "<" and the "normal" "<" gets converted to &lt;

So what you are saying is that the normal C-style MXP works, but not when inside a "mob echoat"? That's probably because the "<" inside the echo gets converted (correctly in my opinion) to &lt;.

Do you ever use <, > or & inside the mob echoat commands? You probably do somewhere, right?

Maybe make a new command, like "mob echoatmxp".

Then when you go to echo whatever that string is, you convert the "<" and ">" to \x03 and \x04, so that the output routine converts them back.

The whole system was designed to be "fail safe" so that if you didn't take special steps, stray < and > signs did not end up in the output, possibly confusing the MXP parser at the client end.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Thalor42   (4 posts)  Bio
Date Reply #4 on Mon 07 Mar 2011 11:01 PM (UTC)
Message
Thanks for the tip. I'll give it a shot!
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.


17,280 views.

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

Go to topic:           Search the forum


[Go to top] top

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