So, I have a code for a points system on my bot. These points are used to purchase song requests etc. She will automatically draw -50 points whenever someone buys a song. But what I want her to do is reply with the user's points before & after and make an if statement that if they haven't got enough coins, run another message.
This is what I have so far:
on *:text:!buysong:#kuyaace00: {
if ((%floodbuysong) || ($($+(%,floodbuysong.,$nick),2))) { return }
set -u10 %floodbuysong On
set -u30 %floodbuysong. $+ $nick On
msg $chan $nick just purchased a song request, from $chan $+ . Removed 50 coins from $nick $+ .
var %topic $+($chan,.,$nick)
var %points $calc($readini(Points.ini,%topic,Points) - 50)
writeini -n Points.ini %topic Points %points
return %points
}
and, for a full code of my points system, go here:
http://pastebin.com/YXE8dvEf