Blasman / mIRC-Twitch-Scripts

Various scripts and games to use with a mIRC bot designed for Twitch.tv
30 stars 15 forks source link

Problem with roulette #4

Closed Calver closed 7 years ago

Calver commented 8 years ago

Hi, I'm using the standalone version of the roulette from here: http://hawkee.com/snippet/16642/

It works for a bit, then stops working. I can still type !money and !top5 etc, and also can place bets, but the roullete never spins and thus never resets. I faintly remember something about a timer error on line 204 (not sure if related, I just remember this)?

Calver commented 8 years ago

This may help (the file you provided and the slightly modified version I'm using (whispers system) https://www.diffchecker.com/mavl5wy7

Blasman commented 8 years ago

If you are using SReject's JSON and mTwitch scripts, the original script should work just fine. You could just change the "MSG $chan" to "MSG $nick" to have the script whisper a user instead of post in chat. Although the modifications that you made should probably work just as well. Good luck. :)

Calver commented 8 years ago

Are mTwitch scripts required?

Blasman commented 8 years ago

Unless you modify the script like you have already, I would assume that they are. I may have overlooked that detail on the Hawkee webpage. O_o

Calver commented 8 years ago

I added the mTwitch files and it still happens, strange... :/

Calver commented 8 years ago

It starts working again if I delete roulbets.txt and roulette.ini

Blasman commented 8 years ago

roulbets.txt should automatically get deleted after every game of roulette. The script on Hawkee doesn't have anything written in it to check if roulbets.txt exists already (from a PC/mIRC crash or closing mIRC in the middle of a roulette game, for example). I just now added some lines on the hawkee version to check and delete roulbets.txt if it exists when using the !rbet on and !rbet off commands. Other than that, I am unsure what is happening and I am more focused on working on the scripts here on my GitHub rather than the scripts that I posted on Hawkee. Thanks. :)

Calver commented 8 years ago

Just wondering, how could I make the script whisper the winners telling them they've won instead of posting to the whole of the chat? I see I need to use %winnersList but not sure now