on *:TEXT:hello:#: {
if ((%floodhello) || ($($+(%,floodhello.,$nick),2))) { return }
set -u10 %floodhello On
set -u30 %floodhello. $+ $nick On
msg $chan Hello $nick , and welcome to Buller's Stream! $+
}
on *:TEXT:hallo:#: {
if ((%floodhello) || ($($+(%,floodhello.,$nick),2))) { return }
set -u10 %floodhello On
set -u30 %floodhello. $+ $nick On
msg $chan Hello $nick , and welcome to Buller's Stream! $+
}
on *:TEXT:when is the giveaway:#: {
$chan $nick The GiveAway is when Buller says so Dont forget to follow if you want to win!
}
on *:text:!hi:#:{
if ($nick isop #) { msg # Hi there! }
else { msg # Sorry you cannot use this command }
}
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:!bulls:#:{
if ((%floodpoints) || ($($+(%,floodpoints.,$nick),2))) { return }
set -u5 %floodpoints On
set -u30 %floodpoints. $+ $nick On
msg # $nick has $readini(Points.ini,$+(#,.,$nick),Points) bulls.
}
on $*:text:/!bulls (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) bulls. }
}
else { msg $chan This command is only available to moderators. }
}
on !*:join:#:{
$+(.timerpoints.,#,.,$nick) -o 0 600 add.pts $+(#,.,$nick)
add.pts $+(#,.,$nick)
}
raw 366:*:{
var %i = 1
while ($timer(%i)) {
if ($+(points.,$2,.,*) iswm $v1) {
var %a = $v2
if ($gettok(%a,-1,46) !ison $2) { .timer $+ %a off | continue }
}
inc %i
}
}
on !*:part:#:$+(.timerpoints.,#,.,$nick) off
alias -l add.pts {
writeini -n Points.ini $1 Points $calc($readini(Points.ini,$1,Points) + 1)
}
on *:text:!ticket:#:{
if ($hget($+(tickets.,#),$nick)) { msg # $nick You already have a ticket! | return }
var %topic = $+(#,.,$nick)
; Check if enough points
if ($readini(Points.ini,%topic,Points) >= 20) {
; Deduct the points
var %a = $v1 - 20
writeini Points.ini %topic Points %a
; Add the user to tickets.#channel hash table, creating the table if it doesn't exist
hinc -m $+(tickets.,#) $nick
msg # $nick You bought a ticket, you now have %a points.
}
else msg # $nick Sorry, you only have $v1 points.
}
on *:text:!ticket roll:#:{
if ($nick == Bullerbums) {
if ($hget($+(tickets.,#))) {
var %i = $r(1,$hget(,0).item
msg # The winner is $hget($+(tickets.,#),%i).item
; The next line frees the table (all data in it is gone)
hfree $+(tickets.,#)
}
else msg # Sorry $nick there is no such table $+(tickets.,#)
}
else msg # $nick Only Mods can use that command.
}