I am working on a set of pk triggers for ArcticMud and there is a special case that I am having trouble getting to work correctly with MUSHclient.
Normally the plugin/system will check to see if a character name is in its pk list based on a limited number of triggers.
One example sentence might be:
or
So far so good. There is a command called scan that will look up, down, east, west, north, and south and display mobiles and characters in the adjacent rooms. The output is the same as if the mobiles or characters were in the same room as you.
It looks like this:
What I am currently doing to avoid the triggers firing when you see a target on scan is to set a $pkEnabled variable to temporarily disable the actions firing which starts on the "Looking north:" line and re-enables the actions when it reaches the command prompt. The actions don't get re-enabled until a newline is sent from the mud after the prompt, which normally isn't unless some other events happen. Normally this wouldn't matter, but if your target were to move into the room at around the same time that you typed scan, the mud output might appear like this:
The triggers wouldn't fire on Murgen because the actions hadn't been re-enabled until after the new line following north.
Is there any chance a toggle could be set on triggers to fire before reaching a newline character? Or if anyone has any other suggestions. This is relatively minor, and isn't too likely to happen, so I'd probably be willing to just live with its behavior.
Thanks,
Suf
Normally the plugin/system will check to see if a character name is in its pk list based on a limited number of triggers.
One example sentence might be:
Quote:
Murgen flies in from the west.
Murgen flies in from the west.
or
Quote:
Murgen is standing here.
Murgen is standing here.
So far so good. There is a command called scan that will look up, down, east, west, north, and south and display mobiles and characters in the adjacent rooms. The output is the same as if the mobiles or characters were in the same room as you.
It looks like this:
Quote:
Looking north:
You see nothing special.
Murgen is standing here.
Looking east:
You see nothing special.
Looking south:
You see nothing special.
Looking west:
You see nothing special.
Looking up:
You see nothing special.
Looking down:
You see nothing special.
615H 137V 55000000X 0C Exits:NSW>
Looking north:
You see nothing special.
Murgen is standing here.
Looking east:
You see nothing special.
Looking south:
You see nothing special.
Looking west:
You see nothing special.
Looking up:
You see nothing special.
Looking down:
You see nothing special.
615H 137V 55000000X 0C Exits:NSW>
What I am currently doing to avoid the triggers firing when you see a target on scan is to set a $pkEnabled variable to temporarily disable the actions firing which starts on the "Looking north:" line and re-enables the actions when it reaches the command prompt. The actions don't get re-enabled until a newline is sent from the mud after the prompt, which normally isn't unless some other events happen. Normally this wouldn't matter, but if your target were to move into the room at around the same time that you typed scan, the mud output might appear like this:
Quote:
615H 137V 55000000X 0C Exits:NSW>Murgen flies in from the north.
Solja flies in from the north.
615H 137V 55000000X 0C Exits:NSW>Murgen flies in from the north.
Solja flies in from the north.
The triggers wouldn't fire on Murgen because the actions hadn't been re-enabled until after the new line following north.
Is there any chance a toggle could be set on triggers to fire before reaching a newline character? Or if anyone has any other suggestions. This is relatively minor, and isn't too likely to happen, so I'd probably be willing to just live with its behavior.
Thanks,
Suf