-
Posts
21 -
Joined
-
Last visited
-
Feedback
0%
Posts posted by KevinHouse
-
-
Scripts should be lifetime. VIP shouldn't, it would let too many players have unlimited tabs.
-
Lol, your lucky I find this funny or I would have reported it
-
You shouldn't use any methods from the API in your paint. This if often very resource intensive as these calculations would be repeated at around 50 times per second. You should assing closestObject() to a variable in your onLoop() or in a thread.This way your not doing useless calculations and you're not slowing down the fps.
You kind of answered it in your description; it doesn't work from within your paint, but it does from outside your paint.
-
client.getMyPlayer().getZ()
thanks guys
That was my problem when I started scripting for vinsert and osbot aswell, abstract methods
-
You can't connect to the rs servers, seems obvious.
Remove jars and cache, redownload, check firewall and privileges
-
-
Just put the scripts in the OSBot folder inside your user directory
-
You can't get into the repo because it's not enabled yet.
For the source code of a script go look in the script section.
-
There seems to be a possible NPE in the KeyboardController class.
if (string == null) {
string = "";
}
java.lang.NullPointerException at org.osbot.engine.input.KeyboardController.typeString(cd:12) at org.osbot.script.MethodProvider.type(ed:23) at org.osbot.db.r(pd:81) at org.osbot.db.onLoop(pd:82) at org.osbot.nb.run(kj:103) at java.lang.Thread.run(Unknown Source)
-
Hey developpers,
it would be nice to see the stacktrace when an error is thrown when loading scripts on the osbot logger.
That way you can see the error without running it from the cmd!
-
It's not that hard to make a workaround.
Each action gives +X exp so you could easily make an xp/h.
Use the widgets from the skills tab, like a legit player would.
-
Player.getZ() returns the hight of the Tile fo your player on the Z axis, just like getX and getY return the X and Y coordinates of a player.
You should open the combat tab and split the string from the widget with text "combat level: X"
-
No need to say sorry.
Great release!
-
Finally Java support!
Groovy debugging in Eclipse or converting Java's swing to Groovy's swingbuilder is a pain in the ass.
-
I can't seem to be able to find the .groovy file
-
It all depends on the situation, I think ternary is very usefull to clean up your code in most cases.
Following example would be alot messier if using if else statements:
public static Area createCubicArea(Position p1, Position p2) { int minX = (p1.getX() < p2.getX()) ? p1.getX() : p2.getX(); int maxX = (p1.getX() > p2.getX()) ? p1.getX() : p2.getX(); int minY = (p1.getY() < p2.getY()) ? p1.getY() : p2.getY(); int maxY = (p1.getY() > p2.getY()) ? p1.getY() : p2.getY(); int minZ = (p1.getZ() < p2.getZ()) ? p1.getZ() : p2.getZ(); int maxZ = (p1.getZ() > p2.getZ()) ? p1.getZ() : p2.getZ(); Area cubicArea = new Area(); for(int i = 0; i <= (maxX - minX); i++) { for(int j = 0; j <= (maxY - minY); j++) { for(int k = 0; k <= (maxZ - minZ); k++) { cubicArea.add(new Position(minX +i, minY +j, minZ +k)); } } } return cubicArea; }
Hangs on client.getInterface(int).isValid()
in Archive
Posted
First do a null check, just to make sure it's not a NPE. To be sure look at the stacktrace.