|
Sathrynn Newbie
Joined: 30 Mar 2005 Posts: 3
|
Posted: Wed Mar 30, 2005 2:30 am
Problem with capturing a line from a mud |
I want to tell whether a person is standing in the room with me for a trigger. I'm not sure on how to do this, I just started messing with zmud triggers. The mud is setup with Title, Description, Exits, Items, Person/Affects, Person/Affects.. The normal mud, Thanks.
|
|
|
|
Hazmeech Novice
Joined: 27 Mar 2005 Posts: 31
|
Posted: Wed Mar 30, 2005 3:09 am |
On your mud you type a command to look in your room?
It's best if there is a command that just lists the people in the room so that you can capture their names.
You should give an exact example of what it looks like in the game when you look and have people in the room with you after you type a command to look.
Or do you want to capture names when you walk into a room?
It's not really clear what you want |
|
|
|
Sathrynn Newbie
Joined: 30 Mar 2005 Posts: 3
|
Posted: Wed Mar 30, 2005 5:50 am |
Sorry, I say I want to have a trigger to spellup someone. Yet there's someone in the same room that has the trigger also. I want to be able to check the room for that person so we both don't waste our time doing the same thing to the person. I don't want to check if people are in the rooms I walk into, I just want to check the current room.
You type Look to see who's in the room in the mud and here's an example of the layout of a room:
The Great Hall
A large, almost oppressing wall of water shimmers beyond the crystal
doors to the east. Swirls of energy crackle within the water, somehow
keeping it at bay. A grand stone staircase spirals upwards into a second
level of the castle. A circular pool filled with a viscous, reflective
liquid has been built into the center of this hall.
[ Exits: n e s w u ]
A board of crackling energy floats above the surface of the pool.
Crescendo is hovering here.
...she is covered by a crackling field of energy!
...she is invisible to the unaided eye.
...her body is completely transparent.
Essah Mindrage is standing here.
...a blazing sheet of fire floats before her body!
...her body is completely transparent.
A lithe nymph swims in the pool, her long hair swirling about.
...she glows with a bright light!
Thanks again |
|
|
|
Hazmeech Novice
Joined: 27 Mar 2005 Posts: 31
|
Posted: Wed Mar 30, 2005 5:19 pm |
Where it says "unwantedpersonsname" you would put the persons name
which IS case sensitive, and where it says "cast spell" you would put the action you want to do if the person is not present.
To activate the process type check
#CLASS {Unwanted}
#ALIAS check {
person = 0
#T+ looktrig
look
#ALARM +2 {#IF (!@person) {
Cast Spell
#T- looktrig
} {#ECHO @unwanted Is Present.}}
}
#VAR person {0} {0}
#VAR unwanted {UnwantedPersonsName}
#TRIGGER "looktrig" {{@unwanted}*is*here.$} {
Person = 1
#ALARM +2 {person = 0}
#T- looktrig
} "" {disable}
#CLASS 0 |
|
|
|
Hazmeech Novice
Joined: 27 Mar 2005 Posts: 31
|
Posted: Wed Mar 30, 2005 5:26 pm |
One thing though, this small script doesn't take lag into consideration so if the mud has a prompt I can make the script work more efficiently and it will not do anything if there is lag.
|
|
|
|
Sathrynn Newbie
Joined: 30 Mar 2005 Posts: 3
|
Posted: Wed Mar 30, 2005 7:15 pm |
This will work great, I can finish it from here. Thanks for all the help.
|
|
|
|
|
|