Jump to content

Making a red chin bot {need help}


Recommended Posts

Posted

Hey yall, im making a red chinchompa bot I came to some trouble and was wondering if you can tell which box traps are your players and what box traps are other players? I made my bot but if somebody comes in my proximity it will think that another players trap is mine own. So, is there an ID I dont know of or a trick to make it so the bot recognizes my own traps? any solutions would be great. Thank you all <3

Posted
10 minutes ago, 12we12qw12 said:

Ok I'm wondering how to store the player postion ? :think:

 

Probably with an Enum or ArrayList. Store the position when you place it then when you interact to pick it up you remove that position then add the position of where you put that box(es) you just picked up. Also do you not know how to store player positions? Is that what you meant?

  • Like 1
Posted
4 hours ago, dreameo said:

Remember the position of where you placed the box and only look at those positions in regards to your box interactions.

 

 

What API would you use? something like if (myPosition.equals.chinArea)

2 hours ago, Gunman said:

Did you mean?


Position position;
position = myPlayer().getPosition();

Because I don't see that anywhere in the API.

I think this is what they mean but I still am trying to figure out how my position will get marked. and I dont think designated trap spots will work well

  • Like 1
Posted
47 minutes ago, 12we12qw12 said:

 

 

What API would you use? something like if (myPosition.equals.chinArea)

I think this is what they mean but I still am trying to figure out how my position will get marked. and I dont think designated trap spots will work well

I don't have time ATM to test and make something that would work, but I believe in you!

  • Heart 1
Posted

Something like...


Position tile = null;
RS2Object box = null;
Item boxItem = null;

if (tile != null) {

	box = getBox(tile);
	
	if (box.hasActions("Check")) {
		// loot
	}
	
} else {

	boxItem = inventory.getItem("Box trap");

	if (boxItem != null && boxItem.interact("Lay")) {
	
		tile = myPosition();
	}

}

// other stuff.....

public RS2Object getBox(Position tile) {
	return objects.getAll().stream().filter(obj -> obj != null
		&& obj.exists()
		&& obj.getName().equals("Box trap")
		&& obj.getX() == tile.getX()
		&& obj.getY() == tile.getY())
		.findFirst().orElse(null);
}

 

  • Like 1
Posted (edited)

When you place a box, you could save the position to an ArrayList<Position>.

Than to calculate if a box is yours, take the position of the box and see if the ArrayList contains that position.

Or another option of checking your boxes is to walk to a position in the ArrayList than get the box at your current position. When walking to the position you will have to use a WalkingEvent so you can set the minDistanceThreshold to 0 otherwise it will walk close to the spot and not on it.

I can give you some code later if you need it. I am currently at work and using my phone. Any questions feel free to ask me

Edited by BravoTaco
Posted (edited)
On 8/14/2019 at 10:24 PM, 12we12qw12 said:

Hey yall, im making a red chinchompa bot I came to some trouble and was wondering if you can tell which box traps are your players and what box traps are other players? I made my bot but if somebody comes in my proximity it will think that another players trap is mine own. So, is there an ID I dont know of or a trick to make it so the bot recognizes my own traps? any solutions would be great. Thank you all <3

Not to burst your bubble or anything, but Jagex has some ridiculous detection for chinchompa bots. I made a very sophisticated one once and only ran it 1 hr/day and it still got banned within a week. And that was on a 1200+ total lvl account. If you're using lvl 3s forget about it entirely. This is similar to Runecrafting, they are very good with banning these.

Edited by DylanSRT
  • Like 1

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...