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 ➜ Compiling the server ➜ MXP: Howto send a hidden tag?

MXP: Howto send a hidden tag?

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


Posted by Galen   Australia  (4 posts)  Bio
Date Thu 13 May 2004 02:25 AM (UTC)
Message
Greetings,

Firstup great work Nick, good to see another aussie coder establishing himself well.

I have embarked on extending my MUDS MXP support and one of the things i would like to do is send hidden tags to the players each round, detailing the status of their group.

These tags would only be sent under certain circumstances but they would just contain variables for their clients.
Eg:
<Groupmate Name=Vyper CurrentHp=5000 MaxHp=7000>

Now i am still pretty new at the whole MXP thing but i have been able to send the standard Prompt HP and MAXHP to the players clients which set their associated Hp and MaxHP client variables. This allowed for each scripting on their behalf.

I would hope to achieve a similiar solution by setting their client variables but the information isnt actually displayed.

The questions i have are as follows -:
1) Would sending this data in a custom element as above with these attributes be able to set client variables?

2) If not, what would be the best way to do this, keeping in mind that the information isnt actually displayed to the user.

Most of our users unfortunatly are Zmud, so could the answers to these questions please be generic enough to work on both Zmud and Mushclient.

Thanks in Advance
Galen
Top

Posted by Nick Gammon   Australia  (23,169 posts)  Bio   Forum Administrator
Date Reply #1 on Thu 13 May 2004 07:36 AM (UTC)
Message
Quote:

Firstup great work Nick, good to see another aussie coder establishing himself well.


Thanks. :)

Quote:

Would sending this data in a custom element as above with these attributes be able to set client variables?

If not, what would be the best way to do this, keeping in mind that the information isnt actually displayed to the user.


What I would do is set up an entity - this is available as a variable in zMUD I believe, and in MUSHclient you can access it via scripting.

eg.


<!ENTITY hp "1234" >


Then in MUSHclient you can do this:


hp = GetEntity ("hp")


I am not sure of the exact syntax in zMUD, but I think it just becomes a client variable there.

- Nick Gammon

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

Posted by Galen   Australia  (4 posts)  Bio
Date Reply #2 on Thu 13 May 2004 08:38 AM (UTC)
Message
Nick,

Thanks for your reply.

I thought i actually tried this, but perhaps i got the approach wrong.

I have successfully setup this
MXPTAG("!ELEMENT Hp FLAG='Set Hp' OPEN")

And then during the prompt parsing sent:
<Hp>1234</Hp>

This worked for cases where i didnt mind the information being displayed to the user. But what im trying to achieve is not having to display the data.

My understanding (with my brief skimming of the documentation), the ENTITIES and ATTRIBUTES are defined like an XML DTD, and sent generally at the beginning of each connection once the negotiation is complete.

Are you suggesting i could send <!ENTITY hp=*> tags during normal game operation?

Top

Posted by Galen   Australia  (4 posts)  Bio
Date Reply #3 on Thu 13 May 2004 12:45 PM (UTC)
Message
Sheesh *embarassed* i have been confusing !ELEMENT and
!ENTITY

Sorry for wasteing your time folks.

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.


14,634 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.