Jump to content

ugpjosh

Members
  • Posts

    16
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by ugpjosh

  1. I have this code:

     

     

    "private state getState() {
            if (DANGER_AREA.contains(myPlayer()))
                return state.STEAL_POS;
            Entity stall = objects.closest("Tea Stall");
            if (!inventory.isEmpty())
                return state.DROP;
            if (stall != null)
                return state.STEAL;
            return state.WAIT;
        }"

     

     

    But in the second line where it says 'contains', what would I change that to to make it recognize if my player is in that area?

  2. Well theres a handful of ways of doing it.

     

    The simplest way for you would be to create an area around the are you dont want to stand in while attempting to steal from the tea stall:

    Area DANGER_AREA = new Area(int top right x, int top right y, int bottom left x, int bottom left y);

    and then just in your getState call:

    if (DANGER_AREA.contains(myPlayer()))
            return State.returnToStealPos;

    and in your switch statement:

            localWalker.walk(STEAL_POS);
    

    where STEAL_POS is the position you want to steal at

     

    (You can define STEAL_POS at the top like so: )

    Position STEAL_POS = new Position(x,y);

    I hope I made myself clear, if not just quote this post and i'll gladly help out further.

    PS hope the tutorial helped! 

     

    I'm coming up with problems with the coordinate thing. Could you Team View me?

     

  3. Could someone help me with the code needed here?

     

    I used the thieving script tutorial for the tea stall and everytime it goes to click the stall it clicks about 3 times before it actually picks up the tea. When the camera moves to a certain point it makes me walk behind the stall to the person who wont let you steal from it.

     

    HOW can i make it so that it wont do this and if it does happen, it identifies hes yelling at me and makes me run back to the spot out front of the stall.

  4. I was in the works of making a woodcutter (VERY beginner style) and I can't get the right names (eg: client.getinventory(){) I can't seem to get the "getinventory" to work. I need to know the new codes for items such as full inventory, player positions etc.

     

    I've been using this as a resource: http://pastebin.com/nZPxJM0j

     

    I know it's for rs2 but I've been converting it to 07 but cant seem to get any of the things like inventory to work. I even check osbot.org/api and went to 'inventory' and tried clien.getcapacity and etc. but it didnt want to work.

     

     

    Any help here would be appreciated.

×
×
  • Create New...