Everything posted by Abuse
-
Bot stopped working and help
Probably a broken script, check the logger
-
When your farm crashes and you make it to reddit
My whole panel is written in / based on it
-
When your farm crashes and you make it to reddit
YII2
-
Issues with path walking
getPlayers().getAll(). size()
-
Working with Autocasting
Autocast config is getConfigs().get(108) Not sure if the 108 is related to what staff you are carrying or it's just static, I've done this with a staff of air Value 0 is no spell selected Value 3 is air strike 5 is water strike and so on Here is a snippet that does a spell change based on levels private int getSpellChange() { int currentSpell = self.getConfigs().get(108); int currentLevel = self.getSkills().getStatic(Skill.MAGIC); if (currentLevel >= 13) { if (currentSpell != 9) { return 4; } else{ return 0; } } else if (currentLevel >= 9) { if (currentSpell != 7) { return 3; } else{ return 0; } } else if (currentLevel >= 5) { if (currentSpell != 5) { return 2; } else{ return 0; } } else if (currentLevel >= 1) { if (currentSpell != 3) { return 1; } else{ return 0; } } return 0; } private void changeSpell() { if (self.getTabs().open(Tab.ATTACK)) { RS2Widget castWidget = self.getWidgets().get(593, 25); if (castWidget != null && castWidget.isVisible()) { if (castWidget.interact()) { new ConditionalSleep(MethodProvider.random(2000,5000), MethodProvider.random(100,200)) { @[member=Override] public boolean condition() throws InterruptedException { return !castWidget.isVisible(); } }.sleep(); } } else { RS2Widget spellWidget = self.getWidgets().get(201, 0 , getSpellChange()); if (spellWidget != null && spellWidget.isVisible() && spellWidget.interact()) { new ConditionalSleep(MethodProvider.random(2000,5000), MethodProvider.random(100,200)) { @[member=Override] public boolean condition() throws InterruptedException { return getSpellChange() == 0; } }.sleep(); if (MethodProvider.random(0, 1) == 0) { self.getTabs().open(Tab.INVENTORY); } } } } }
-
ANyone got a snippet of how to calculate players around?
I've posted an answer to this in your previous thread. Have a thorough look through these to understand our API: http://osbot.org/api/ and especially http://osbot.org/api/org/osbot/rs07/script/MethodProvider.html These will provide you with all the basic available methods
-
Issues with path walking
for (Player player : getPlayers().getAll()) { if (player.mycondition() == whatIamLookingFor) { //do stuff with player } }
-
New OSBot Feature - Vote
As long as there is a way to capture a screenshot of the current state, yes please!
-
Issues with path walking
It's asking for a list. List<Position> path = Arrays.asList( new Position(3183, 3431, 0), new Position(3177, 3429, 0), new Position(3171, 3426, 0), new Position(3172, 3416, 0), new Position(3171, 3404, 0), new Position(3173, 3395, 0), new Position(3177, 3388, 0), new Position(3179, 3381, 0), new Position(3182, 3375, 0) );
-
Any reason why getObjects().getAll() returns duplicates?
Makes sense, thank you
-
Why this CLI doesn't work for this script on linux?
Shouldn't it be -script 591?
-
[SmartAPI] Mouse / Camera / Webwalking API
Ever since I've started writing scripts for Runescape (Dating back to 2009 https://villavu.com/forum/archive/index.php/t-43804.html) I wanted to write my own interaction APIs Obviously I was just a scrub during most of my "scripting career", with little knowledge on how to write decent OOP code. Past few years I've starting focussing more on programming eventually turning my knowledge into a job, currently I work for a telecom company as a back-end developer. Anyway, enough gibberish, let me introduce SmartAPI SmartAPI is a package that combines all common game interactions into a single package. This includes: Mouse movement Camera movement Walking and Webwalking Keyboard Inventory interactions Object interactions Widget interactions Grand Exchange Banking Shop interfaces and much more ... Why did I decide to create SmartAPI? I felt limited by the implementations of interactions in pretty much any client. They run on the same thread as the script logic making in difficult to write efficient yet simple code. Also I wanted to have more control on how I handle interactions. Progress 10 February 2017 Most of the API's have been implemented and tested, there are still some slight issues with screen walking, but those should be easy to fix Interaction + Walking demo: Banking demo (Endless withdraw / deposit loop) : 19 December 2016: - Initial skeleton has been written. - Basic mouse movement / path generation is working (Whooho!) - Traces of an almost working webwalker can be found throught the code [Webwalker] [Mouse]
-
Any reason why getObjects().getAll() returns duplicates?
for (Entity tree : getObjects().getAll()) { if (tree.getName().equals("Tree")) { self.log(tree.getPosition().getX() + ":" + tree.getPosition().getY()); } } Output: [INFO][Bot #1][12/19 10:06:20 AM]: 3197:3489 [INFO][Bot #1][12/19 10:06:20 AM]: 3197:3489 [INFO][Bot #1][12/19 10:06:20 AM]: 3197:3496 [INFO][Bot #1][12/19 10:06:20 AM]: 3197:3496 [INFO][Bot #1][12/19 10:06:20 AM]: 3197:3489 [INFO][Bot #1][12/19 10:06:20 AM]: 3197:3489 [INFO][Bot #1][12/19 10:06:20 AM]: 3197:3496 [INFO][Bot #1][12/19 10:06:20 AM]: 3197:3496 [INFO][Bot #1][12/19 10:06:20 AM]: 3200:3411 [INFO][Bot #1][12/19 10:06:20 AM]: 3200:3411 [INFO][Bot #1][12/19 10:06:20 AM]: 3201:3409 [INFO][Bot #1][12/19 10:06:20 AM]: 3201:3409 [INFO][Bot #1][12/19 10:06:20 AM]: 3200:3411 [INFO][Bot #1][12/19 10:06:20 AM]: 3200:3411 [INFO][Bot #1][12/19 10:06:20 AM]: 3201:3440 [INFO][Bot #1][12/19 10:06:20 AM]: 3201:3440 [INFO][Bot #1][12/19 10:06:20 AM]: 3201:3409 [INFO][Bot #1][12/19 10:06:20 AM]: 3201:3409 [INFO][Bot #1][12/19 10:06:20 AM]: 3201:3440 [INFO][Bot #1][12/19 10:06:20 AM]: 3201:3440 [INFO][Bot #1][12/19 10:06:20 AM]: 3205:3510 [INFO][Bot #1][12/19 10:06:20 AM]: 3205:3510 [INFO][Bot #1][12/19 10:06:20 AM]: 3205:3510 [INFO][Bot #1][12/19 10:06:20 AM]: 3205:3510
-
[Selling] Perfect Zerker - 75 Att 99 Str 99 Range 94 Mage - Quested - Torso - Firecape
70m gp/paypal
- Zulrah ready "range tank"
-
When your farm crashes and you make it to reddit
I see nothing wrong here
-
Get Entity Z
Awesome, exactly what I was looking for
-
Get Entity Z
Unfortunately getTileHeight always returns 0, and getHeight returns the model height
-
Get Entity Z
Hey, I am working on a middle mouse button camera rotation class, I have been able to calculate the required camera yaw angle to get the entity into the gameview however I am having troubles calculating the pitch angle. I need a function that can return me the local 'grid' Z position of an entity, just like getCamera().getZ() does. I've noticed that entities have getGridX() and getGridY() functionality, but I couldn't find anything that returns the Z value (Unless its always the same as position.getZ() Best case scenario would be finding Z position relative to my player (or camera)
-
vps botting black screen
It was this or move to Tri-Crap
-
vps botting black screen
Launch 10 of them and you'll end up with the same issue
-
vps botting black screen
I have the exact same thing, and i've been dealing with it for months now. The only workaround is to have a remote desktop session open at all times, I have a server dedicated to do that I've tried literally everything; - Different OS (Even Linux) - Dummy monitor drivers - VNC server and a loopback connection What did work was a dummy VGA adapter for the physical server, but that's not possible with most datacenters. Spent days looking for a solution and still haven't found one. It's definitely a client issue
-
Launch a script which's name has spaces from CLI
It's bad practice in general to store parameter options in a variable Try this: SCRIPT="My\\ Script:null" java -jar "osbot 2.4.101.jar" $OSBOTLOGIN $BOT1 -script $SCRIPT $BOT1WORLD or SCRIPT="My\ Script:null" java -jar "osbot 2.4.101.jar" $OSBOTLOGIN $BOT1 -script $SCRIPT $BOT1WORLD
- Laggy bot?
-
You're only cool if you have more profile views than posts.
Ez win by view count/post ratio