-
Posts
1899 -
Joined
-
Last visited
-
Feedback
100%
Everything posted by Dark Magician
-
Good job on the release, but the download link is down.
-
Thanks G, also your rap skills ain't bad.
-
I am last.
-
Thank you very much! I've actually never used lambda exporession before, so will try it out, seems much better! Again will defiantly look into all the things you posted.
-
Thanks a lot! Awesome work.
-
Sorry I may have overreacted. I need to learn how to take constructive criticism. Anyways been working on a new paint.
-
I see. I guess when the world explodes it may matter.
-
Doesn't really matter. Gets the job done, no complaints here.
-
NPC Filter + check if another player is interacting with it. public boolean isPlayerInteracting(NPC npc) { for (Player p : players.getAll()) { if (p.getInteracting() != null && p.getInteracting() == npc || p.getInteracting() != null && p.getInteracting().getPosition() == npc.getPosition() || p.getInteracting() != null && p.getInteracting().isInteracting(npc)) { return true; } } return false; } public boolean walkTile(Position p) throws InterruptedException { if(this.myPosition().distance(p) > 13) { Position fail = new Position((p.getX() + this.myPosition().getX()) / 2 + random(-3, 3), (p.getY() + this.myPosition().getY()) / 2 + random(-3, 3), this.myPosition().getZ()); this.walkTile(fail); } this.mouse.click(new MiniMapTileDestination(this.bot, p), false); int var3 = 0; while(this.myPosition().distance(p) > 2 && var3 < 10) { sleep(500L); if(!this.myPlayer().isMoving()) { ++var3; } } return var3 != 10; } public boolean isNpcValid(NPC npc) { if (npc != null && map.canReach(npc)) { int id = npc.getId(); if (id != -1) { for (NPC i : getNpcs().get(npc.getX(), npc.getY())) { if (i.getId() == id) return true; } } } return false; } public void interact(NPC n, String action) throws InterruptedException { if (map.isWithinRange(n, 7)) { status = "Interacting with " + n.getName(); double x = n.model.getBoundingBox(n.getGridX(), n.getGridY(), n.getZ()).getCenterX(); double y = n.model.getBoundingBox(n.getGridX(), n.getGridY(), n.getZ()).getCenterY(); mouse.move((int) x, (int) y); if (mouse.getEntitiesOnCursor() != null && mouse.getEntitiesOnCursor().contains(n) && mouse.click(true)) { if (menu.isOpen() && menu.selectAction(action)) { sleep(random(900, 1200)); } else { mouse.moveRandomly(); } } else { camera.toEntity(n); } } else if (n.getPosition().isOnMiniMap(this.client.bot)) { status = "Walking to " + n.getName(); walkTile(n.getPosition()); } else if (localWalker.walk(n)) { status = "Walking to " + n.getName(); sleep(random(900, 1200)); } } NPC yak = getNpcs().closest(new Filter<NPC>() { @Override public boolean match(NPC npc) { return npc != null && npc.exists() && npc.getName().contains("Yak") && npc.isAttackable() && !npc.isUnderAttack() && npc.getHealth() != 0 && !isPlayerInteracting(npc) && map.isWithinRange(myPlayer().getPosition(), npc, 7); }}); if (isNpcValid(yak)) { interact(yak, "Attack"); }
-
if (getDialogues().isPendingContinuation()) { getDialogues().clickContinue(); return random(900 , 1200); }
-
Scotty is... weak as, just like drinking acid. Na scratch the tape. Re-mastered. Snatch your date, oh wait hows your day? OSBot's number 1 rap master. Script writer, code harder than Dragon's armour. At school right now, acting drama. Scotty watch closely as I activate my super power. Scotty your odd socially... awkward. While I'm walking a slaughter spree.
-
Wow got some mad skills brah.
-
Rules: Post rhyme about the person above you! Botre, na more like pottery. I'm the real MC, the center piece, scripting Entities to be enemies, so please defend at least. How you like it, ripe or sour? Rifle power, snipe you from the Efile tower.
-
Awesome job guys! So far so good today.
-
private int r = 255; private int g = 0; private int b = 0;
-
I'm using this Mouse Trail in all my scripts.
-
Thanks a lot! My script has gotten me from 40-70 range, so no complaints here. Hill Giant Magician should be on the SDN very soon, free for a limited time!
-
Thank you so much!
-
Thanks for the feedback! The code above works just as presented.
-
Wow thanks for the information! Very helpful. Will now rewrite and make my method better.
-
Pretty much the Tile box will not contain the NPC resulting in the mouse not being able to interact with the NPC. I believe this is because the Tile height is wrong.
-
Sorry to be more correct, mouse movements to the Entity will be quicker and interaction more accurate, excluding Drops and RSObjects, since I prioritized fast NPC interaction whereas Drops and Objects need not be. Will edit my first post.
-
Thanks for the information. Could you give an example on how to do moving Entities. Also reason I'm not using the normal interact is because of the Tile error where it will always fail to find the Hill Giant, which you can see if you drawTile. Run Hill Giant Magician V 2.1
-
Yea can't even start the bot right now.
-
This is more accurate than the standard GroundItem interact. public boolean isNpcValid(NPC npc) { if (npc != null && map.canReach(npc)) { int id = npc.getId(); if (id != -1) { for (NPC i : getNpcs().get(npc.getX(), npc.getY())) { if (i.getId() == id) return true; } } } return false; } public boolean isGroundItemValid(GroundItem item) { if (item != null && item.exists() && map.canReach(item) && item.getPosition().distance(myPlayer().getPosition()) <= 7) { int id = item.getId(); if (id != -1) { for (GroundItem i : getGroundItems().get(item.getX(), item.getY())) { if (i.getId() == id) return true; } } } return false; } public boolean isObjectValid(RS2Object object) { if (object != null && object.exists() && map.canReach(object) && object.isVisible()) { int id = object.getId(); if (id != -1) { for (RS2Object i : getObjects().get(object.getX(), object.getY())) { if (i.getId() == id) return true; } } } return false; } public boolean isPlayerInteracting(NPC npc) { for (Player p : players.getAll()) { if (p.getInteracting() != null && p.getInteracting() == npc || p.getInteracting() != null && p.getInteracting().getPosition() == npc.getPosition() || p.getInteracting() != null && p.getInteracting().isInteracting(npc)) { return true; } } return false; } public void walkPath(Position[] path) throws InterruptedException { Position[] var5 = path; int var4 = path.length; for(int var3 = 0; var3 < var4; ++var3) { Position p = var5[var3]; boolean success; if(this.myPosition().distance(p) <= 16 && this.myPosition().distance(p) >= 3) { do { success = this.walkTile(p); } while(!success); } } } public boolean walkTile(Position p) throws InterruptedException { if(this.myPosition().distance(p) > 13) { Position fail = new Position((p.getX() + this.myPosition().getX()) / 2 + random(-3, 3), (p.getY() + this.myPosition().getY()) / 2 + random(-3, 3), this.myPosition().getZ()); this.walkTile(fail); } this.mouse.click(new MiniMapTileDestination(this.bot, p), false); int var3 = 0; while(this.myPosition().distance(p) > 2 && var3 < 10) { sleep(500L); if(!this.myPlayer().isMoving()) { ++var3; } } return var3 != 10; } public void interact(NPC n, String action) throws InterruptedException { if (map.isWithinRange(n, 7)) { status = "Interacting with " + n.getName(); double x = n.model.getBoundingBox(n.getGridX(), n.getGridY(), n.getZ()).getCenterX(); double y = n.model.getBoundingBox(n.getGridX(), n.getGridY(), n.getZ()).getCenterY(); mouse.move((int) x, (int) y); if (mouse.getEntitiesOnCursor() != null && mouse.getEntitiesOnCursor().contains(n) && mouse.click(true)) { if (menu.isOpen() && menu.selectAction(action)) { sleep(random(900, 1200)); } else { mouse.moveRandomly(); } } else { camera.toEntity(n); } } else if (n.getPosition().isOnMiniMap(this.client.bot)) { status = "Walking to " + n.getName(); walkTile(n.getPosition()); } else if (localWalker.walk(n)) { status = "Walking to " + n.getName(); sleep(random(900, 1200)); } } public void interact(GroundItem g, String action) throws InterruptedException { if (g.getPosition().distance(myPlayer().getPosition()) <= 1) { status = "Interacting with " + g.getName(); if (g.interact(action)) { sleep(random(900, 1200)); } else { camera.toEntity(g); } } else if (g.getPosition().isOnMiniMap(this.client.bot)) { status = "Walking to " + g.getName(); walkTile(g.getPosition()); } else if (localWalker.walk(g)) { status = "Walking to " + g.getName(); sleep(random(900, 1200)); } } public void interact(RS2Object o, String action) throws InterruptedException { if (o.isVisible()) { status = "Interacting with " + o.getName(); if (o.interact(action)) { sleep(random(900, 1200)); } else { camera.toEntity(o); } } else if (o.getPosition().isOnMiniMap(this.client.bot)) { status = "Walking to " + o.getName(); walkTile(o.getPosition()); } else if (localWalker.walk(o)) { status = "Walking to " + o.getName(); sleep(random(900, 1200)); } } Example: if (isObjectValid(objects.closest(11748))) { interact(objects.closest(11748), "Bank"); sleep(random(1500, 1700)); } else { status = "Walking to Bank"; camera.movePitch(67); camera.moveYaw(270); walkPath(DOOR_TO_BANK); } NPC hillGiant = getNpcs().closest(new Filter<NPC>() { @Override public boolean match(NPC npc) { return npc != null && npc.exists() && npc.getName().contains("Hill Giant") && npc.isAttackable() && !npc.isUnderAttack() && npc.getHealth() != 0 && !isPlayerInteracting(npc) && map.isWithinRange(myPlayer().getPosition(), npc, 7); }}); if (isNpcValid(hillGiant)) { interact(hillGiant, "Attack"); }