I'm not sure if this is even possible or not but I am coding a chatbot for a friend of mine who we designed a system called the bscup.
What we are looking to do is using the vars.ini file because the counters are %bsxist.times so in the vars.ini file it will be %bsxist.times 1.... so on and so forth.. back to the original question, is is possible by using the vars.ini file to make a script that reads through it and picking a winner with the highest number of credits in the cup and post it to the channel. Then after it is posted be able to clear the counters to 0 for the next chapter of the story.
Below is the current code being used.
on *:TEXT:!bstrec:#: { if ($chan == #xxxxxxx) { if ($nick isop #) { if ($1 == !bstrec) { inc %bstrec.times | .msg $chan Uh yeah...Aliens! ... And another credit added to Trecs Bullshit Cup! %bstrec.times credits have landed in the cup!! } } } }
You dont need to read vars.ini. If you store users points in %vars, like %points.username1, %points.username2, etc. - you can use $var(%points.*,0) to get total number of them and then check one by one with $var(%points.*,%x) to find winner.
I already maintain currently 3 irc chatbots for 3 different streamers, I enjoy being able to learn how scripting works. and being able to have full control of the aspects and how they work.