Jump to content

How to find if you changed region?


Botre

Recommended Posts

 // on start
  int startX = pos.getX() /104;
  int startY = pos.getY() /104;
  
  int mapX = pos.getX() /104;
  int mapY = pos.getY() /104;
  if(startX != mapX || startY !=mapY)
   //moved region
 
There ya go buddy.

(might not work 100% though)


Try this as well, it should work smile.png

 

  Position pos = script.myPosition();
  
  int prevX = pos.getLocalX(script.getBot());
  int prevY = pos.getLocalY(script.getBot());
  
  sleep(250,500)
  
  int nextX = pos.getLocalX(script.getBot());
  int nextY = pos.getLocalY(script.getBot());
  
  if(Math.abs(prevX - nextX) > 20 || Math.abs(prevY - nextY) > 20)
   //move region
Edited by LeBron
Link to comment
Share on other sites

 

 // on start
  int startX = pos.getX() /104;
  int startY = pos.getY() /104;
  
  int mapX = pos.getX() /104;
  int mapY = pos.getY() /104;
  if(startX != mapX || startY !=mapY)
   //moved region
 
There ya go buddy.

(might not work 100% though)

Try this as well, it should work smile.png

 

  Position pos = script.myPosition();
  
  int prevX = pos.getLocalX(script.getBot());
  int prevY = pos.getLocalY(script.getBot());
  
  sleep(250,500)
  
  int nextX = pos.getLocalX(script.getBot());
  int nextY = pos.getLocalY(script.getBot());
  
  if(Math.abs(prevX - nextX) > 20 || Math.abs(prevY - nextY) > 20)
   //move region

 

 

Nope.

The last method could work but you'd have to check every 300 milliseconds.

The first one just doesn't work.

 

I just want an id/config/hash method.

Edited by Botre
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...