Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on $*:text:/!svarlies (add)/Si:#:{
- if ($nick isop #) {
- if ($0 < 3) { msg # Il manque des paramètres : utilise !svarlies <add> <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 dispose désormais de $readini(Points.ini,$+(#,.,$3),Points) Svarlies. }
- }
- else { msg $chan Dommage, tu n'es pas encore modérateur, un jour peut-être Kappa. }
- }
- on $*:text:/!svarlies (remove)/Si:#:{
- if ($nick isop #) {
- if ($0 < 3) { msg # Il manque des paramètres : utilise !svarlies <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 dispose désormais de $readini(Points.ini,$+(#,.,$3),Points) Svarlies. }
- }
- else { msg $chan Dommage, tu n'es pas encore modérateur, un jour peut-être Kappa. }
- }
- ON *:PART:#: {
- if ($nick !== $me) { $+(.timerpoints.,#,.,$nick) off }
- elseif ($nick == $me) { $+(.timerpoints.,$chan,*) off }
- }
- ON !*:JOIN:#: {
- $+(.timerpoints.,#,.,$nick) 0 60 add.pts $+(#,.,$nick)
- add.pts $+(#,.,$nick)
- }
- alias add.pts {
- if (!$1) { $+(.timerpoints.,$1) off | return }
- var %f = $mircdirpoints.ini
- var %p = $readini(%f,$1,Points)
- writeini -n $qt(%f) $1 Points $calc(%p + 10)
- }
- on *:text:!topsvarlies*:#: {
- if ($1 != !topsvarlies) 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) {
- 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 svarlies :
- var %i = 1
- while (%nbLoop >= 1) {
- %string = %string $+ $+($chr(32),%i,$chr(46),$chr(32)) %name [ $+ [ %nbLoop ] ] $+($chr(32)) %max [ $+ [ %nbLoop ] ] svarlies. ||
- dec %nbLoop
- inc %i
- }
- msg $chan %string
- }
- on *:text:!startuptime:#: {
- msg # Chrono démarré
- set -e %uptime. [ $+ [ # ] ] $ctime
- }
- on *:text:!uptime:#: { msg # En ligne depuis $duration($calc($ctime - %uptime. [ $+ [ # ] ] )) }
- on *:text:!stopuptime:#: {
- msg # Fin du chrono. Durée du stream aujourd'hui : $duration($calc($ctime - %uptime. [ $+ [ # ] ] ))
- unset %uptime. [ $+ [ # ] ]
- }
- ON !*:TEXT:*:#: {
- tokenize 32 $strip($1-)
- if ($1 == !svarlies) {
- if ($2) {
- var %f = $mircdirpoints.ini
- var %nc = $chan $+ . $+ $2
- var %r = $readini(%f,n,%nc,Points)
- if (!%r) { .msg $chan ( $+ $nick $+ ): The $qt($2) nickname does NOT have any Svarlies yet! }
- elseif (%r) { .msg $chan ( $+ $nick $+ ): The $qt($2) nickname have %r Svarlies. }
- }
- elseif (!$2) {
- var %f = $mircdirpoints.ini
- var %nc = $chan $+ . $+ $nick
- var %r = $readini(%f,n,%nc,Points)
- if (!%r) { .msg $chan ( $+ $nick $+ ): You have NOT any Svarlies yet! }
- elseif (%r) { .msg $chan ( $+ $nick $+ ): You have %r Svarlies. }
- }
- }
- if ($1 == !sound) {
- if $($+(%,floodsound.,$nick),2) { return }
- set -eu30 %floodsound. $+ $nick On
- var %fp = $mircdirpoints.ini
- var %nc = $chan $+ . $+ $nick
- var %p = $readini(%fp,%nc,Points)
- if (!%p) { .msg $chan Désolé $+ $nick $+ mais tu n'as pas assez de Svarlies, il t'en faut 100 Kappa | return }
- if (%p < 80) { .msg $chan Désolé $+ $nick $+ tu dois avoir au moins 100 Svarlies pour jouer un son | return }
- if (!$2) { .msg $chan Essaye encore $+ $nick $+ , il faut le nom du son que tu veux après la commande ! De plus jouer un son coûte 100 svarlies ! | return }
- var %dir = C:\Users\Valentin\Desktop\Streaming\Sons
- var %dir2 = C:\Users\Valentin\Desktop\Streaming\Images
- if (!$isdir(%dir)) { .msg $chan ( $+ $nick $+ ): Error, The $qt(%dir) direction does NOT exist! | return }
- var %f = %dir $+ \ $+ $2 $+ .mp3
- var %ff = %dir2 $+ \ $+ $2 $+ .gif
- if (!$isfile(%f)) { .msg $chan $+ $nick $+ ,le fichier $qt($2) n'existe pas | return }
- .splay -p $qt(%f)
- if ($isfile(%ff)) { .run $qt(%ff) }
- writeini -n $qt(%fp) %nc Points $calc(%p - 100)
- .msg $chan Tu viens de perdre 100 Svarlies, $+ $nick $+ . Patience, le son arrive Kappa . Tu pourras réessayer dans 30 secondes
- }
- if ($1 == !soundtotal) {
- var %dir = C:\Users\Valentin\Desktop\Streaming\Sons
- if (!$isdir(%dir)) { .msg $chan ( $+ $nick $+ ): Error, The $qt(%dir) direction does NOT exist! | return }
- var %t = $findfile(%dir,*.mp3,0)
- if (%t) { .msg $chan ( $+ $nick $+ ): There is NOT any sound file on the $qt(%dir) direction! }
- elseif (%t) { .msg $chan ( $+ $nick $+ ): Il y a %t sons disponibles. }
- }
- if ($1 == !soundlist) {
- var %dir = C:\Users\Valentin\Desktop\Streaming\Sons
- if (!$isdir(%dir)) { .msg $chan ( $+ $nick $+ ): Error, The $qt(%dir) direction does NOT exist! | return }
- var %t = $findfile(%dir,*.mp3,0)
- var %i = 1
- while (%i <= %t) {
- var %s = $findfile(%dir,*.mp3,%i)
- if (%s) {
- var %sf = $nopath(%s)
- var %sf = $remove(%sf,.mp3)
- var %list = $addtok(%list,%sf,32)
- }
- inc %i
- }
- if (%list) { .msg $chan $+ $nick $+ , les sons disponibles sont : %list }
- elseif (!%list) { .msg $chan ( $+ $nick $+ ): There is NOT any sound file on the $qt(%dir) direction! }
- }
- ; ---
- if ($1 == !imagetotal) {
- var %dir = C:\Users\Valentin\Desktop\Streaming\Images
- if (!$isdir(%dir)) { .msg $chan ( $+ $nick $+ ): Error, The $qt(%dir) direction does NOT exist! | return }
- var %t = $findfile(%dir,*.gif,0)
- if (%t) { .msg $chan ( $+ $nick $+ ): There is NOT any image file on the $qt(%dir) direction! }
- elseif (%t) { .msg $chan ( $+ $nick $+ ): Il y a %t sons disponibles. }
- }
- if ($1 == !imagelist) {
- var %dir = C:\Users\Valentin\Desktop\Streaming\Images
- if (!$isdir(%dir)) { .msg $chan ( $+ $nick $+ ): Error, The $qt(%dir) direction does NOT exist! | return }
- var %t = $findfile(%dir,*.gif,0)
- var %i = 1
- while (%i <= %t) {
- var %s = $findfile(%dir,*.gif,%i)
- if (%s) {
- var %sf = $nopath(%s)
- var %sf = $remove(%sf,.mp3)
- var %list = $addtok(%list,%sf,32)
- }
- inc %i
- }
- if (%list) { .msg $chan $+ $nick $+ , les sons disponibles sont : %list }
- elseif (!%list) { .msg $chan ( $+ $nick $+ ): There is NOT any image file on the $qt(%dir) direction! }
- }
- if ($1 == !review) {
- var %f = $mircdirpoints.ini
- var %nc = $chan $+ . $+ $nick
- var %p = $readini(%f,%nc,Points)
- if (!%p) { .msg $chan Désolé $+ $nick $+ mais tu n'as pas assez de Svarlies. Il t'en faut 200 Kappa | return }
- if (%p < 200) { .msg $chan Désolé $+ $nick $+ tu n'as pas assez de Svarlies. Il t'en faut 200 Kappa | return }
- writeini -n $qt(%f) %nc Points $calc(%p - 200)
- .msg $chan Vous venez de payer 200 Svarlies. Merci d'indiquer votre $chr(35) de clan et votre pseudo afin que je puisse faire la review PogChamp
- }
- }
- alias isdigit {
- if (!$1) { return 0 }
- if ($regex($1,^\d+$)) { return 1 }
- else { return 0 }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement