Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:TEXT:hello:#: { if ((%floodyhello) || ($($+(%,floodhello.,$nick),2))) { return }
- set -u10 %floodhello On
- set -u30 %floodhello. $+ $nick On
- msg $chan Hello $nick
- }
- alias -l addPoints {
- if ($1 !isnum) { echo 2 -st $1 is not a number. It needs to be a number. | halt }
- var %topic $+($chan,.,$nick)
- var %points $calc($readini(Points.ini,%topic,Points) + $1)
- writeini -n Points.ini %topic Points %points
- return %points
- }
- alias -l lookUpPoints {
- var %topic $+($chan,.,$nick)
- var %points $readini(Points.ini,%topic,Points)
- return %points
- }
- alias doaddpoints {
- if ($3 !isnum) { echo 2 -st $3 is not a number. It needs to be a number. | halt }
- var %topic $+($1,.,$2)
- var %points $calc($readini(Points.ini,%topic,Points) + $3)
- writeini -n Points.ini %topic Points %points
- echo -a Added points for %topic
- }
- alias dorempoints {
- var %topic $+($1,.,$2)
- remini -n Points.ini %topic Points
- echo -a Removed points for %topic
- }
- on *:text:!points:#:{
- if ((%floodpoints) || ($($+(%,floodpoints.,$nick),2))) { return }
- set -u10 %floodpoints On
- set -u30 %floodpoints. $+ $nick On
- msg # $nick has $readini(Points.ini,$+(#,.,$nick),Points) total points.
- if (
- }
- on $*:text:/!points (add|remove)/Si:#:{
- if ($nick isop #) {
- if ($0 < 3) { msg # Insufficient parameters: Use !points <add|remove> <user> [number] | return }
- writeini -n Points.ini $+(#,.,$3) Points $calc($readini(Points.ini,$+(#,.,$3),Points) $iif($2 == add,+,-) $iif($4 isnum,$4,1))
- { msg $chan $3 now has $readini(Points.ini,$+(#,.,$3),Points) total points. }
- }
- else { msg $chan This command is only available to moderators. }
- }
- on !*:join:#:{
- $+(.timerpoints.,#,.,$nick) 0 300 add.pts $+(#,.,$nick)
- add.pts $+(#,.,$nick)
- }
- on !*:part:#:$+(.timerpoints.,#,.,$nick) off
- alias -l add.pts {
- writeini -n Points.ini $1 Points $calc($readini(Points.ini,$1,Points) + 5)
- }
- on *:text:!8ball*:#: { /set %8ball $rand(1,15) { if (%8ball == 1) { /msg $chan No! }
- elseif (%8ball == 2) { /msg $chan Yes! }
- elseif (%8ball == 3) { /msg $chan Maybe }
- elseif (%8ball == 4) { /msg $chan of Course! }
- elseif (%8ball == 5) { /msg $chan Are you crazy?!?! }
- elseif (%8ball == 6) { /msg $chan You may rely on it }
- elseif (%8ball == 7) { /msg $chan Without a doubt }
- elseif (%8ball == 8) { /msg $chan Signs point to yes }
- elseif (%8ball == 9) { /msg $chan Ask again later }
- elseif (%8ball == 10) { /msg $chan Computer says no }
- elseif (%8ball == 11) { /msg $chan Of course it is Kappa }
- elseif (%8ball == 12) { /msg $chan Concentrate and ask again }
- elseif (%8ball == 13) { /msg $chan Look behind you SSSsss }
- elseif (%8ball == 14) { /msg $chan If you wish }
- else { /msg $chan How should I know? } } }
- on *:text:!toppoints*:#: {
- if ($1 != !toppoints) return
- if ($0 == 1) {
- var %nbLoop = 5
- }
- elseif ($0 == 2) {
- if ($2 isnum) {
- if ($2 > 0 && $2 <= 10) {
- var %nbLoop = $2
- }
- else {
- msg $chan Wrong parameters. Number must be between 1 and 10
- return
- }
- }
- else {
- msg $chan Wrong parameters. Use !toppoints [number]
- return
- }
- }
- else {
- msg $chan Wrong parameters. Use !toppoints [number]
- return
- }
- var %i = 1
- var %j = 1
- var %channelLength = $calc($calc($len(#) + 1) * -1)
- var %done = 0
- while (%i <= %nbLoop) {
- var %max [ $+ [ %i ] ] 0
- var %name [ $+ [ %i ] ] unknown
- inc %i
- }
- while (%j <= $ini(Points.ini,0)) {
- var %section $ini(Points.ini,%j)
- var %points = $readini(Points.ini,%section,Points)
- var %fullname = $right(%section, %channelLength)
- if ($count(%fullname, nightbot) == 0 && $count(%fullname, xanbot) == 0 && $count(%fullname, twitchranks) == 0 && $count(%fullname, moobot) == 0 && $count(%fullname, maklo8) == 0) {
- var %x = %nbLoop
- while (%x >= 1) {
- if (%points > %max [ $+ [ %x ] ] && %done == 0) {
- var %y = 1
- var %z = 2
- while (%y <= %x) {
- if (%y < %x) {
- var %temp = %max [ $+ [ %z ] ]
- var %temp2 = %name [ $+ [ %z ] ]
- SET %max [ $+ [ %y ] ] %temp
- SET %name [ $+ [ %y ] ] %temp2
- }
- else {
- SET %max [ $+ [ %y ] ] %points
- SET %name [ $+ [ %y ] ] %fullname
- }
- inc %y
- inc %z
- }
- %done = 1
- }
- dec %x
- }
- }
- %done = 0
- inc %j
- }
- var %string = Top %nbLoop points :
- var %i = 1
- while (%nbLoop >= 1) {
- %string = %string $+ $+($chr(32),%i,$chr(46),$chr(32)) %name [ $+ [ %nbLoop ] ] $+($chr(32)) %max [ $+ [ %nbLoop ] ] pts
- dec %nbLoop
- inc %i
- }
- msg $chan %string
- }
- on *:text:!rand:# :msg $chan your random number is $r(1,1000000)
- on me:*:join:#:set %justjoined $addtok(%justjoined,$chan,32)
- on me:*:part:#:set %justjoined $remtok(%justjoined,$chan,32) | .timerlottery. $+ $chan off
- on *:disconnect unset %justjoined | .timerlottery.* off
- on *:op:#:{
- if ($opnick == $me) {
- if ($istok(%justjoined,$chan,32)) {
- $+(.timerlottery.,$chan) 0 60 lottery $safe($chan)
- }
- set %justjoined $remtok(%justjoined,$chan,32)
- }
- }
- alias lottery {
- var %winner $nick($1,$r(1,$nick($1,0)))
- var %point $gettok(5 10 20 30 40 50 60 70 80 150,$r(1,10),32)
- var %inisection $+($1,.,%winner)
- writeini -n Points.ini %inisection Points $calc($readini(Points.ini,%inisection,Points) + %point)
- msg $1 %winner wins %point points!
- }
- alias safe return $!decode( $encode($1-, m) ,m)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement