Gamble feature needs a fix. (Nightly-


Please fill out the following so that we might better serve your request. Please attach logs and console messages as well.

PhantomBot Version: Nightly-

OS Version: Windows 10

Java Version: 1.8.0_131

Browser and Version (for Panel Support): G Chrome Version 58.0.3029.110 (64-bit)

Stock PhantomBot: Yes/No ? (idk)

Any Recent Changes to Your System: No

Description of Issue:
The “!gamblesetgainpercent” command doesn’t seem to be working as intended (see image).


If you gamble the same amount of points multiple times, on the same gain percentage, you’ll get a different amount of points back each time.


That is expected based on the logic. It takes into account what the bot rolls and provides a different amount. This is not just a static win value.

range = $.randRange(1, 100);
winRange = $.getIniDbNumber('gambling', 'winRange');  // !gamblesetwinningrange
winSpot = (range - winRange + 1);
winnings = Math.floor(amount + ((amount + winSpot) * gain));

This way, depending upon the luck of the user, if the random number is higher, they will have more winnings.

When this was originally designed, we were asked to not provide yet another static win module but rather something a little bit more dynamic.


Thanks. I’ll just tweak the win rate till I find what i need. I do like this dynamic something a bit better.


However, I did find this.

It does not refer to the alternate point name I set when telling a user that they do not have enough to perform an action. I’d assume this was the case for multiple features, such as redeeming points for various custom commands or even other games. (and yes, I do have the plural form set as “sp0oks”)


I just looked at the code and it is handling it correctly, do you have any custom edits to the language files? If not, try setting your points name multiple again.


A lot of people keep getting confused by the math logic behind the gambling system. So, I will be changing it to only give back the amount they gambled plus the percent you choose on the amount they gambled.

(amount_user_gambled + (amount_user_gambled * gain_percent_set))


Fix is here if anyone wants it:


This topic was automatically closed after 30 days. New replies are no longer allowed.