Everything posted by darkxor
-
Less-bugged bank.scrollToSlot(slot)
I tested my function on bot farm and it is working flawless for me. Maybe yours also, but they are different. And this is not re-post in any ways.
-
4 accounts got banned for gold farming?
i recommend you to change IP. Many bans from single IP (3+) is a straight way to be flagged i think. They will NOT ban legit accounts, but investigate all shit running from your IP.
-
Pathing
If you talk about what I think, then this is a bug in OsBot, i created topic about it (but moderator sent it to Scripting Issues). You can thread.interrupt() if walking too long, maybe it will help. See call stack when your bot freezes, if it in somewhere walk(...) then walking API freezed your tab.
-
Does Jagex still ban magic log cutters?
Hello! Want to know does Jagex still ban magic logs cutters at Sorcerer's? Does anybody run cutters of magic without being banned in couple of hours/days? It was a good source before bans come:)
-
Name for noted item in inventory?
Hello! When I try to get name of noted item, it returns null. ItemDefinition.getName() also return "null". So, how can I get name of noted item? Or, how can I get name of item i don't have in inventory? (assuming that noted item id is normal item id+1). Or, how can I list Options available on item? without hovering it by mouse? Thanks, dark_xor.
-
Less-bugged bank.scrollToSlot(slot)
Writed simple version of scrollToSlot(int slot) that does not become stupid on first/last partially visible rows. It works maximally depending on existing scrolling functions. public void bankScrollToSlot(int slot) throws InterruptedException{ bank = client.getBank(); int yTop = bank.getVirtualSlotPosition(0).y; int yBottom = bank.getVirtualSlotPosition(40).y; Rectangle rect = bank.getAbsoluteSlotPosition(slot); int y = rect.y; if(y < yTop) bank.scrollToSlot(slot - 8 >= 0 ? slot - 8 : slot); //scroll up if(y > yBottom) bank.scrollToSlot(slot + 8 < 400 ? slot + 8 : slot); //scroll down } P.S. Did'nt test it much enough, so can contain some bugs.
-
If I didn't look like a bot before, I certainly do now.
Maybe change reward to be taken in account settings? If you did not complete quest needed to take reward, it will get stuck trying to click on inaccessible reward icon.
-
searchInterfacesForTooltip? or enumerate ALL interfaces?
Hello! Does anyone know how can I find interfaces by tooltip? Or enumerate through all interfaces [visible interfaces]? Thanks, dark_xor.
-
How to lowerize CPU usage?
tehbomb, how many tabs do you run per OsBot instance? Does it better to run 3 tabs per bot, or 1 tab per bot in terms of cpu usage?
-
How to lowerize CPU usage?
Hello! Have you any suggestions about how to lowerize cpu usage of bot? Low CPU checkbox is set:) But every bot on Core I7 3930-K takes around 4% of overall cpu power, so around 25 bots can be run. I think this is extremely low for such game. This is also not FPS-related thing because 50-fps client consumes 6% cpu but 8-fps client 4% cpu - so main pitfall is not frames per second.
-
Enable/disable random solvers on the fly?
bump, randomManager.hasHook() always return false, unregisterHook() does nothing...
-
How many hour to bot per day, with what delays?
Hello! I think botting 24/7 is high risk now. Does anybody have experience of how many hours per day can we bot, and what must be delays, to not get flagged for too intensive playing? For example, is it safe to bot 2 hours then delay like 30 minutes? Or delays must be longer?
-
Enable/disable random solvers on the fly?
Tried this method for LOGIN_SCRIPT or WELCOME_SCREEN, it says hook not registered and do nothing on unregisterHook() call.
-
Enable/disable random solvers on the fly?
How can I enable/disable random solvers on the fly? So, disable LOGIN_SCRIPT solver, or Run away from combat?
-
Another Great Jagex Update... It just gets Better
I think primary purpose of Jagex employees is to sell gold for money, increasing their revenue. Marketing this as "fighting with goldfarmers". This is why they are so active banning bots now - want to clean the space before selling membership bonds. The question is if they will be satisfied with earnings increased and stop fighting bots, or no.
-
interactAndWait(), castSpellOn(Spell spell, Entity entity)
Want to share some snippets i'm using. Dont sure if they are needed by scripters, but... The first is function that interacts with object, and then waits until movement and animations will end. If interact insuccessful, returns false without waiting. public static boolean interactAndWait(Script scp, Player player, RS2Object obj, String action) throws InterruptedException{ if(player.isMoving() || player.isAnimating()){ do{ scp.sleep(100); } while(player.isMoving() || player.isAnimating()); scp.sleep(200); } //if(!obj.isVisible()){ // scp.client.moveCameraToEntity(obj); // return false; //} if(obj.interact(action)){ scp.sleep(500); while(player.isMoving()){ scp.sleep(100); } int x = player.getX(); int y = player.getY(); int z = player.getZ(); scp.sleep(1500); while(player.isAnimating()) scp.sleep(100); if(action == "Pull"){ Date start = new Date(); while(true) { if((new Date().getTime() - start.getTime()) >= 5000){ scp.log("break by time"); break; } if(player.getX()!=x || player.getY()!=y || player.getZ()!=z){ scp.log("break by loc"); break; //teleported } scp.sleep(100); } } return true; } return false; } The second is casting spell on entity routine, with improved accuracy (tries to click by horizontal and vertical around bounding box center of entity). CHECK IT in your case! public boolean castSpellOn(Spell spell, Entity entity) throws InterruptedException{ scp.magicTab.castSpell(spell); sleep(200, 300); for(int i = 0; i<7; i++){ Rectangle bb = entity.getMouseDestination().getBoundingBox(); //Rectangle bbmodified = new Rectangle(bb.x - bb.width/2, bb.y - bb.height/2, bb.width, bb.height); int x = (int)bb.getCenterX(); int y = (int)bb.getCenterY(); if(i==0){ if(!client.moveMouseTo(entity.getMouseDestination(), false, false, false)) return false; } if(i==1){ if(!client.moveMouseTo(new RectangleDestination(x - 10, y - 10, 4, 4), false, false, false)) return false; } if(i==2){ if(!client.moveMouseTo(new RectangleDestination(x - 2, y - 12, 4, 4), false, false, false)) return false; } if(i==3){ if(!client.moveMouseTo(new RectangleDestination(x + 10, y - 10, 4, 4), false, false, false)) return false; } if(i==4){ if(!client.moveMouseTo(new RectangleDestination(x + 10, y + 10, 4, 4), false, false, false)) return false; } if(i==5){ if(!client.moveMouseTo(new RectangleDestination(x - 2, y + 12, 4, 4), false, false, false)) return false; } if(i==6){ if(!client.moveMouseTo(new RectangleDestination(x - 10, y + 10, 4, 4), false, false, false)) return false; } sleep(100, 150); Option opt = client.getMenu().get(0); if(opt==null) continue; if(!opt.action.equals("Cast")) continue; if(!opt.noun.contains(entity.getName())) continue; client.clickMouse(false); return true; } return false; }
-
Random Solver Snippet?
Hello! Want to implement my own Run Away From Combat Random, so it can climb Staircases, where do I can look at some Random Snippet source? Thanks, dark_xor.
-
Setting spell of staff?
Have anyone snippet of assigning a spell to a staff? So when I attack somebody, it auto-cast this spell? Thanks, dark_xor.
-
Run away from combat?
Dont sure why, but after the patch bot stopped to run away from [Tree spirit] while woodcutting. Also, have a question - what is exact logic of triggering [Run away from combat] random? For example, if I attack somebody it is not triggered. So, what the conditions are?
-
Screenshot every 10 seconds?
Hello! Does anyone know how can I make screenshot of bot tab every N seconds? Bot sometimes do wrong things and I want to watch it somehow. But it occurs not so frequent.
-
Selling Farm Account's!
Hey, have problems with 2 of 4 accounts I bought from you: one of them is frozen due to payment dispute, and second have lost a membership!!!
-
Finding if tile is walkable
You may call client.getClippingPlanes() - there are 4 planes in OSRS. Then get current plane via client.getPlane(). So: XClippingPlane plane = client.getClippingPlanes()[client.getPlane()]; XClippingPlane have method getTileFlags() returning int[][] - flags of tiles of current region. Current region starts at {client.getMapBaseX(), client.getMapBaseY()}, so if you want to get flags of {X,Y} cell, you need to exec like int[][] tileFlags = ...; int flags = tileFlags[X - client.getMapBaseX()][Y-getMapBaseY()]; This is known flags (those i used): [Flags] enum TileFlag : int { WALL_NORTH_WEST = 0x1, WALL_NORTH = 0x2, WALL_NORTH_EAST = 0x4, WALL_EAST = 0x8, WALL_SOUTH_EAST = 0x10, WALL_SOUTH = 0x20, WALL_SOUTH_WEST = 0x40, WALL_WEST = 0x80, BLOCKED = 0x100, //забор пересекает, дерево, какой-то объект -> непроходима RANGE_BLOCKED = 0x20000, //дистанционные атаки не проходят через эту клетку IMPASSABLE = 0x200000, //тайл непроходимый из-за самого себя (вода, наклон тайла, т.п.) TILE_NOT_LOADED = 0xFFFFFF, //тайл на краю, не загружен толком } What you want is BLOCKED - some object blocks pass on this tile (wall for example) and IMPASSABLE - tile is impassable due to it's landscape angle or it is water or etc. WALL_xx - means that moving to {X,Y} from xx is not allowed. Hope this will help you. Have working world pathfinding code based on this data.
-
Clients vs tabs
Many clients will consume more RAM but can take less CPU due to garbage collection simplification.
-
Getting email or login of tab?
Thanks, it working!
-
Changing world BEFORE logging on?
How can I after opening tabs automatically randomize world numbers?