Seuntjie,
Played around with the programmer mode. How do you save the code? I was hoping it was automatic, but after a crash and losing my code, I find it is not.
I can't seem to cut/paste in the code box either... Can I put it into a file and have it automatically loaded?
EDIT: ctrl-c and ctrl-v work, so I'm able to code it up in note pad and copy it over...
As of yet, I haven't added a way of saving the code automatically or loading code into the bot. Been meaning to do so, just haven't gotten around to it.
for now, you can use the dofile() method to load from a file.
To do this, just delete the dobet function from the code box (would be best if it's empty), then execute dofile("your script name.txt") from the console. If you start the bot now, the loaded method will be executed. Alternatively you can replace the code in the code box with dofile and just start the bot normally.
Note: It's important that the dobet() function is NOT in the code box when you start betting. when executing start(), the code in the code box is executed. If dobet is present, it will override the one in your file.
A few questions came to mind while playing around. How is the first roll's input determined? IE the bet amount and hi/low? I added a few variable inits before the dobet() function. They seem to get set correctly, but not before the first roll..
At the moment, the first roll is determined by the base bet text box in the basic and advanced modes, same for chance and it defaults to betting high. In build 9 there is a bug that prevents changing these values from outside the dobet function, but I've been working on improving it and the next version will fix these issues.
Some of these issues has already been fixed and the code has been committed to github if you want to compile the bot yourself and test it out.
I don't know how many people you have using the programmer mode, but a cool addition would be to have a few screen areas defined for input and output. This would allow changing parms from the panel, and displaying some output related to the run.
The console is there to allow input and output. you can declare and set variables using the console, as well as get their values using the print function. you can also use the print function from inside your code to print applicable info to the console during the run. The stats windows and some other hidden features will be view-able while in the programmer mode in the next build (these updates has already been committed to github).
The console is pretty much like a javascript console. You can execute just about any code from it.
I coded up the mutawa function with a zig/zag twist. It was working great till the bot crashed and I lost it all. Not a huge deal about 40 lines of code, and I remember most of it...
Sorry to hear you lost the code. I know it's an inconvenience and I will make it save the settings automatically soon.
Would be great if you could send the error details from when the bot crashed though, Hard for me to fix errors if i don't know what they are
Edit: github repo:
https://github.com/seuntie900/DiceBot