Jump to content

Simple door snippet


Botre

Recommended Posts

  • 1 month later...
  • 2 weeks later...

How about osbot creates a decent pathgenerator that handles doors. SMH.

Huge lack of skills in this dev team. inb4 ban because devs are butthurt.

If they are professional they give me a reply why they haven't done anything useful to this bot since it's release.

No decent web, no door handling, no decent equipment loading, grounditems have the wrong height, and the list goes on.

Pretty sure they correctly calculate the height of the items in osbot 2.

Link to comment
Share on other sites

How about osbot creates a decent pathgenerator that handles doors. SMH.

Huge lack of skills in this dev team. inb4 ban because devs are butthurt.

If they are professional they give me a reply why they haven't done anything useful to this bot since it's release.

No decent web, no door handling, no decent equipment loading, grounditems have the wrong height, and the list goes on.

i can agree with some but http://osbot.org/osbot2_api/org/osbot/rs07/api/DoorHandler.html

Link to comment
Share on other sites

  • 2 weeks later...

I use the folowing code.

If returns null: Means the door is open, else just interact with it.

 

public static RS2object getobjectAt(String name, Postion pos, Script script){

         return script.objects.closest(New Filter<RS2Object>(){

 

                 boolean match(RS2object d){

                          If(d != null  && d.getPosition() == pos && d.getName().equals("Door") && d.getDefinition() != null && Arrays.asList(d.getDefinition().getActions()).contains("Open"))

                                 return true;

                }

        });

}

 

Don't mind if I made some mistakes, just typed that in notepad at my work xD

 

 

Khaleesi x3

Edited by Khaleesi
Link to comment
Share on other sites

use this method:

 

 

public static RS2object getobjectAt(String name, Postion pos, Script script){

         return script.objects.closest(New Filter<RS2Object>(){

 

                 boolean match(RS2object d){

                          If(d != null  && d.getPosition() == pos && d.getName().equals("Door"))

                                 return door;

                }

        });

}

 

Don't mind if I made some mistakes, just typed that in notepad at my work xD

 

 

Khaleesi x3

 

Yh this is rather old :p

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