Jump to content

hovering snippet osbot 2


Joseph

Recommended Posts

Osbot 2 hovering for intractable, is bugged out. it like to interact with them. I don't know why so i decide to write me a quick method for hovering. Could be useful for other.

	public boolean isHovering(Entity entity)	{
		if (entity != null)	{
			EntityDestination des = new EntityDestination(bot, entity);
			return des.getBoundingBox().contains(mouse.getPosition());
		}
		return false;
	}
	
	public boolean hover(Entity entity)	{
		if (entity != null)	{
			EntityDestination des = new EntityDestination(bot, entity);
			return mouse.move(des);
		}
		return false;
	}
Edited by josedpay
  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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