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
scobie
Beginner


Joined: 01 Nov 2002
Posts: 24
Location: Sweden

PostPosted: Fri Nov 01, 2002 12:10 am   

Checkin if a CLASS is on from within a TRIGGER?
 
Is it possible to check if a class is on from within a trigger or alias?

Sorta like:
#ALIAS {foobar} {#IF {#CLASS test} {#SA foo} {#SA bar}}

Then if i do a #T+ test and then it should output "foo", #T- test outputs "bar"...
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Nov 01, 2002 12:34 am   
 
quote:

Is it possible to check if a class is on from within a trigger or alias?

Sorta like:
#ALIAS {foobar} {#IF {#CLASS test} {#SA foo} {#SA bar}}

Then if i do a #T+ test and then it should output "foo", #T- test outputs "bar"...



You have the right idea, except that you can't use #commands in the conditional portion of a #command/within functions. Check out the Function Wizard for %class() and %trigger(), they do exactly what you want.

Speaking of which, if those two functions are exactly the same (according to the help system over here with my copy) why is one still around? Backwards compatibility?

li'l shmoe of Dragon's Gate MUD
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Nov 01, 2002 5:51 am   
 
Backwards compatibility is probably correct. Version 6.16 uses %trigger(), %class() must be a beta addition.

LightBulb
Senior Member
Reply with quote
scobie
Beginner


Joined: 01 Nov 2002
Posts: 24
Location: Sweden

PostPosted: Fri Nov 01, 2002 6:47 am   
 
Thanks a bunch, worked like a charm!
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