elliottdehn
-
Posts
22 -
Joined
-
Last visited
-
Feedback
0%
Posts posted by elliottdehn
-
-
Thank you bunches!
-
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? -
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.
-
oh wow i didn't know this was a thing. thanks!
-
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? -
czar fixed it for me. I needed to move the Collection.addAll to the constructors of the objects.
-
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" inpublic 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} -
[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 Abyssonstart: http://pastebin.com/HcsdKrQHActivityInBank: http://pastebin.com/4hS2MQFfActivityOutOfBank: 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 requestThanks!!
-
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? -
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.
-
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& -
Out of curiosity do you know how to make the bot press keyboard keys to more easily navigate dialogue?
-
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? -
I'm having trouble figuring out how to navigate interfaces without script.interfaces
-
Thank you all for the kind and helpful replies!
-
am I just stupid? how do I cast npc contact using the magic api? i don't quite understand how I obtain a MagicSpell object. Thanks.
-
I'm trying to unnote essence on the bank chest in cwars and bankChest.interact() with the noted ess selected isn't cutitng it due to the boxes and players getting in the way. Any help? thanks.
-
I'm making a script where mouse speed is a limiting factor. I was able to do the task better and faster with mousekeys but the inbuilt mouse move/click takes too long. Is there a method of making the mouse instantaneously jump to a location?
-
Problem with fuzziness in local walker. Need to walk to very specific spots
in Scripting Help
Posted
I have the lines: