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
Edwub
Wanderer


Joined: 21 Nov 2002
Posts: 85
Location: USA

PostPosted: Thu Feb 20, 2003 1:53 am   

Help abuse proofing a trigger
 
I have a trigger set that has saved my life many many times.

if someone points an object called a rotonda at me (teleported), i remove what I hold and hold a golden wand.
When they fade into existance (teleport to me) I use the wand and knock them out.

Unfortunetly, my buddy found out its abusable by emotes.

Ex:

Saber points a rotonda at Majere.
remove hold
hold golden

| 1786H 1727M 1569V >
Saber slowly fades into existence.
use golden
knockout Saber
knockout Saber
knockout Saber




Now, I asked him to REALLy point a rotonda at me, and results are:

Saber points a rotonda at Majere.
In Dirty Water [ N E S W ]
The water here is so brackish, so foul, that you can't see the ground in
this low water. It stinks to high heaven here, because of dead fish and other
unimaginable dirt and you hold your breath automatically. The forest of
pillars supporting the beam construction above continues to the west and north
and south. A river to the east waters this area. Noise and calls come from the
platform to the south.

It is followed directly by a room name.

How can I make a trigger to make sure it is not a fake/emoted rotonda?

Edwub the Mage
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4672
Location: Pensacola, FL, USA

PostPosted: Thu Feb 20, 2003 3:06 am   
 
add a second state to the trigger to catch the roomname or exits on the next line

Shalimar

AIM: shalimarwildcat
Reply with quote
Edwub
Wanderer


Joined: 21 Nov 2002
Posts: 85
Location: USA

PostPosted: Thu Feb 20, 2003 3:34 am   
 
Since the roomname is randomized, how do I make it exit on the next line?

Edwub the Mage
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4672
Location: Pensacola, FL, USA

PostPosted: Thu Feb 20, 2003 3:52 am   
 
i gues the other state could be on
^(*) ~[(*)~]$

Shalimar

AIM: shalimarwildcat
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4672
Location: Pensacola, FL, USA

PostPosted: Thu Feb 20, 2003 4:01 am   
 
#tr {(%w) points a rotonda at Majere.} {
#cond {^(*) ~[(*)~]$} {remove hold
hold golden
} {within|Param=1}



Shalimar

AIM: shalimarwildcat
Reply with quote
Edwub
Wanderer


Joined: 21 Nov 2002
Posts: 85
Location: USA

PostPosted: Thu Feb 20, 2003 4:14 am   
 
Will this work for version 6.16?

Edwub the Mage
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Thu Feb 20, 2003 4:27 am   
 
two things: conditional triggers weren't implemented in version 6.16, and even if they were, what shalimar posted wouldn't work.

The #cond command needs to be entered on its own, not as an argument to the original trigger:

#trigger {State 0 pattern} {#NOOP State 0 commands}
#cond {State 1 pattern} {#NOOP State 1 commands}

would be the correct way of entering conditions from the command line

for version 6.16 you'll need toggling classes, this should work:

#class beenzapped "disable"
#tr { ~[*~]$} {remove hold;hold golden;#var igotteleported 1}
#tr {(%w) slowly fades into existence.} {#t- beenzapped;use golden;#3 knockout %1}
#class 0
#trigger {%w points a rotonda at Majere.} {
#t+ beenzapped
#var igotteleported 0
#alarm +1 {#if (@igotteleported = 0) {#t- beenzapped}}

--this is untested, so if its not working, post comments or questions and i'll try to fix it :) but the theory is right.

--------

moon.icebound.net:9000
Reply with quote
Edwub
Wanderer


Joined: 21 Nov 2002
Posts: 85
Location: USA

PostPosted: Thu Feb 20, 2003 10:51 am   
 
Experiencing zmud file corruption yet again argh.

Emit, that looks good, but what's important to me is that I only knockout whoever used the rotonda on me.
the (%w) is way too open, could be anyone

this should still work, right?:

#trigger {(%w) points a rotonda at Majere.} {
#t+ beenzapped
#var igotteleported 0
#var rotuser %1
}
edit also:
#tr {@rotuser slowly fades into existence.} {#t- beenzapped;use golden;#3 knockout @rotuser}



Edwub the Mage
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Thu Feb 20, 2003 5:48 pm   
 
yup, that looks fine

--------

moon.icebound.net:9000
Reply with quote
Edwub
Wanderer


Joined: 21 Nov 2002
Posts: 85
Location: USA

PostPosted: Fri Feb 21, 2003 1:02 am   
 
Emit, i love you!
It works excellent!
Had a buddy emote a rotonda, then actually do it.

Whoo =)

Edwub the Mage
Reply with quote
Edwub
Wanderer


Joined: 21 Nov 2002
Posts: 85
Location: USA

PostPosted: Fri Feb 21, 2003 1:05 am   
 
Ack, actually, found a little problem.
I probably won't always be teleported to immediately, or i may try to run.

I teleported to a mob in a city, and the trigger went off.

What I think I will do is this, and please tell me if you have a better idea :)

class beenzapped
has two classes within it, prepare and the deed
class prepare is just the actual rotonda, and then holding the golden. Once i hold it, i turn that class off. Turn the 2nd part on.
And class two is if the person teleports to me, and then if they do, that class goes off.
If not, i'll reset the rotuser variable myself.


Edwub the Mage
Reply with quote
Edwub
Wanderer


Joined: 21 Nov 2002
Posts: 85
Location: USA

PostPosted: Fri Feb 21, 2003 1:15 am   
 
Addition, sorry to lay it on.

The trigger still sets off if i look manually.


| 1790H 616M 1572V >
Ezikiel points a rotonda at Majere.

| 1790H 616M 1572V > look
The Great Temple of Moonglow [ N E S W U ]
remove hold
hold golden
You entered a b

Asked him to emote it. Is it possible within 6.16 to make sure the room name is on the next line of rotonda?
Otherwise when I type look it will go off.

would look like

Saber points a rotonda at Majere.
In Dirty Water [ N E S W ]

Edwub the Mage
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Fri Feb 21, 2003 2:01 am   
 
from your revised trigger:
quote:

#trigger {(%w) points a rotonda at Majere.} {
#t+ beenzapped
#var igotteleported 0
#var rotuser %1
}



did you take out the line:

#alarm +1 {#if (@igotteleported = 0) {#t- beenzapped}}

this line should turn off the class with the other triggers if the room name one hadn't fired within 1 second. this seemed the simplest way at the time to turn off the triggers that had you hold the golden and use it if you got zapped but not teleported, and it's the key to defeating the emotes. A second option would be to use %line2 variable in the roomname trigger like this:

#if (%line2 =~ ^%w points a rotanda at Majere.) {#NOOP i've seen a room name and the line right before it was someone zapping me.}

--note: i'm not sure if the =~ operator needs the second argument to be enclosed in doublequotes or brackets.

--------

moon.icebound.net:9000
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Feb 21, 2003 9:08 am   
 
Wouldn't it be simpler to just use a two-line trigger?
#TR {^(%w) points a rotonda at Majere.$%x *~[ * ~]} {remove hold;hold golden;use golden;knockout %1;knockout %1;knockout %1}

Then again, there's nothing friendly about using aggressive emotes (imitating actual attacks), so perhaps you should just keep the trigger the way you originally had it. If Saber gets hurt a few times, perhaps he'll stop trying to abuse your triggers.

LightBulb
Advanced Member
Reply with quote
Edwub
Wanderer


Joined: 21 Nov 2002
Posts: 85
Location: USA

PostPosted: Fri Feb 21, 2003 11:11 am   
 
Lightbulb, the Rotonda isn't agressive, it just can move me out of a safe room.
The aggressive act is when he teleports to me, prolly to attack me. Can't really use your trigger.

And I found out why, you pinpointed it Emit - forgot to add the alarm in.
Rockin =)

Thanks everyone!

Edwub the Mage
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Fri Feb 21, 2003 3:12 pm   
 
OH! a two line trigger would be a good solution, didn't even think of it. The other one should work as well though

--------

moon.icebound.net:9000
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