October 30, 201510 yr Start South of the Skeletons over the River in Varrock Sewers. Can be used from 30+ range. 30 15k /hr (No breaks) 50 20k /hr (No breaks) 60 25k /hr (No breaks) 30 - 70 Range takes 5 normal days WITH breaks. Safemode keeps player in a position to get the best XP/HR as well as preventing character from running around the river. It's not perfect, but it gets the job done :-) package Ranged; import org.osbot.rs07.antiban.AntiBan; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.api.model.Player; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.api.ui.Tab; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; import java.util.concurrent.TimeUnit; /** * Created by Admin on 10/24/2015. */ @ScriptManifest(name="Varrock Skeleton Ranger",author="Acinate", info="Ranges Skeletons inside Varrock Sewer.", version=1.1, logo="") public class Skeleton_Ranger extends Script { Area RiverSpot = new Area(3253,9911,3255,9907); Area RangeSpot = new Area(3253,9911,3253,9911); Area Skeletons = new Area(3250,9918,3256,9914); Area FarSkeletons = new Area(3249,9913,3246,9918); Position SafeSpot = new Position(3253,9911,0); Player[] randomPlayers = new Player[] {}; public boolean isSkeleton() { NPC Skeleton = npcs.closest(Skeletons, "Skeleton"); if (Skeleton.isUnderAttack()) { return true; } else return false; } public long timeBegan; public long timeRan; private int startXP, currentXP, GainedXP, xpPerHour; public void onStart() throws InterruptedException { log("Thanks for choosing SkeletonZ!"); timeBegan = System.currentTimeMillis(); startXP = skills.getExperience(Skill.RANGED) + skills.getExperience(Skill.DEFENCE) + skills.getExperience(Skill.HITPOINTS); } private enum State { KILL, IDLE, HOP, SAFEMODE, DIA }; private State getState() { if (dialogues.isPendingContinuation()) return State.DIA; else if (!RiverSpot.contains(myPlayer()) && !myPlayer().isAnimating()) return State.SAFEMODE; else if (RiverSpot.contains(myPlayer()) && !myPlayer().isAnimating()) return State.KILL; else return State.IDLE; } public int onLoop() throws InterruptedException { switch(getState()) { case DIA: dialogues.clickContinue(); case KILL: log("case KILL:"); NPC Skeleton = npcs.closest(Skeletons, "Skeleton"); NPC FarSkeleton = npcs.closest(FarSkeletons, "Skeleton"); if (RangeSpot.contains(myPlayer())) { if (Skeleton != null && !myPlayer().isInteracting(Skeleton)) { if (Skeleton.getAnimation() != 5491) Skeleton.interact("Attack"); } else if (Skeleton == null && FarSkeleton != null) { log("Attacking far Skeletons...."); FarSkeleton.interact("Attack"); localWalker.walk(RangeSpot, true); sleep(random(1000,2000)); FarSkeleton.interact("Attack"); } } else if(!RangeSpot.contains(myPlayer())) { SafeSpot.interact(bot,"Walk here"); } break; case SAFEMODE: log("case SAFEMODE:"); localWalker.walk(RiverSpot, true); break; case IDLE: log("case IDLE:"); NPC Skele = npcs.closest(Skeletons, "Skeleton"); int SkeleHealth; SkeleHealth = Skele.getHealth(); log(SkeleHealth); int random = random(0, 10); log(random); while (myPlayer().isAnimating() && SkeleHealth > 0) { if (random < 2) tabs.getSkills().hoverSkill(Skill.RANGED); else if (random == 3) tabs.getSkills().hoverSkill(Skill.RANGED); else if (random == 4) tabs.getSkills().hoverSkill(Skill.HITPOINTS); else if (random == 5) { log("Adjusting Camera"); if (isSkeleton() == true) camera.toEntity(Skele); } else if (random > 5) { mouse.moveRandomly(); if (random == 6) sleep(random(2000, 3000)); else if (random == 7) sleep(random(3000, 4000)); else if (random == 8) sleep(random(4000, 5000)); else if (random >= 9) sleep(random(5000, 6000)); } } NPC nextSkele = npcs.closest(Skeletons, "Skeleton"); if (isSkeleton() == false) { log("Attacking next Skeleton.."); nextSkele.interact("Attack"); } if (random % 3 == 0) tabs.open(Tab.INVENTORY); mouse.moveRandomly(); break; } return 1000; } public void onPaint(Graphics2D g) { Graphics2D gr = g; gr.setColor(Color.WHITE); gr.setFont(new Font("Arial", Font.ROMAN_BASELINE, 14)); timeRan = System.currentTimeMillis() - timeBegan; currentXP = skills.getExperience(Skill.RANGED) + skills.getExperience(Skill.DEFENCE) + skills.getExperience(Skill.HITPOINTS); GainedXP = currentXP - startXP; xpPerHour = (int)(GainedXP / ((System.currentTimeMillis() - timeBegan) / 3600000.0)); gr.drawString("Time Ran: " + ft(timeRan), 25, 297); gr.drawString("XP Gained: " + GainedXP, 25, 312); gr.drawString("XP Per hour:" + xpPerHour, 25, 327); } private String ft(long duration) { String res = ""; long days = TimeUnit.MILLISECONDS.toDays(duration); long hours = TimeUnit.MILLISECONDS.toHours(duration) - TimeUnit.DAYS.toHours(TimeUnit.MILLISECONDS.toDays(duration)); long minutes = TimeUnit.MILLISECONDS.toMinutes(duration) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS .toHours(duration)); long seconds = TimeUnit.MILLISECONDS.toSeconds(duration) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS .toMinutes(duration)); if (days == 0) { res = (hours + ":" + minutes + ":" + seconds); } else { res = (days + ":" + hours + ":" + minutes + ":" + seconds); } return res; } } Download it here: http://www.filedropper.com/ranged Extract into OSBOT/Scripts" Edited October 30, 201510 yr by Acinate
October 31, 201510 yr Author what his range level thanks for the script those are some top notch stats u got there mate :P , it is fresh account. Thanks, looking for some feedback on the methods I've used. Improvements are always nice
November 28, 201510 yr So i downloaded and putted it to Scripts folder but it doesnt show up, so i guess its not working anymore?
December 1, 201510 yr http://www.mediafire.com/download/cy5ynzqps84o30b/Skeleton_Ranger.jar I just recompiled it.
January 29, 20179 yr 6 hours ago, DrDu said: pls post sauce package Ranged; import org.osbot.rs07.antiban.AntiBan; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.api.model.Player; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.api.ui.Tab; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; import java.util.concurrent.TimeUnit; /** * Created by Admin on 10/24/2015. */ @ScriptManifest(name="Varrock Skeleton Ranger",author="Acinate", info="Ranges Skeletons inside Varrock Sewer.", version=1.1, logo="") public class Skeleton_Ranger extends Script { Area RiverSpot = new Area(3253,9911,3255,9907); Area RangeSpot = new Area(3253,9911,3253,9911); Area Skeletons = new Area(3250,9918,3256,9914); Area FarSkeletons = new Area(3249,9913,3246,9918); Position SafeSpot = new Position(3253,9911,0); Player[] randomPlayers = new Player[] {}; public boolean isSkeleton() { NPC Skeleton = npcs.closest(Skeletons, "Skeleton"); if (Skeleton.isUnderAttack()) { return true; } else return false; } public long timeBegan; public long timeRan; private int startXP, currentXP, GainedXP, xpPerHour; public void onStart() throws InterruptedException { log("Thanks for choosing SkeletonZ!"); timeBegan = System.currentTimeMillis(); startXP = skills.getExperience(Skill.RANGED) + skills.getExperience(Skill.DEFENCE) + skills.getExperience(Skill.HITPOINTS); } private enum State { KILL, IDLE, HOP, SAFEMODE, DIA }; private State getState() { if (dialogues.isPendingContinuation()) return State.DIA; else if (!RiverSpot.contains(myPlayer()) && !myPlayer().isAnimating()) return State.SAFEMODE; else if (RiverSpot.contains(myPlayer()) && !myPlayer().isAnimating()) return State.KILL; else return State.IDLE; } public int onLoop() throws InterruptedException { switch(getState()) { case DIA: dialogues.clickContinue(); case KILL: log("case KILL:"); NPC Skeleton = npcs.closest(Skeletons, "Skeleton"); NPC FarSkeleton = npcs.closest(FarSkeletons, "Skeleton"); if (RangeSpot.contains(myPlayer())) { if (Skeleton != null && !myPlayer().isInteracting(Skeleton)) { if (Skeleton.getAnimation() != 5491) Skeleton.interact("Attack"); } else if (Skeleton == null && FarSkeleton != null) { log("Attacking far Skeletons...."); FarSkeleton.interact("Attack"); localWalker.walk(RangeSpot, true); sleep(random(1000,2000)); FarSkeleton.interact("Attack"); } } else if(!RangeSpot.contains(myPlayer())) { SafeSpot.interact(bot,"Walk here"); } break; case SAFEMODE: log("case SAFEMODE:"); localWalker.walk(RiverSpot, true); break; case IDLE: log("case IDLE:"); NPC Skele = npcs.closest(Skeletons, "Skeleton"); int SkeleHealth; SkeleHealth = Skele.getHealth(); log(SkeleHealth); int random = random(0, 10); log(random); while (myPlayer().isAnimating() && SkeleHealth > 0) { if (random < 2) tabs.getSkills().hoverSkill(Skill.RANGED); else if (random == 3) tabs.getSkills().hoverSkill(Skill.RANGED); else if (random == 4) tabs.getSkills().hoverSkill(Skill.HITPOINTS); else if (random == 5) { log("Adjusting Camera"); if (isSkeleton() == true) camera.toEntity(Skele); } else if (random > 5) { mouse.moveRandomly(); if (random == 6) sleep(random(2000, 3000)); else if (random == 7) sleep(random(3000, 4000)); else if (random == 8) sleep(random(4000, 5000)); else if (random >= 9) sleep(random(5000, 6000)); } } NPC nextSkele = npcs.closest(Skeletons, "Skeleton"); if (isSkeleton() == false) { log("Attacking next Skeleton.."); nextSkele.interact("Attack"); } if (random % 3 == 0) tabs.open(Tab.INVENTORY); mouse.moveRandomly(); break; } return 1000; } public void onPaint(Graphics2D g) { Graphics2D gr = g; gr.setColor(Color.WHITE); gr.setFont(new Font("Arial", Font.ROMAN_BASELINE, 14)); timeRan = System.currentTimeMillis() - timeBegan; currentXP = skills.getExperience(Skill.RANGED) + skills.getExperience(Skill.DEFENCE) + skills.getExperience(Skill.HITPOINTS); GainedXP = currentXP - startXP; xpPerHour = (int)(GainedXP / ((System.currentTimeMillis() - timeBegan) / 3600000.0)); gr.drawString("Time Ran: " + ft(timeRan), 25, 297); gr.drawString("XP Gained: " + GainedXP, 25, 312); gr.drawString("XP Per hour:" + xpPerHour, 25, 327); } private String ft(long duration) { String res = ""; long days = TimeUnit.MILLISECONDS.toDays(duration); long hours = TimeUnit.MILLISECONDS.toHours(duration) - TimeUnit.DAYS.toHours(TimeUnit.MILLISECONDS.toDays(duration)); long minutes = TimeUnit.MILLISECONDS.toMinutes(duration) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS .toHours(duration)); long seconds = TimeUnit.MILLISECONDS.toSeconds(duration) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS .toMinutes(duration)); if (days == 0) { res = (hours + ":" + minutes + ":" + seconds); } else { res = (days + ":" + hours + ":" + minutes + ":" + seconds); } return res; } }
January 30, 20179 yr 3 hours ago, FFTL said: package Ranged; import org.osbot.rs07.antiban.AntiBan; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.api.model.Player; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.api.ui.Tab; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; import java.util.concurrent.TimeUnit; /** * Created by Admin on 10/24/2015. */ @ScriptManifest(name="Varrock Skeleton Ranger",author="Acinate", info="Ranges Skeletons inside Varrock Sewer.", version=1.1, logo="") public class Skeleton_Ranger extends Script { Area RiverSpot = new Area(3253,9911,3255,9907); Area RangeSpot = new Area(3253,9911,3253,9911); Area Skeletons = new Area(3250,9918,3256,9914); Area FarSkeletons = new Area(3249,9913,3246,9918); Position SafeSpot = new Position(3253,9911,0); Player[] randomPlayers = new Player[] {}; public boolean isSkeleton() { NPC Skeleton = npcs.closest(Skeletons, "Skeleton"); if (Skeleton.isUnderAttack()) { return true; } else return false; } public long timeBegan; public long timeRan; private int startXP, currentXP, GainedXP, xpPerHour; public void onStart() throws InterruptedException { log("Thanks for choosing SkeletonZ!"); timeBegan = System.currentTimeMillis(); startXP = skills.getExperience(Skill.RANGED) + skills.getExperience(Skill.DEFENCE) + skills.getExperience(Skill.HITPOINTS); } private enum State { KILL, IDLE, HOP, SAFEMODE, DIA }; private State getState() { if (dialogues.isPendingContinuation()) return State.DIA; else if (!RiverSpot.contains(myPlayer()) && !myPlayer().isAnimating()) return State.SAFEMODE; else if (RiverSpot.contains(myPlayer()) && !myPlayer().isAnimating()) return State.KILL; else return State.IDLE; } public int onLoop() throws InterruptedException { switch(getState()) { case DIA: dialogues.clickContinue(); case KILL: log("case KILL:"); NPC Skeleton = npcs.closest(Skeletons, "Skeleton"); NPC FarSkeleton = npcs.closest(FarSkeletons, "Skeleton"); if (RangeSpot.contains(myPlayer())) { if (Skeleton != null && !myPlayer().isInteracting(Skeleton)) { if (Skeleton.getAnimation() != 5491) Skeleton.interact("Attack"); } else if (Skeleton == null && FarSkeleton != null) { log("Attacking far Skeletons...."); FarSkeleton.interact("Attack"); localWalker.walk(RangeSpot, true); sleep(random(1000,2000)); FarSkeleton.interact("Attack"); } } else if(!RangeSpot.contains(myPlayer())) { SafeSpot.interact(bot,"Walk here"); } break; case SAFEMODE: log("case SAFEMODE:"); localWalker.walk(RiverSpot, true); break; case IDLE: log("case IDLE:"); NPC Skele = npcs.closest(Skeletons, "Skeleton"); int SkeleHealth; SkeleHealth = Skele.getHealth(); log(SkeleHealth); int random = random(0, 10); log(random); while (myPlayer().isAnimating() && SkeleHealth > 0) { if (random < 2) tabs.getSkills().hoverSkill(Skill.RANGED); else if (random == 3) tabs.getSkills().hoverSkill(Skill.RANGED); else if (random == 4) tabs.getSkills().hoverSkill(Skill.HITPOINTS); else if (random == 5) { log("Adjusting Camera"); if (isSkeleton() == true) camera.toEntity(Skele); } else if (random > 5) { mouse.moveRandomly(); if (random == 6) sleep(random(2000, 3000)); else if (random == 7) sleep(random(3000, 4000)); else if (random == 8) sleep(random(4000, 5000)); else if (random >= 9) sleep(random(5000, 6000)); } } NPC nextSkele = npcs.closest(Skeletons, "Skeleton"); if (isSkeleton() == false) { log("Attacking next Skeleton.."); nextSkele.interact("Attack"); } if (random % 3 == 0) tabs.open(Tab.INVENTORY); mouse.moveRandomly(); break; } return 1000; } public void onPaint(Graphics2D g) { Graphics2D gr = g; gr.setColor(Color.WHITE); gr.setFont(new Font("Arial", Font.ROMAN_BASELINE, 14)); timeRan = System.currentTimeMillis() - timeBegan; currentXP = skills.getExperience(Skill.RANGED) + skills.getExperience(Skill.DEFENCE) + skills.getExperience(Skill.HITPOINTS); GainedXP = currentXP - startXP; xpPerHour = (int)(GainedXP / ((System.currentTimeMillis() - timeBegan) / 3600000.0)); gr.drawString("Time Ran: " + ft(timeRan), 25, 297); gr.drawString("XP Gained: " + GainedXP, 25, 312); gr.drawString("XP Per hour:" + xpPerHour, 25, 327); } private String ft(long duration) { String res = ""; long days = TimeUnit.MILLISECONDS.toDays(duration); long hours = TimeUnit.MILLISECONDS.toHours(duration) - TimeUnit.DAYS.toHours(TimeUnit.MILLISECONDS.toDays(duration)); long minutes = TimeUnit.MILLISECONDS.toMinutes(duration) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS .toHours(duration)); long seconds = TimeUnit.MILLISECONDS.toSeconds(duration) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS .toMinutes(duration)); if (days == 0) { res = (hours + ":" + minutes + ":" + seconds); } else { res = (days + ":" + hours + ":" + minutes + ":" + seconds); } return res; } } What's the problem? Why's it broken.
January 31, 20179 yr On 1/30/2017 at 2:15 AM, Satire said: What's the problem? Why's it broken. Its not running back where it should stay, if it missclicks. Safespot is not working.
January 31, 20179 yr Its not running back where it should stay, if it missclicks. Safespot is not working. I accidentally edited out the post. This is just a quick one I wrote as I fked the other one over real bad Here's the problem. if (RangeSpot.contains(myPlayer())) { if (Skeleton != null && !myPlayer().isInteracting(Skeleton)) { if (Skeleton.getAnimation() != 5491) Skeleton.interact("Attack"); } else if (Skeleton == null && FarSkeleton != null) { log("Attacking far Skeletons...."); FarSkeleton.interact("Attack"); localWalker.walk(RangeSpot, true); sleep(random(1000,2000)); FarSkeleton.interact("Attack"); } } else if(!RangeSpot.contains(myPlayer())) { SafeSpot.interact(bot,"Walk here"); } Should be if (RangeSpot.contains(myPlayer())) { if (Skeleton != null && !myPlayer().isInteracting(Skeleton)) { if(Safespot.contains(myPlayer()){ if (Skeleton.getAnimation() != 5491) Skeleton.interact("Attack"); } } else if (Skeleton == null && FarSkeleton != null) { log("Attacking far Skeletons...."); FarSkeleton.interact("Attack"); localWalker.walk(RangeSpot, true); sleep(random(1000,2000)); FarSkeleton.interact("Attack"); } } else if(!RangeSpot.contains(myPlayer())) { if(!SafeSpot.contains(myPlayer()) SafeSpot.interact(bot,"Walk here"); } If this doesn't work then you'd need to tell just say if the players position != safespot position. Then walk there. Edited January 31, 20179 yr by Satire
Create an account or sign in to comment