« on: June 18, 2020, 11:12:20 pm »
An important note here is that KryGamesBot is still in ALPHA, it's not been officially launched, it's just available for testing. as such, there's still a lot of features missing and a lot of thing doesn't work properly or hasn't been tested thoroughly yet. Use at your own risk even more than usual. Also, once it does actually launch , there will be more material available to help understand the new API to guide you in converting your script.
Now to your question. The language didn't change, it's still LUA, just a newer version of it. The format of the script didn't change by much and the process of the script is still the same. You click start, the script is loaded,your initial bet is received from the script, a bet is placed and after every bet, the dodicebet function is called.
There's only 1 thing that's changed that really needs a mind shift, the rest of the stuff just moved around or got renamed.
The thing that changed is the inclusion of the ResetDice function. This function is called in between loading the script and placing the first bet and it dictates what your first bet should be using the parameters (it's also called when a reset condition is met, but we'll talk about that when you're more comfortable with the new programmer mode). So instead of setting the nextbet, chance and bethigh variables at the top of your script, you set NextBet.Amount, NextBet.Chance and NextBet.High inside of the ResetDice function.
Now for the rest of the stuff that moved around:
inside DoDiceBet you have 3 parameters, PreviousBet (which is akin to the lastBet object from DiceBot), Win (which is the same as win in DiceBot) and NextBet (Which is a combination of nextbet, chance and bethigh into 1 object). In addition to these parameters, there's some variables available to you: Stats (this contains all stats in the Session Stats window), SiteDetails (contains the site name, available currencies, house edge etc), SiteStats (Contains the stats user stats window) and Balance.
To put it simply:
Instead of nextbet, use NextBet.Amount
Instead of chance, use NextBet.Chance
instead of bethigh, use NextBet.High
instead of wins, use Stats.Wins
instead of currentstreak, use Stats.CurrentStreak
instead of profit, use Stats.Profit
instead of previousbet, use PreviousBet.TotalAmount
instead of currentprofit, use PreviousBet.Profit
Here's the sample/template that's included with the bot to illustrate how little has changed. It's just a basic martingale
base = 0.00000001
function DoDiceBet(PreviousBet, Win, NextBet)
if Win then
NextBet.Amount=base -- In v3, this would just be nextbet=base
NextBet.Amount=PreviousBet.TotalAmount*2 -- in v3, this would be nextbet=previousbet*2
Be sure to read through the "DiceBot Programmer mode.docx" file and the ReadMe.txt file included with KryGamesBot, it has an explanation of how the new system works, the available variables and what properties each one has available.
If you have more specific questions than "I'm lost", I'd probably be happy to answer them. The more specific, the better. And including code samples where possible also helps.