Need help with the bot or want someone to talk to?
FORUM.SEUNTJIE.COM

The forum is a good platform for asking or offering help with programmer mode scripts

LUA Scripts

Download a script for your bot, or upload your own to share with other users. Login or Register to upload

How do I use this?


Name:"Resume Betting" by simply clicking START in case the script was stopped
Uploaded by: Probably_Gay
Discription:
This pattern will allow your script to resume betting by simply clicking start in case the script was stopped (you cannot automatically resume once the bot has been stopped. 
If you don't want it to stop, don't use the stop function. 
If it stopped because of an error, you don't want it to resume automatically, believe me.)


How to do :-
The initialize call at the bottom of the script is important. 
If it's not called, none of your variables will be declared.
When you click start the first time, the script will initialize your variables. 
If you click start subsequently, it will retry your most recent bet (unless you manually specify a starting bet using the console) and resume betting from there. 
If you want the bot to reset, set initialized=false in the console before starting the bot.

#copied from Seuntjie
https://forum.seuntjie.com/index.php?topic=2.msg2195#msg2195





CommentsLogin or Register
PMG23:03:2020 23:37
there is a solution easier. once the bot has been started you delete all your code and you write only dobet()
    Login or Register
Probably_Gay28:03:2020 07:23
thanks it also continues after clicking "STOP" button. 
    Login or Register
tykwong03:04:2020 03:25
It does not work. I tried i still could get "bet result received does not match last bet placed! stopping for your safety"
    Login or Register
seuntjie26:03:2020 14:08
And what happens if you need to make an adjustment to the script?
    Login or Register
Tomy4520:11:2020 02:47
My solution, simplest. 
Before line "function dobet" just add "initialized = false" and in line 7 change "initialized!=true"  to  initialized == false"
 If you want now initialize just remove 'e' of false in line 1 or add 'e' for resume.
As you see now you can easy switch any time between initializing/resume by edit only one letter.


initialized = false  --<<   false = initializing    fals = resume
function dobet()
--your logic here
end

function initialize()
    if initialized == false then
        print('Initializing')
        initialized=true
        --define and set your variables that would normally be at the top of your script here.
        --DO NOT define a variable here using local, if you do, the rest of the script won't be able to use it
        nextbet   = 0.00000001
        chance    = 49.5
        enablezz  = false
        enablesrc = false
        bethigh   = true
    else
        print('Already initialized, retrying last bet')
    end
end

initialize()
    Login or Register
Tomy4520:11:2020 03:35
I did one mistake above.

Is:
"If you want now initialize just remove 'e' of false in line 1 or add 'e' for resume."


Should be"
"If you want now resume just remove 'e' of false in line 1 or add 'e' for initialize."
    Login or Register