|
scobie Beginner
Joined: 01 Nov 2002 Posts: 24 Location: Sweden
|
Posted: 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"... |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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 |
|
|
|
scobie Beginner
Joined: 01 Nov 2002 Posts: 24 Location: Sweden
|
Posted: Fri Nov 01, 2002 6:47 am |
Thanks a bunch, worked like a charm!
|
|
|
|
|
|