Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Minstrel
Beginner


Joined: 07 Dec 2001
Posts: 21

PostPosted: Mon Mar 11, 2002 12:22 am   

Ignoring text for triggers
 
I know how to use the #gag command so the text does not come up on the screen, but also is there a way to make it so triggers won't activate from that text as well?

Line 1

Message

Line 1

Say I wanted to make it so anything in between "Line 1" won't activate a trigger, how do I go about doing that?
Reply with quote
dracx
Beginner


Joined: 14 Oct 2000
Posts: 26
Location: USA

PostPosted: Mon Mar 11, 2002 2:06 am   
 
Put the trigger for message in a different class. The have a trigger for line one turn that class off, and have a trigger for line2 turn it back on.

Drac-x
Reply with quote
Minstrel
Beginner


Joined: 07 Dec 2001
Posts: 21

PostPosted: Mon Mar 11, 2002 2:56 am   
 
The lines above and below the actual message are the same lines, basicly...

**Illusion**

So and So kicks you

**Illusion**
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Mon Mar 11, 2002 3:12 am   
 
Change the classnamehere to the
class folder of the triggers you want to
stop when it sees illusions.

#TR {^~*~*Illusion~*~*} {#IF (%trigger{classnamehere) {#T- classnamehere} {#T+ classnamehere}}

Then you start getting spoofed with illusion
with the line **Illusion** in them

TonDiening
Beta Upgrading to 6.26
Reply with quote
Minstrel
Beginner


Joined: 07 Dec 2001
Posts: 21

PostPosted: Mon Mar 11, 2002 8:16 pm   
 
#TR {^~*~*Illusion~*~*} {#IF (%trigger classnamehere) {#T- classnamehere} {#T+ classnamehere}}

Did you mean that instead? I havn't had the time to test it yet, but the script you gave wouldn't save.
Reply with quote
Tarn
GURU


Joined: 10 Oct 2000
Posts: 873
Location: USA

PostPosted: Mon Mar 11, 2002 8:26 pm   
 
Question: As TonDiening asked, is the illusion allowed to include the line

**Illusion**

?


So that a complete illusion might look like

**Illusion**

**Illusion**
Bob kicks you.
**Illusion**

in which case straight toggling of triggers based on the line **Illusion** would be disastrous.

If so, you might want to consider toggling back on based on prompts or something else rather than the **Illusion** message.


-Tarn
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Mon Mar 11, 2002 8:27 pm   
 
Indeed a typo:

#TR {^~*~*Illusion~*~*} {#IF (%trigger{classnamehere) {#T- classnamehere} {#T+ classnamehere}}

#TR {^~*~*Illusion~*~*} {#IF (%trigger(classnamehere)) {#T- classnamehere} {#T+ classnamehere}}


and as Tarn points out it could be disastrous. To lock it down safer we
would need to see more mudoutput. Maybe tie something to a prompt or
something ie:

#TR {^~*~*Illusion~*~*} {#IF (%trigger(classnamehere)) {#T- classnamehere} {#NOOP}}

#TR {^~*~*Illusion~*~*$$~<} {#IF (%trigger(classnamehere)) {#NOOP} {#T+ classnamehere}}

TonDiening
Beta Upgrading to 6.26
Reply with quote
Minstrel
Beginner


Joined: 07 Dec 2001
Posts: 21

PostPosted: Tue Mar 12, 2002 8:39 am   
 
Hrm..doesn't seem to work all that well. Theres nothing in the output I can really trigger it to turn on the class folder again. Turning it off isn't a problem, its getting it back on that is. I just need to get rid of the text in between the two "**Illusion**" really so it won't affect any trigger
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Mar 12, 2002 6:11 pm   
 
The basic problem, as I understand it, is that you want to disable triggers for the duration of the **Illusion** to prevent people from spoofing you. You can turn off triggers with the #IGNORE command. Unfortunately, you can't use a trigger to turn them back on because you'll ignore that trigger along with all the others.

A possible solution has occurred to me, which involves playing from child windows. The parent window will have the autolog triggers and the illusion trigger. The autolog password trigger will be modified to start in non-illusion mode.
Modified value for password trigger:
#PW
#VAR Illusion 0
#C+ Main
#C- Illusion
#T- Autolog


Illusion Trigger:
#TR {~*~*Illusion~*~*} {#IF (@Illusion=1) {#VAR Illusion 0;#C+ Main;#C- Illusion} {#VAR Illusion 1;#C- Main;#C+ Illusion}}

You will need an attached command-line in the Main window, this is where you will be playing. All your triggers, aliases, etc. should be made in this window. When an illusion comes along, the parent window will temporarily switch captured output to the Illusion window, where it won't affect your triggers in the Main window, and then switch back when the illusion ends.

No guarantees, but I hope this will work or inspire something else that will.

LightBulb
All scripts untested unless otherwise noted
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Mar 13, 2002 1:04 am   
 
quote:

Question: As TonDiening asked, is the illusion allowed to include the line

**Illusion**

?


So that a complete illusion might look like

**Illusion**

**Illusion**
Bob kicks you.
**Illusion**

in which case straight toggling of triggers based on the line **Illusion** would be disastrous.

If so, you might want to consider toggling back on based on prompts or something else rather than the **Illusion** message.


-Tarn




Use two state variables and a catch-all trigger to get every line between **Illusion** and **Illusion**. Upon receiving the first line, the first state variable would be set to 1 (an illusion is in progress), the second state variable would be set to 0 (no text, non-**Illusion** lines have been encountered), all appropriate classes would be turned off, and the catch-all trigger would be activated. Once a text, non-**Illusion** line has been encountered the second state variable is then set to 1 and the catch-all trigger is disabled. Upon receiving the next **Illusion** line, the first state variable will then be reset to 0 and the previously-disabled classes would be reactivated.

EDIT: be sure to put all the triggers and other settings you want to stay active while under an illusion in a separate folder than everything else unless you wish to use lots of #T+/- commands.
li'l shmoe of Dragon's Gate MUD
Reply with quote
Minstrel
Beginner


Joined: 07 Dec 2001
Posts: 21

PostPosted: Wed Mar 13, 2002 3:57 am   
 
Alright, whats the catch-all trigger that was mentioned? I'm not as good at Zmud as others, so a little help is really appreciated.
Reply with quote
dracx
Beginner


Joined: 14 Oct 2000
Posts: 26
Location: USA

PostPosted: Wed Mar 13, 2002 4:34 am   
 
Try this one...

#TR {~*~*Illusion~*~*} {#CLASS "IllusionClass" 0;#TEMP {^~>} {#CLASS "IllusionClass" 1}}

Where "illusionclass" is the class that you are turning off,
and where ^~> is the pattern for your prompt.

Let's see em spoof that.

DracX
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net