|
SRPrice Beginner
Joined: 19 Jul 2007 Posts: 18
|
Posted: Fri Aug 31, 2007 11:34 am
AutoGrats Script |
I think I'm just missing something simple, but I was attempting to write an Auto Congratulations bot. However, I don't want it to congratulate me. I thought I had it down, but it still gives me congrats too.
#TRIGGER {^INFO: Everyone rejoices as (%w) obtains level *.} {#IF (%1 <> %char) {shout Grats %1! ~@wAutomessage and random social~@Y;shout *random %1} {shout Go me! ~@wAutomessage from Gratsbot!~@Y}}
idea is, if it is a player other than me, it shouts a grats, does a random social, and if it is me, simply shouts "go me".
However, it is currently shouting Grats and doing the social, even on me.
Or should I just drop the %char and just type in my char name? |
|
|
|
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Fri Aug 31, 2007 12:18 pm |
Code: |
#if ((%1!=%char)) {shout Grats %1! ~@wAutomessage and random social~@Y;shout *random %1} {#say Its me who got the level, no shouting needed!}
|
This should do it. Just remember that != means "is not".
Hope it helps.
Prog |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Fri Aug 31, 2007 3:52 pm |
Just make sure your character is defined in the use of autoconnect. You don't have to have the password, but you do need to fill in the character name. Otherwise, the %char is blank, and it'll always fire on your name. Alternatively, you can just set up a variable @char, then set your trigger to go off that.
Code: |
#VAR char {SRPrince}
#TRIGGER {^INFO: Everyone rejoices as (%w) obtains level *.} {#IF (%1!=@char) {shout Grats %1! ~@wAutomessage and random social~@Y;shout *random %1} {shout Go me! ~@wAutomessage from Gratsbot!~@Y}} |
As always, make sure you're not breaking any mud rules. On Aardwolf, it's illegal to have channel triggers. :P
Charneus |
|
|
|
|
|
|
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
|
|