Jump to content

Task based framework


Recommended Posts

Posted

Hey all, long time no see. I am thinking about doing some botting but I have a problem, I lost the laptop that had my ide on it and even though I wrote my own scripts I really don't know java (those that remember me should remember I said that often).

 

Anyway, I had a "framework" that I found here on the forums and I used that as the base of my scripts. It consisted of one class that had a list of "tasks" to add to the list and the other classes were the actual tasks. The script would go through the class list and see if the "test" at the beginning of each "task" class matched the current state (if my player is in the bank and bank is not open). If it matched it would execute the code that followed, if not the script would move to the next task on the list. It worked similar to "state" scripts but many classes instead of one large one.

 

I have been told this isn't good programming practice, and I understand that. The fact of the matter is this is the only way I know how to script and it works for me.

 

Anyway, if anyone can point me in the direction of an open source script written this way I would appreciate it. I found the original one here years ago but can't seem to find one now.

 

Thanks!

Posted
14 hours ago, Chris said:

use onloop

Yeah, I do think the main class used onstart to build the list of tasks, and onloop to go through that list and try to match the current state of the game to the state statements at the beginning of all the other classes. If it matched then it executed the code and then started the loop over again, are you aware of any tutorials for scripting in this manner?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...