Yes sure
on *:TEXT:!buyticket &:#:{
if (%raffle == 1) {
var %max = %maxticket. $+ $nick
var %maxtest = %max + $2
if (%maxtest > 10) {
msg $chan Sorry $nick but you can only up to 10 tickets
/halt
}
if ($2 > 10) {
msg $chan Sorry $nick but you can only up to 10 tickets
}
if ($2 < 11) {
var %i = 0
var %ticket = $2
var %topic = $+(#,.,$nick)
var %user = $readini(Points.ini,%topic,Points)
var %end = 10 * %ticket
var %delete = %user - %end
if (%delete > 0) {
writeini -n Points.ini %topic Points %delete
while (%i < %ticket) {
write Raffle.txt $nick
%i = %i + 1
}
msg $chan $nick You Have Bought %ticket Tickets For %end Points.
set %maxticket. $+ $nick %maxtest
}
if (%topic,points < 0) {
msg $chan Sorry $nick You Don't Have Enough Points To Buy %ticket Tickets!
}
}
}
This should work, then you just need to clear all those to start a new one, (if you wanna know how to remove more than 1 variable that contains word you need to ask someone else, i don't know if it even works)
This script has not been tested, but it should work
--
set %maxticket. $+ $nick %maxtest Makes a variable %maxticket.thename
--
if (%maxtest > 10) {
msg $chan Sorry $nick but you can only up to 10 tickets
/halt
} This checks and stops if its above 10
--
var %max = %maxticket. $+ $nick
var %maxtest = %max + $2
This calculate the numbers to check if its above 10