Jump to content

elliottdehn

Members
  • Posts

    22
  • Joined

  • Last visited

  • Feedback

    0%

Profile Information

  • Gender
    Male

Recent Profile Visitors

1032 profile views

elliottdehn's Achievements

Bronze Poster

Bronze Poster (2/10)

0

Reputation

  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. I have never used filters. Can you please explain how to make and use them? It would be greatly appreciated. Also, edit: what you're saying is List<RS2Object> objectsAtPos = script.objects.filter(obj -> obj .getPosition().equals(trapPosition)); will return a List of RS2Objects matching trapPosition?
  3. 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.
  4. oh wow i didn't know this was a thing. thanks!
  5. 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?
  6. czar fixed it for me. I needed to move the Collection.addAll to the constructors of the objects.
  7. 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 }
  8. [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 onstart: http://pastebin.com/HcsdKrQH ActivityInBank: http://pastebin.com/4hS2MQFf ActivityOutOfBank: http://pastebin.com/WaHyzwvy Node: http://pastebin.com/u8LZunsF 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!!
  9. 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?
  10. if you can figure out for me how to make a frame that asks if you want to use pouches when the script starts, I can add this.
  11. Would anyone be interested in me releasing this? it's my first script i've made that I actually took somewhat seriously. Uses standard distributed wait times for whenever i have a wait to avoid b&
  12. Out of curiosity do you know how to make the bot press keyboard keys to more easily navigate dialogue?
  13. 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?
  14. I'm having trouble figuring out how to navigate interfaces without script.interfaces
×
×
  • Create New...