Everything posted by Precise
-
How to check if item is stackable?
ok nice, glad it worked
-
How to check if item is stackable?
you said you had defined a list of items, maybe store a property of that item whether they are stackable or not? or you could check the noted id since a stackable item shouldn't have a noted id. ( i think returns -1 last time i checked).
-
Reading absorption widget text
this is what i used in an NMZ script: public int getCurrentDrinkLevel() { RS2Widget widget = script.getWidgets().get(202, 1, 9); if(widget != null && widget.isVisible() && widget.getMessage() != null) return Integer.parseInt(widget.getMessage().replace(",", "")); return 0; }
-
krys banned
he spent that much time on the forum everyday, he'll be back vading lol
-
Tree cutting help!
here is what it could look like: if(!getInventory().isFull()) { //Chop if(!myPlayer().isAnimating() && !myPlayer().isMoving()) { if(TREE_AREA.contains(myPlayer())) { Entity tree = getObjects().closest(AREA_HERE, TREE_NAME); if (tree != null) { if(tree.interact("CHOP??")) add sleep here } } } }
-
Tree cutting help!
yes there is a methods for it, but then it will do nothing if the entity is not in the area. you want to filter out the ones like i have above
-
Tree cutting help!
RS2Object tree = getObjects().closest(AREA_HERE, TREE_NAME HERE); check out the api here for more options: http://osbot.org/api/org/osbot/rs07/api/EntityAPI.html
-
Running a farm on one computer (lag issues)
interaction event spam clicks and other weird behavior, example would be dropping a full inventory of fish with .interact() and you'll see the difference with normal vs. low cpu
-
Running a farm on one computer (lag issues)
low cpu mode helps a lot too, but may cause issues with some scripts so use it carefully
-
Problem with sleep()
it's resolved, just needed to save :P
-
Problem with sleep()
what lol add my skype, probably save more time: precise.scripting no need since onLoop throws Interrupted Exception
-
Problem with sleep()
could you show what is on these lines?
-
Problem with sleep()
to save time, which line does the unhandled exception occur at?
- Break hanlder bug.
-
Break hanlder bug.
if you are purchasing a private scripts make sure to get a quote for everything you want otherwise this will happen. It isn't the clients fault since it isn't supposed to handle every situation when you can't break before breaking, this is for the scripter to implement.
-
Break hanlder bug.
this is a script related issue, not a client issue.
-
Break hanlder bug.
this can be handled by the script. just check how much time left before break, like if < 2 minutes, walk to safe area and wait. The client cannot be responsible for this and must be handled by the script.
-
Adding a check to see if bank is open makes my script lag?
yes you made a new instance of it, but that is all. you need to call the sleep method otherwise it won't sleep. that is what i have experienced.
-
Adding a check to see if bank is open makes my script lag?
you need to call new ConditionalSleep(.....).sleep(); otherwise it won't sleep. what is b? would be easier to see all the code. precise.
-
Withdraw noted items
http://osbot.org/api/org/osbot/rs07/api/Bank.html#enableMode-org.osbot.rs07.api.Bank.BankMode-
-
controller/joystick
i'd say the elite, and don't get a scuf
-
Running
getSettings().setRunning(true);
-
I don't understand this, im noob):
! Basically means NOT, like !Inventory.isEmpty() means NOT empty.
-
Interacting with another entity if the first entitys condition isnt met
No problem
-
Interacting with another entity if the first entitys condition isnt met
Ok so, when you call: Entity tree = objects.closest("Tree"); You're getting the closest object which matches the name "Tree" and that only. So you could get a tree which is closest to you, but isn't in the area, and so it won't click it. The code i posted finds the closest object using a filter and only gets objects which have the name "Tree" AND are in the area you specified. let me know if i wasn't clear. Edit: here is another example of how you can write it, might be easier to understand: RS2Object tree = getObjects().closest(new Filter<RS2Object>() { @[member=Override] public boolean match(RS2Object o) { if(o != null && o.getName().equals("TREE_NAME") && AREA_HERE.contains(o)) { return true; } return false; } }); Precise.