What's new

Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

First bot

L

lilovr

Member
Joined
Jan 18, 2021
Messages
28
Hey! I joined not long ago and created my first bot. Took about 1 week to learn WinAutomation and fixing the most blatant bugs and refactoring. Was a bit difficult with my experience in C++/C# development such as being able to pass variables to functions and a more robust GUI designer lol

About the bot, it basically chops oaks right next to the Draynor bank. Banking and minimap traversal is implimented albeit the minimap needs to be facing north as all times. Ran for about 10 minutes without issues and the source will be attached. Any feedback or advice would be greatly appreciated! ;)
 

Attachments

  • FirstBot.waj
    324 KB · Views: 6
Asentrix

Asentrix

Administrator
Owner
Leaker
VIP
Developer
Member
Joined
Oct 2, 2019
Messages
617
Hey! I joined not long ago and created my first bot. Took about 1 week to learn WinAutomation and fixing the most blatant bugs and refactoring. Was a bit difficult with my experience in C++/C# development such as being able to pass variables to functions and a more robust GUI designer lol

About the bot, it basically chops oaks right next to the Draynor bank. Banking and minimap traversal is implimented albeit the minimap needs to be facing north as all times. Ran for about 10 minutes without issues and the source will be attached. Any feedback or advice would be greatly appreciated! ;)
Looks pretty decent, curios why you used the array in the variable for the dialogue interfaces?
Instead of
Code:
%CustomDialogResults[0]%
You could do
Code:
%CustomDialogResults["Bot"]%
In my opinion it makes it easier to keep track of things :)
Also cool to see you used the move mouse to image occurrence, it's pretty handy.
If only the winautomation devs made "wait for image occurence" before they were bought our by microsoft :(
 
L

lilovr

Member
Joined
Jan 18, 2021
Messages
28
Thanks, WinAutomation is a little harder to script for than C# but I tried to apply all my programming knowledge from college best I could.

As for using
Code:
%CustomeDialogResults[0]%

Which I'm most used too in C++ and C# I wasn't aware that
Code:
%CustomDialogResults["Bot"]%
Worked just as well as make the script a little more readable.

Appreciate the tip and feedback, I even used the conditional statement to check if the text for chopping the tree disappeared to minimize the amount of mouse clicks. Seemed more human than just clicking the tree thats already being chopped. :D

If you have anymore feedback on how to improve logic, optimization, or any other tutorials that weren't posted in your A-Z bible would be awesome. Besides OSRS there doesn't seem to be an abundant amount of information for handling the same sort of tasks that Runelite could so the more information I think the better to increase the amount of sharing of snippets and development!

Agreed. The devs did a job well done on making a program that allows the large functionality of a language without coding. Downside to that is the fine tuning and well developed built in and third party integration libraries from more robust languages. For example Microsofts own ML.NET library. I've been looking into it to try and make an open source C# front end that learns and detects objects from an image. If your interested to read up on it, you can find the little tutorial I stumbled upon here.
 
Last edited:
Top