Code: Select all
on *:join:#: {
if ($readini(barserv.ini,money,$nick) >= 0) { notice $nick You've been here before | halt }
else /writeini barserv.ini money $nick 50.00 | notice $nick You received 50.00 Euro to spend by me.
}
on *:text:.pay*:#: {
if (%cmd == off) { notice $nick Wait until the commands working. | halt }
if (%cmd == on) && ($2 == topic) && (10.00 >= $readini(barserv.ini,money,$nick)) { notice $nick You don't have enough money. | halt } else { notice $nick First there must be paid. | set %cmd off | timer 1 20 set %cmd on | notice $nick The payment will start. | msg %bot calc $readini(barserv.ini,money,$nick) - $readini(barserv.ini,costs,topic) | set %nick $nick | topic # $3- | halt }
}
on *:text:.+costs*:#: {
if (%cmd == off) { notice $nick Wait until the commands working | halt }
if (%cmd == on) { writeini barserv.ini costs $2 $3 | set %cmd off | timer 1 20 set %cmd on | halt }
}
on *:text:Calc*:?: {
/writeini barserv.ini money %nick $6 | close -m
}
on *:text:.money:#: {
notice $nick You have $readini(barserv.ini,money,$nick) Euro.
}