Jump to content

Osbot 2 Collision flags and rooms


Th3

Recommended Posts

cdDp2px.png

 

What's the best way to get the best walkable tile (which is the highlighted one) dynamically? This is not hard when the entity is 1x1 but when its larger it gets bit harder. I know we got DynamicCircularPathFinder but its painfully slow and wrong many times. I tried to backport an old script by Zalgo but could not get it to work.

 

http://pastebin.com/kaxySJPT

 

http://pastebin.com/84myWrSk

 

I can get the size & orientation then array thru all the postions the entity covers and array once more the area around those postions for tiles with 0 flag but I don't think that's an efficient or ideal way to do it.

Edited by Th3
  • Like 2
Link to comment
Share on other sites

sorry a little off topic but chatbox is down. how do i get my player skill stats in osbot 2?

 

client.getSkills().getLevel(Skill.ATTACK);

 

^ that no longer works sad.png

skills.getStatic(Skill.ATTACK);

skills.getDynamic(Skill.ATTACK);

sorry

 sad.png dynamic changes and static stays the same

 

 

Edited by precise
  • Like 2
Link to comment
Share on other sites

sorry a little off topic but chatbox is down. how do i get my player skill stats in osbot 2?

 

client.getSkills().getLevel(Skill.ATTACK);

 

^ that no longer works sad.png

 

is it getSkills().getDynamic(Skill.ATTACK);

 

or getSkills().getStatic(Skill.ATTACK);

//current level

        skills.getDynamic(Skill.ATTACK);
//real level
        skills.getStatic(Skill.ATTACK);
//xp
        skills.getExperience(Skill.ATTACK);
  • Like 1
Link to comment
Share on other sites

How were you able to access the collision flags? I can't seem to figure it out

int[][] flags = client.getClippingPlanes()[sI.client.getPlane()].getTileFlags();

Then get individual tile flag using local x/y index in the flag array.

 

@OP use a pathfinding algorithm to find a path from your position to the destination? Just map the current region and any un-walkable tiles can be set as blocking with the algorithm.

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