alias addLeon {
if ($1 !isnum) { echo 2 -st $1 is not a number. It needs to be a number. | halt }
var %topic $+($chan,.,$nick)
var %Leon $calc($readini(Leon.txt,%topic,Leon) + $1)
writeini -n Leon.txt %topic Leon %Leon
return %Leon
}
alias lookUpLeon {
var %topic $+($chan,.,$nick)
var %Leon $readini(Leon.txt,%topic,Leon)
return %Leon
}
alias doaddLeon {
if ($3 !isnum) { echo 2 -st $3 is not a number. It needs to be a number. | halt }
var %topic $+($1,.,$2)
var %Leon $calc($readini(Leon.txt,%topic,Leon) + $3)
writeini -n Leon.txt %topic Leon %Leon
echo -a Added Leon for %topic
}
alias doremLeon {
var %topic $+($1,.,$2)
remini -n Leon.txt %topic Leon
echo -a Removed Leon for %topic
}
on *:text:!Leon:#:{
if ((%floodLeon) || ($($+(%,floodLeon.,$nick),2))) { return }
set -u1 %floodLeon On
set -u3 %floodLeon. $+ $nick On
msg # $nick has $lookUpLeon total leon
}
on $*:text:/!Leon (add|remove)/Si:#:{
if ($nick isop #) {
if ($0 < 3) { msg # Insufficient parameters: Use !Leon <add|remove> <user> [number] | return }
writeini -n Leon.txt $+(#,.,$3) Leon $calc($readini(Leon.txt,$+(#,.,$3),Leon) $iif($2 == add,+,-) $iif($4 isnum,$4,1))
msg $chan $3 now has $readini(Leon.txt,$+(#,.,$3),Leon) total leon. }
else { msg $chan This command is only available to moderators. }
}
on $*:join:#:{
$+(.timerLeon.,#,.,$nick) 0 60 add.pts $+(#,.,$nick)
add.pts $+(#,.,$nick)
}
on $*:part:#:$+(.timerLeon.,#,.,$nick) off
alias -l add.pts {
writeini -n Leon.txt $1 Leon $calc($readini(Leon.txt,$1,Leon) + 1)
}
alias lookUpXp {
var %topic $+($chan,.,$nick)
var %XP $readini(Leon.txt,%topic,XP)
return %XP
}
on *:text:!xp:#:{
if ((%floodXP) || ($($+(%,floodXP.,$nick),2))) { return }
set -u1 %floodXP On
set -u3 %floodXP. $+ $nick On
if ($lookUpXp >= 1) { msg # $nick has $readini(Leon.txt,$+(#,.,$nick),XP) total XP
}
else {
msg # $nick has no XP
}
}
on $*:text:/!xp (add|remove)/Si:#:{
if ($nick isop #) {
if ($0 < 3) { msg # Insufficient parameters: Use !Leon <add|remove> <user> [number] | return }
writeini -n Leon.txt $+(#,.,$3) XP $calc($readini(Leon.txt,$+(#,.,$3),XP) $iif($2 == add,+,-) $iif($4 isnum,$4,1))
msg $chan $3 now has $readini(Leon.txt,$+(#,.,$3),XP) total XP. }
else { msg $chan This command is only available to moderators. }
}
on *:text:!hp:#:{
if ((%floodHP) || ($($+(%,floodHP.,$nick),2))) { return }
set -u1 %floodHP On
set -u3 %floodHP. $+ $nick On
if ( $readini(Leon.txt,$+(#,.,$nick),HP) > 0) { msg # $nick has $readini(Leon.txt,$+(#,.,$nick),HP) / 3 HP }
else {
msg # $nick is riPepperonis
}
}
on $*:text:/!hp (add|remove)/Si:#:{
if ($nick isop #) {
if ($0 < 3) { msg # Insufficient parameters: Use !hp <add|remove> <user> [number] | return }
writeini -n Leon.txt $+(#,.,$3) HP $calc($readini(Leon.txt,$+(#,.,$3),HP) $iif($2 == add,+,-) $iif($4 isnum,$4,1))
msg $chan $3 now has $readini(Leon.txt,$+(#,.,$3),HP) total HP. }
else { msg $chan This command is only available to moderators. }
}
on !*:join:#:{
$+(.timerhp.,#,.,$nick) 0 60 add.hp $+(#,.,$nick)
add.hp $+(#,.,$nick)
}
on !*:part:#:$+(.timerhp.,#,.,$nick) off
alias -l add.hp {
writeini -n Leon.txt $1 HP $calc($readini(Leon.txt,$1,HP) + 1)
}