Jump to content

elliottdehn

Members
  • Posts

    22
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by elliottdehn

  1. I have the lines:

     

    Position place1 = new Position(playerPos.getX() - 1, playerPos.getY() - 1, playerPos.getZ());
    LocalWalker walker = script.getLocalWalker();
    walker.walk(position)
    
    
    Position place2 = new Position(playerPos.getX() + 1, playerPos.getY() + 1, playerPos.getZ());
    walker.walk(position);
    
    
    Position place3 = new Position(playerPos.getX() + 1, playerPos.getY() - 1, playerPos.getZ());
    walker.walk(position);
    
    
    Position place4 = new Position(playerPos.getX() - 1, playerPos.getY() + 1, playerPos.getZ());
    walker.walk(position);
    
    
    
    However, the player never walks to these exact locations. is there a way using the OS bot api to walk to these exact positions?
  2.         int x = trapPosition.getX();
            int y = trapPosition.getY();
     
            List<RS2Object> objectsAtPos = script.objects.get(x, y);
            List<GroundItem> itemsAtPos = script.groundItems.get(x, y);
     
    the last two lines give me errors: get(int, int) is not a method of Objects/groundItems.
     
            int x = trapPosition.getX();
            int y = trapPosition.getY();
     
            List<RS2Object> objectsAtPos = script.objects.getAll();
            List<GroundItem> itemsAtPos = script.groundItems.getAll();
     
    does not give errors but i would like to use the first section of code.

     

  3. This is my code:

            List<RS2Object> doors = this.script.objects.getAll();
            RS2Object theDoor = null;
            Position myDoorCHANGE = new Position(7264, 11595, 0);
     
            for (RS2Object potDoor : doors) {
                if (potDoor.getId() == 13101 && potDoor.getOrientation() == 0
                        && potDoor.getPosition().equals(myDoorCHANGE)) {
                    theDoor = potDoor;
                    break;
                }
            }
     
            if (theDoor.isVisible()) {
                while (theDoor.exists()) {
                    theDoor.interact("Open");
                }
            } else {
                this.script.camera.toEntity(theDoor);
                while (theDoor.exists()) {
                    theDoor.interact("Open");
                }
            }
     
    but the problem is "theDoor" is null after the for-each method. Wat do?
  4. I've narrowed the issue down to it trying to add the node, not even bothering starting to read the constructor, and just exiting script.

     

     

    edit: further narrowed it down to it getting to "constructing inbank node" in:

    package osbotOS;
     
    import org.osbot.rs07.script.Script;
     
    import Data.Constants;
     
    public abstract class Node {
     
        public Script script;
        public Constants c = new Constants();
     
        public Node(Script script) {
     
            this.script = script;
            this.script.log("constructing inbank node");
        }
     
        public abstract void execute();
     
        public abstract boolean validate();
     
    }
     
    but then not getting to "got here" in
     
        public ActivityInBank(Script script, Constants c) {
     
            super(script);
            this.script.log("got here");
            this.c = c;
     
            this.needToWithdrawFood = this.validateFood();
            this.needToWithdrawGlory = this.validateGlory();
            this.needToWithdrawPrayer = this.validatePrayer();
            this.needToWithdrawRunes = this.validateRunes();
            this.needToWithdrawTabs = this.validateTabs();
            this.needToWithdrawStam = this.validateStam();
     
            // TODO Auto-generated constructor stub
        }
     
  5. [iNFO][bot #1][04/27 07:07:43 PM]: Error in script onStart(): Freaky Fast Abyss

    [iNFO][bot #1][04/27 07:07:43 PM]: Started script : Freaky Fast Abyss

     



    ActivityOutOfBank: http://pastebin.com/WaHyzwvy


    Data.Constants:

     

    package Data;

    public class Constants {

        public int BANK_ID = 11744;

        public int UNNOTE_ESS = 7937;

        public int NOTE_ESS = 7936;

        public String BANK_OPTION = "Bank";

    }

     

    Example inbanksubactivity: http://pastebin.com/ez8d6UAZ (they all follow the same format)

     

     

    anyone any have clue of what could be going on? extra pastes on request

    Thanks!!

  6. Not a method of combat and not a method of player. Help?


    nvm i figured it out but it says: Gets the health in percentage form. (0% - 100%). Please WITHDRAW_NOTE: this is only updated in combat, which means if you got out of combat and then your hp changed, this won't reflect this. For this you should use the actual skills to check.

    It says withdraw note though, so does that still apply?

  7. Okay so I'm trying to unnote an item by using it on the bank. The method uses the item on the bank then attempts to click "yes" using

                while (script.getWidgets().isVisible(219, 0)) {
                    script.getWidgets().interact(219, 0, 1, "Continue");
                    this.waitTime(700);
                }
    but the program seemingly randomly clicks on other interfaces in 219 or simply doesn't click and behaves erratically. any help?
×
×
  • Create New...