|
l33tsupah4x0r Beginner
Joined: 16 Sep 2003 Posts: 15 Location: Malaysia
|
Posted: Wed Oct 08, 2003 4:51 am
!8ball trigger abusive problem |
Basically have an !8ball trigger, people keep constantly abusing it :P
Like for example, asking the same question over and over again :P It's ok to ask same question after like 2 or 4 minutes, but every 30 seconds the same question ;P
Like for example
gg -- ' !8ball Am i sexy?'
gg -- ' !8ball Am i sexy?'
gg -- ' !8ball Am i sexy?'
gg -- ' !8ball Am i sexy?'
gg -- ' !8ball Am i sexy?'
Kinda spammy stuff, is there a way for me to fix this?
Here's my code
#trigger %1 -- '(*) !8ball %2'
#command
gt c11%1 c02: %case( %random( 1, 20), "Signs point to yes", "Yes", "Reply hazy, try again", "Without a doubt", "My sources say no", "As I see it, yes", "You may rely on it", "Concentrate and ask again", "Outlook not so good", "It is decidedly so", "Better not tell you now", "Very doubtful", "Yes - definitely", "It is certain", "Cannot predict now", "Most likely", "Ask again later", "My reply is no", "Outlook good", "Don't count on it") |
|
|
|
l33tsupah4x0r Beginner
Joined: 16 Sep 2003 Posts: 15 Location: Malaysia
|
Posted: Fri Oct 10, 2003 10:04 am |
So this can't be fixed then?
|
|
|
|
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Fri Oct 10, 2003 1:13 pm |
quote: Originally posted by l33tsupah4x0r
So this can't be fixed then?
Reply hazy, try again
Sorry, couldn't resist. [}:)]
How important is this? Are you blamed for creating the spam?
If you don't mind the overhead, you could create a stringlist of player names and add a name each time a player asks a question, then delete the first element in the queue every xx seconds using an #ALARM. If the player's name is in the queue already when they ask a question, then you can ignore them, or create even more spam by telling them they already asked a question. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Oct 10, 2003 4:43 pm |
The quickest (and most obvious) way to fix this is to delete or disable the trigger. It doesn't do anything useful anyway.
Since you probably won't do that, you can stop spamming by just disabling the trigger every time it fires. Since you specified 2 or 4 minutes, I took the average of 3 minutes (180 seconds).
Pattern: (*) -- '* !8ball (*)'
Value: #T- 8ball
#ALA 8ball1 +180 {#T+ 8ball}
gt c11%1 c02: %case( %random( 1, 20), "Signs point to yes", "Yes", "Reply hazy, try again", "Without a doubt", "My sources say no", "As I see it, yes", "You may rely on it", "Concentrate and ask again", "Outlook not so good", "It is decidedly so", "Better not tell you now", "Very doubtful", "Yes - definitely", "It is certain", "Cannot predict now", "Most likely", "Ask again later", "My reply is no", "Outlook good", "Don't count on it")
Options: ID = 8ball |
|
|
|
comte Newbie
Joined: 03 Oct 2003 Posts: 4 Location: USA
|
Posted: Fri Oct 10, 2003 5:36 pm |
Another approach would be to store the name of the last person to use the trigger in a variable and then block them from using it again until another person uses it first. Something like:
#trigger %1 -- '(*) !8ball %2'
#command
#if (%1 = @last8) {#noop} {#va last8 %1; gt c11%1 c02: %case( %random( 1, 20), "Signs point to yes", "Yes", "Reply hazy, try again", "Without a doubt", "My sources say no", "As I see it, yes", "You may rely on it", "Concentrate and ask again", "Outlook not so good", "It is decidedly so", "Better not tell you now", "Very doubtful", "Yes - definitely", "It is certain", "Cannot predict now", "Most likely", "Ask again later", "My reply is no", "Outlook good", "Don't count on it")}
I don't have access to zmud right now so I haven't tested this. You may need to play with the syntax but the idea should work. |
|
|
|
l33tsupah4x0r Beginner
Joined: 16 Sep 2003 Posts: 15 Location: Malaysia
|
Posted: Fri Oct 10, 2003 7:10 pm |
Thanks all, using comte's suggestion :> though by using it same person can't ask different question
so i set an alarm to change #va last8 every 10 secs :P |
|
|
|
comte Newbie
Joined: 03 Oct 2003 Posts: 4 Location: USA
|
Posted: Fri Oct 10, 2003 7:34 pm |
If you are more interested in preventing a person from repeatedly asking the same question, you could save the last question asked (%2) instead of last person (%1). That way a person can ask as many questions as s/he wants as long as the question is different:
#if (%2 = @last8) {#noop} {#va last8 %2; gt c11%1 c02: %case( %random( 1, 20), "Signs point to yes", "Yes", "Reply hazy, try again", "Without a doubt", "My sources say no", "As I see it, yes", "You may rely on it", "Concentrate and ask again", "Outlook not so good", "It is decidedly so", "Better not tell you now", "Very doubtful", "Yes - definitely", "It is certain", "Cannot predict now", "Most likely", "Ask again later", "My reply is no", "Outlook good", "Don't count on it")} |
|
|
|
l33tsupah4x0r Beginner
Joined: 16 Sep 2003 Posts: 15 Location: Malaysia
|
Posted: Sat Oct 11, 2003 8:11 am |
Yeah but then they'd go
Am i sexy?
Am i sexy??
Am i sexy??
=) |
|
|
|
|
|
|
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
|
|