ztizzlegaming / CSGOWinBig

Open-source Counter-Strike: Global Offensive jackpot betting website.
MIT License
169 stars 104 forks source link

Bot giving too many items back as profit to me ***Important site breaking bug*** #182

Open krazzarkov opened 8 years ago

krazzarkov commented 8 years ago

Hello,

So I found a glitch which seems like it can break the site and even bring bad rep to our sites. Essentially the bot gives back profit trade offers to me when it shouldn't. For example today I tested out a couple of examples where two people bet only one item so there is a total of two items deposited. The winner only received one item out of the two (which was his in the first place) and the other item was given back to me as a profit. Here is screenshot: https://gyazo.com/4d7340f614e5648bf3fd418391716ad0 How can this bug be fixed?

Regards, Kraz

linkzy commented 8 years ago

I had two situations similar to this:

1)

The bot takes up to 5% comission, so, if one of the itens you had in the pot were over 95% of the value of the pot, the bot is going to give this item and keep all the rest...

Im not a big fan of this rule, but ocasionally it helped to keep "snipers" from betting $50 on a $1 dollar pot...

This rule is in "timer-end.php" and "deposit.php" if you want to change.


2)

The item you are getting as profit may not be on your itens database, or the item price is set to $0 on your... when the bot checks if the itens should be comission or not, $0 is less than 5% of the pot... so it pick this item as comission.

There is a fix for this problem on this topic: https://github.com/ztizzlegaming/CSGOWinBig/issues/76

Its not 100% fix... because you will be "spamming" the steam site every deposit... they will block you for a few minutes eventualy.