Jump to content

Pandemic's Scripting Series: Part II - Path Walking and Simple Banking [UPDATED FOR OSBOT 2]


Pandemic

Recommended Posts

Okay sweet! Glad this tutorial is out because I've been trying to learn and expand my knowledge in this, as you know.

 

Question, though, isn't that walking method EXTREMELY bannable? Not even talking about the failsafes, but the factor that it hits the same coordinates every single path while minimap clicking is very, very coincidental. For someone mining tin, they would walk this path 15-20 times in an hour and it would always click the same coordinates? Or did I miss something slightly altering the walking path?

 

Also, what is this PathMaker tool?

Link to comment
Share on other sites

Thanks for the suggestion, but I think adding a tool to new learners might be confusing.

Also, no the i goes down so it starts at the end of the path and decreases until it's at the beginning of the path.

Yeah you're right but they are in the process of learning and they should get use to using tools.

They will be dealing with more confusing stuff while they are scripting. You could add it as an alternative, up to you anyway :)

private void traversePath(Position[] path, boolean reversed) throws InterruptedException {

if (!reversed) {

for (int i = 1; i < path.length; i++)

if (!walkTile(path))

i--;

} else {

for (int i = path.length-2; i > 0; i--)

if (!walkTile(path))

i--;//<-- was referring to this one it goes to the next tile when it fails to walk the current one

}

}

Link to comment
Share on other sites

Okay sweet! Glad this tutorial is out because I've been trying to learn and expand my knowledge in this, as you know. Question, though, isn't that walking method EXTREMELY bannable? Not even talking about the failsafes, but the factor that it hits the same coordinates every single path while minimap clicking is very, very coincidental. For someone mining tin, they would walk this path 15-20 times in an hour and it would always click the same coordinates? Or did I miss something slightly altering the walking path? Also, what is this PathMaker tool?

Nah it shouldn't be that bannable, because by the time the mouse moves to the tile and we're moving AND we have a slight delay before pressing soit still randomizes a bit.

Yeah you're right but they are in the process of learning and they should get use to using tools.They will be dealing with more confusing stuff while they are scripting. You could add it as an alternative, up to you anyway :)private void traversePath(Position[] path, boolean reversed) throws InterruptedException { if (!reversed) { for (int i = 1; i < path.length; i++) if (!walkTile(path)) i--; } else { for (int i = path.length-2; i > 0; i--) if (!walkTile(path)) i--;//<-- was referring to this one it goes to the next tile when it fails to walk the current one }}

Oh that i, that's just saying if we failed to walk to that tile (took too long or misclicked) to try the same tile again.

Link to comment
Share on other sites

Nah it shouldn't be that bannable, because by the time the mouse moves to the tile and we're moving AND we have a slight delay before pressing soit still randomizes a bit.

Oh that i, that's just saying if we failed to walk to that tile (took too long or misclicked) to try the same tile again.

 

You make a good point, but say I wanted to perfect the walking system. Can I implement an array of coordinates for each point that can randomize where they are going. Example being it would read each new position as if it would a new area, with an x and y coordinate for the top right and the bottom left? And then I could just reduce the size of the square area to maybe 4 spaces so it would choose each new position between the 4 spaces as opposed to clicking 1 single space?

 

private Position[] path = {

new Position1

new Position2

new Position3

};

 

and then have each Position1, Position2, Position3 declared as an Area (x,y,dx,dy)

 

 

Is that possible? I feel as if that would be a lot less obvious of a script.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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