Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Alias que cuenta leches
- alias leches {
- ; Se puede indicar el numero maximo con $1, si no, cuenta hasta 100
- ; Tiempo de espera con $2, si no cada segundo cuenta 1 leche
- ; Si se indica "on" o "off" como argumento, se activa o desactiva la cuenta infinita
- ; Tambien se puede indicar el tiempo con $2, que si no se indica será de 1 segundo
- if ( $2 isnum ) var %tiempo = $2
- else var %tiempo = 1
- if ( $1 == on ) cuentaleche %tiempo #
- elseif ( $1 == off ) .timerleches off
- else {
- if ( $1 isnum ) var %max = $1
- else var %max = 100
- echo -a Contando hasta %max
- var %i = 0
- while ( %i < %max ) {
- inc %leches
- .timer 1 $calc(%i * %tiempo) msg # %leches leches
- inc %i
- }
- }
- }
- alias -l cuentaleche {
- ; Se pasa como parametro el tiempo de espera y el target (canal o privado)
- inc %leches
- msg # %leches leches
- .timerleches 1 $1 cuentaleche $1
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement