Gamble All Option


#1

Hi,
I have recently installed PhantomBot because I really wanted a bot I could customize to my needs. It is working perfectly fine but I am dissapointed a bit I don’t have the Gamble All option in the gambling system. My viewers are used to other streams where they Gamble All for the funs and not being able to give it to them is kind of dissapointing. Can you advice if you have a new module which activates that feature?
Thanks
Lord Dem


#2

Can you clarify exactly what you mean by “gamble all?” PhantomBot has a slot machine and basic gambling module by default, you can read more about them here.


#3

Hi based on the documentation the Gambling module has:

Configuration

  • !gamblesetmax [points] - Set the maximum bet
  • !gamblesetmin [points] - Set the maximum bet
  • !gamblesetwinningrange [number_between_0_and_100] - Set the winning range.
  • !gamblesetgainpercent [value] - Set the gain percent on win.

The viewer needs to enter a command and amount to gamble like !gamble 100
but he cannot simply put !gamble all to gamble all their points


#4

That is about what I thought you meant, but I didn’t want to assume. I’ll mark this post as a feature request and we’ll see about adding support for it. It should be relatively simple to add.


#5

Thank you so much. I love so much the customization of the bot and the availability of all the modules for editing to suit the streamer. Really a great job! No complaints at all!


#6

If all is more than maximum, should it default to maximum? It is plausible that a person has more points than the max and gamble all would just return an error saying that it is above the maximum.


#7

There is certainly an appeal to saying ALL IN. Sometimes you just feel LUCKY.

(and then you’re back to saving up Tacos, if you’re in my stream!)


#8

People like to gamble ALL their points meaning really ALL their points for the funs and then call the system rigged when they lose. It creates laughs and memes in the chat. For sure it will be an excellent addition. Even a module change would be nice without a full version of phantombot. I don’t think would be hard to implement.


#9

Right, it would need to be an option then, especially because some channels take the maximum points to bet seriously. If there was a way to circumvent that, it would create friction with some broadcasters.


#10

I will take for example how StreamElements Gamble option works.
Viewers get rewarded with Points (same as Phantombot)
Viewers can gamble Percentage of their points (which is the actual percentage of their total points) a number of their points or gamble all to go all in for the funs then meme in the chat that the system is rigged if they lose them all. You could add an option gamble max and gamble all. He who goes all in is his head on the plate :slight_smile: . I think is a rational request.


#11

I agree it is rational, it is also rational that different broadcasters have different preferences, hence why a configurable option is the most rational decision and, if accepted, would be part of the user story. We do our best to try to fit the needs of many, and we also provide the source code so that folks can, of course, tweak the bot to their particular need.

Cheers!


#12

Hi I completely agree. The Main Reason I chose PhantomBot is because its code is open for editing by the user which makes the Bot even stronger! I am using a lot of its capabilities and haven’t even touched the surface. I wish I was efficient enough to implement this myself :slight_smile: If its a matter of adding just a small bunch of code in my current gambling.js module I would happily do it if someone could point me to what I would need to do. I have altered other code to change command names and responses but not really efficient in .js coding :sob::sob::sob::sob:


#13

Here is what I changed in “gambling.js” to enable the “!gamble all” function… You can find this portion of the code starting at line 62 in the current stable version of PhantomBot.

/**
 * @commandpath gamble [amount] - Gamble your points.
 */
if (command.equalsIgnoreCase('gamble')) {
	//edit: get user points for !gamble all
	if (action == "all") {
		action = $.getUserPoints(sender);
	} else {
		if (!parseInt(action)) {
			$.say($.whisperPrefix(sender) + $.lang.get('gambling.usage'));
			return;
		}
	}

	gamble(sender, parseInt(action));
}

Basically, it checks if the argument sent after “gamble” is “all” and if so, it gets the user’s current points.

There could be many ways to achieve this, so this may not necessarily be the best way, but it’s short and it works well.

I hope this can be useful to you.


#14

Keep in mind that this still doesn’t bypass the max check in gamble(). Be sure to set the maximum bet to a very high value to prevent an error. For example, by default, the maximum is 100. If someone has more than that, they will receive an error.

Cheers


#15

Thanks! Works perfect for what I needed it!


#16

had the same issue a month ago.

No need to change any code.

i made a command
!addcom !gambleall (command gamble) (points)

it worked perfect for me.


#17

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