Code Monkey home page Code Monkey logo

mirc-twitch-scripts's People

Contributors

blasman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mirc-twitch-scripts's Issues

Silly request/question

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:

  1. What are the commands available for BlasBot? They are not included in the wiki
  2. How do I check how many points I have on the overral?

Thanks in advance!

Autohost.mrc

Twitch has changed the api version. And the script stopped working. Could you rewrite the script to the new version of api (helix)?

Problem with roulette

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)?

Improve adding / removing points avoiding race conditions

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!

Slots not working properly anymore

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?

Having mTwitch.DisplayName.mrc issues

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?

Slots won't turn on?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.