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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Ggoss
Apprentice


Joined: 01 Nov 2006
Posts: 114

PostPosted: Sun Aug 15, 2010 12:02 am   

Trigger Help
 
Okay I'm trying to set up a rescue trigger, this is the mud output.


A deep crawler attacks XXXXX. [1 hits]

I want it to rescue XXXXX if XXXX is in my variable rgroup

this is what i've tried.

pattern:
(*) attacks (*).
value:
#if (%2 = @rgroup) {rescue @rgroup}

How do i set it so i can turn this off and on easily, I have it in a class called Rescue Trigs and what i have doesnt' seem to be workign correctly, what's wrong with it.

Thanks in advance.
Reply with quote
Ggoss
Apprentice


Joined: 01 Nov 2006
Posts: 114

PostPosted: Sun Aug 15, 2010 12:06 am   
 
Oh is there an easier way to add to @rgroup then go into the actual variable and just entering the names?
Reply with quote
shalimar
GURU


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

PostPosted: Sun Aug 15, 2010 2:41 am   
 
#ADDITEM rgroup thatguy
_________________
Discord: Shalimarwildcat
Reply with quote
shalimar
GURU


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

PostPosted: Sun Aug 15, 2010 2:47 am   
 
as for the class, I would suggest a simple push button to toggle it on or off with:

#IF (%class("Rescue Trigs")) {#T- "Rescue Trigs"} {#T+ "Rescue Trigs"}

It would also work in an alias.
Either way, this new setting needs to be outside of the class in question or else it gets turned off too and you have to go into the settings editor to turn it back on manually.
_________________
Discord: Shalimarwildcat
Reply with quote
Ggoss
Apprentice


Joined: 01 Nov 2006
Posts: 114

PostPosted: Sun Aug 15, 2010 3:35 am   
 
Any suggestions on what to do to make my trigger work? it doesn't seem to work.
Reply with quote
Ggoss
Apprentice


Joined: 01 Nov 2006
Posts: 114

PostPosted: Sun Aug 15, 2010 3:52 am   
 
Hrmm wonder if something like this would work, gave me a parsing error when i tried to input it.

#Trigger {(*) attacks ({@rgroup}).} {}
#cond {(*) attacks ({@rgroup}) {rescue %2}
Reply with quote
Ggoss
Apprentice


Joined: 01 Nov 2006
Posts: 114

PostPosted: Sun Aug 15, 2010 4:02 am   
 
Okay this seems to work right, anyone see something i should be doing that would make it better?

#if %ismember( %2, @rGroup) {rescue %2} {}
Reply with quote
shalimar
GURU


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

PostPosted: Sun Aug 15, 2010 7:25 pm   
 
#TR {(*) attacks ({@rgroup})} {rescue %2}

should work
_________________
Discord: Shalimarwildcat
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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