|
heidi Newbie
Joined: 04 May 2002 Posts: 1
|
Posted: Sat Apr 06, 2002 10:13 pm
Speedwalking prob + MXP usage + Reverse trigs |
I'll take a shot at this:
1) This seems like a bit of a bother. Generally you set shortnames for important rooms only because you will usually speedwalk to them. For the others you can double-click on any room on a map and zMud will slow walk you there.
2) Sorry, I haven't gotten into MXP yet so I can't help here.
3) Maybe something like this:
#Trigger {^%*$} {#Class Expect 0;#if (%pos( @ExpectedText, %trigger)) {#exec @GoodAction} {#exec @BadAction}} "Expect"
#Class Expect 0
#alias {Expect} {#Var ExpectedText %1;#Var GoodAction %2;#Var BadAction %3;#class Expect 1}
Then you could enter a command like:
Expect "This is what is expected" goodalias badalias
It doesn't exacly do a reverse trigger, but it might do what you are looking for.
El_Dickman |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Mon Apr 08, 2002 1:33 am |
For 2), check out <!ENTITY> and <VAR>:
quote:
<!ENTITY> <!EN>
<!ENTITY Name Value [DESC=description] [PRIVATE] [PUBLISH] [DELETE] [ADD] [REMOVE]>
Entities in MXP are used to store information from the MUD (MUD Variables). Once an entity is defined, you can reference it's value using the &Name; syntax. For example:
<!ENTITY Version "6.15">
The current version of zMUD is &version;
would display:
The current version of zMUD is 6.15
Tags can be included within entities. Unlike in XML, tags can be broken across entities within MXP as long as when all entities on a line from the MUD are expanded, all of the tags are properly closed (or MXP will close the dangling tags for you). So, the following is valid in MXP:
<!ENTITY Start "<em>">
<!ENTITY End "</em>">
&Start;This text is emphasized&End;
Also note that as in XML, entities are case sensitive, so &Start; is different than &start;. Unlike XML, entities can be used anywhere in MXP, even within other tags. However, if an external entity has the same name as an attribute, the attribute within a tag takes precedence.
All of the default HTML entities are defined in MXP.
To delete an entity, use the DELETE argument. Setting an entity to a empty value does not delete it.
PRIVATE entities cannot be queried by the MUD client. They are completely hidden.
PUBLISH entities can be used by the client to produce a list of MUD Server variables to be access by the player
The DESC description is used to give your entity a longer description
The ADD argument causes the Value to be added as a new item in a string list. So, it is appended to the existing value of the variable. String lists are values separated by the | character.
The REMOVE argument causes the Value to be removed from the existing string list.
Security Note: Entities are marked as to whether they are created by the MUD or created interactively by the user. The user cannot override Entites sent from the MUD. The user is only allowed to override user-defined entities.
<VAR> <V>
<VAR Name [DESC=description] [PRIVATE] [PUBLISH] [DELETE] [ADD] [REMOVE]>Value</VAR>
The <!ENTITY> tag allows the MUD server to set the value of a variable without displaying the value to the user. The <VAR> tag is just like the <!ENTITY> tag, except that the value of the variable is placed between the <VAR> and </VAR> tags, and this value is displayed to the user.
Hp: <VAR Hp>100</Var>
would display: "Hp: 100" to the user, and would set the entity hp to 100.
For 3), you can do:
#LOOP %numrooms {#IF (%roomname(%mapvnum(%i)) = "roomName") {#VAR roomNum %i;#ABORT}}
where roomName is the name you are looking for and it can also be a variable or %n.
Kjata |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Tue Apr 09, 2002 4:42 am |
Yes, you can. An additional parameter to the %roomname functions works to set the room name to whatever you specify. An example is:
#LOOP %numrooms {#NOOP %roomname(%mapvnum(%i), %concat("Room", %i))}
Notice that I use #NOOP since the %roomname function will return the newly set room name, but I do not what to do anything with that.
Kjata |
|
|
|
|
|
|
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
|
|