mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2015
Posts: 4
S
Sanibak Offline OP
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Aug 2015
Posts: 4
Hello, I am trying to make a script that will stop "pyramids" that some people like to post in twitch chat.

For example, a successful 3 level pyramid would look like this:

Kappa
Kappa Kappa
Kappa Kappa Kappa
Kappa Kappa
Kappa

Someone could make more than 3 levels, but I want to stop it before it even gets that far.

I am trying to make a script time the person out once someone has gotten to the third level of the pyramid, but I am not sure how to implement this.

I have found several variations of anti-repeat scripts, but my modifications didn't work. For instance, I tried modifying http://hawkee.com/snippet/4150/ and failed to do what I wanted.

Thanks for any help.

Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
Count Kappa-messages for $nick - more then 1 message in 1\2\3\10\60 secs - timeout for 10 minutes.


Dont give a fish - teach to fish!
Joined: Aug 2015
Posts: 4
S
Sanibak Offline OP
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Aug 2015
Posts: 4
Kappa was just an example, but this is what I came up with. It seems to work ok, but there might be some cases I haven't thought of that would break it.

Code:
on ^*:text:*:#: {
  var %md = $readini(logs.ini,$nick,last)

  writeini -n logs.ini $nick last $1-

  if (%pcount == $null) { set -u0 %pcount = 0 }

  if ($calc($count($1-, $1) - $count(%md, $1)) == 1) {
    %pcount = %pcount + 1
  }

  if ($count(%md, $1) == $count($1-, $1)) { %pcount = 0 }
  if ($count(%md, $1) == 0) { %pcount = 0  }
  if (%md == $1-) { %pcount = 0 }
  if (%pcount >= 2) {
    msg $chan .timeout $nick
    %pcount = 0
  }
}

Last edited by Sanibak; 19/02/16 11:57 PM.

Link Copied to Clipboard