hiya!
I'm kinda new to botting/osrs in general, but have minor programming experience and making my own bot sounded kind of fun.
My first project, is a clean, guiless, beer buyer that just buys beers in sarim and drops them off at the bank deposit right outside.
While I'm not having too much trouble with syntax, there are so many options in the Osbot api I just do not know what to use.
I already have a verbal diagram of what the bot will do and at this point I only need to translate it.
Onstart: visit the draynor bank, bank everything and withdraw 10k
Getstate: If there are any other number of empty slots in my inventory than 27, then do [BANK], else do [BEER]
Onloop: BANK: Go to sarim deposit box, deposit everything, withdraw all gold, exit deposit box
BEER: Repeat the following 27 times (Go to bartender,talk to bartender, do correct dialogue to buy a beer) {I am aware that this is the hard part, and can probably figure out a way to make it work consistently on my own}
Make sure to catch any exception:
-If gp is insufficient, log out, stop script
-If inventory is full, break
Onexit: print "script ended" to log
Onpaint: Nothing yet
It is very rough but it is definetly a start.
What I don't know how to do:
Identify the sarim deposit box and walk to it
Identify the sarim bartender and walk to him
Do the dialogue correctly (although I presume I'll just go in game and use mouse debugging to find which xy coordinates work for the dialogue and add a small amount of randomness
identify the draynor bank and walk to it
Catch insufficient gp (as an exception and not just checking before every cycle of the beer state, which I feel would break less often)
Catch full inventory (again without checking before every cycle)
I am aware that this script will be very shitty but I still want to do this to get more experience. Sorry for the annoying post but I greatly appreciate any help