blasman / mirc-twitch-scripts Goto Github PK
View Code? Open in Web Editor NEWVarious scripts and games to use with a mIRC bot designed for Twitch.tv
Various scripts and games to use with a mIRC bot designed for Twitch.tv
Twitch has changed the api version. And the script stopped working. Could you rewrite the script to the new version of api (helix)?
Title pretty much says it all, no idea where to start.
Thanks in advance
Beforehand, I would like to congratulate and thank you for your amazing and open source scripts. It works like a charm!
I have 2 questions regarding this bot:
Thanks in advance!
Hi, I am trying to setup slots on my channel. The !slot command works giving me the correct message in response. When I place a bet I am told that slot game is currently disabled, so I ran the !slot on command but nothing seems to happen. Thoughts?
Thanks.
I have been using these scripts for months with no issues. After the twitch client-ID api change I can not get my irc client to play nice. I narrowed it down to this script mTwitch.DisplayName.mrc
When this is loaded and I connect to irc.twitch.tv the status window shows I connect fine. The channel I am going into does not pop open at all, everything stays in the status window, user names ect. I see no chat.
Now when I unload mTwitch.DisplayName.mrc and reconnect I am able to get back into the channel fine like before and see chat / user list on the right.
Any idea what I might have to do to get around or fix this?
Hello,
I translated slots game in to my own language. Then I managed to make it work on my channel. However after a while it stopped working. When I write !slot 50 it just says the slot game is not on but I can't manage to turn it on with the command. All scripts were loaded and it was working normally before. I didn't change anything before it stopped working. Does anybody have any idea what could be the problem?
Do you have any mIRC scripts for notifying the chat of new follows and subscribers?
Hey Blasman!
I just took a look to a bit of your source code. I want to suggest an improvement. The aliases addpoints
and removepoints
are susceptible to a race conditions. Let me explain. Let's say someone is playing a game in your bot, but also the moment where Ankhbot update everyone's points is about to come. Say you executed the addpoints
function, so you're executing ankhbot.mrc line 37 that says:
var %sql_points = SELECT Points FROM CurrencyUser WHERE Name = ' $+ $1 $+ ' COLLATE NOCASE
var %request_points = $sqlite_query(%ankhbot_currency, %sql_points)
Now let's assume the moment the points are read by $sqlite_query
then Ankhbot starts updating anybody points because it's time (giving x points every y minutes in chat). Then your code addpoints
will have the old point amount and not the new, updated one. So the moment the code reaches this moment...
SET %newpoints = $calc(%ankhbot_points + $2)
sqlite_exec %ankhbot_currency UPDATE CurrencyUser SET Points %newpoints WHERE Name = ' $+ $1 $+ ' COLLATE NOCASE
You would've done the math by mistake with the old number. Same thing might happen in other cases (say, you're paying points from game A but you're also removing points from game B). If it's a small amount, then it's fine, I guess 50 points give or take could be simple, but if it is a big amount, then you'll be returning him plus the extra points or deleting him with the given amount as well.
I know the odds of this to happen are really close to zero, but it happens. This is how you can get Starbucks unlimited refills with a single gift card by redeeming it several times in the same second or so on.
To solve it? Simple: You will save a few lines. SQLite accepts something like this:
update CurrencyUser SET Points = Points + 1000 WHERE Name = 'PatrickDappollonio'
Same for deletion, you'te telling SQLite: "Add to whatever amount of points this guy has, plus 1000". You can rest, add and pretty much any math calculus there. If the user doesn't exists, the code should return that zero users were edited...
update CurrencyUser SET Points = Points + 1000 WHERE Name = 'PatrickDappollonioDoesntExists'
It will update no one, since that user PatrickDappollonioDoesntExists
doesn't indeed exists.
Have a great day!
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)?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.