Everything posted by Explv
-
Best method of traversing menu/dialogue
Just clicks, you will have to write your own methods if you want to do that.
-
Best method of traversing menu/dialogue
Just use getDialogues().completeDialogue(options) it will click continue and click on any options with the text you specify until the dialogue is over
-
VIP+ Script User Count
Awesome, thanks. Feel free to close the thread.
-
VIP+ Script User Count
Not sure whether this information is currently accessible or not (I couldn't find it). Currently for premium scripts you can ascertain the popularity of your script by looking at sales. For free scripts you can see the user count on the scripts page. However, for VIP+ scripts there isn't currently a way (I don't think) to see a user count. Could we get access to this information, either on the script page, or just privately on the sales info page?
-
Npc walking?
So you are saying the method "isMoving" should return true even if the npc is not moving? The method is called isMoving() not canMove()
-
Npc walking?
- A Beginners Guide to Writing OSBot Scripts (where to get started!) by Apaec
The code I commented with only gets the stall object once, and then stores it. The code you have written here is just a longer way of writing: private Entity teaStall; public final int onLoop() throws InterruptedException { if (teastall == null) teaStall = getObjects().closest("Tea stall"); } Which is exactly what my code does. Also I would not concern yourself with memory usage here.- A Beginners Guide to Writing OSBot Scripts (where to get started!) by Apaec
I assume you mean a global variable? You could do something like that if you wanted to, by doing so you would only need to find the tea stall once: import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; @ScriptManifest(author = "You", info = "My first script", name = "Tea thiever", version = 0.1, logo = "") public final class TeaThiever extends Script { private Entity teaStall; @Override public final int onLoop() throws InterruptedException { if(teaStall == null) teaStall = getObjects().closest("Tea stall"); else if(getInventory().isFull()) getInventory().dropAll(); else if(teaStall.hasAction("Steal-from")) stealFromStall(); return random(200, 300); } private void stealFromStall() { if(teaStall.interact("Steal-from")) { new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return myPlayer().isAnimating(); } }.sleep(); } } }- Explv's Walker
Hopefully if I remember, I will be adding a map to this script this weekend so you can select whatever location you want. I will add sand crabs today though for you- Explv's AIO [13 skill AIO in 1 script]
Thanks I'll take a look at it Thanks for the report I'll take a look at it- Explv's AIO [13 skill AIO in 1 script]
Nevermind. I'm a fucking idiot, ignore me. That update was pushed, sorry, apparently I can't read times.- Explv's AIO [13 skill AIO in 1 script]
I don't know what is going on, I am trying to get hold of the developers to find out.- Interacting with stairs
- Need something
- Explv's AIO [13 skill AIO in 1 script]
Unfortunately not, this script is for VIP users only (at least for the time being).- Explv's AIO [13 skill AIO in 1 script]
I have, you have to wait for the SDN to update which is out of my control- Explv's AIO [13 skill AIO in 1 script]
Already aware of, and have fixed this issue. See the comments above- Explv's AIO [13 skill AIO in 1 script]
Unfortunately it looks like my script has not been updated yet. Last compile time was 2016-06-26 17:09:55 I will let you guys know when the script has been recompiled. Thank you for your patience.- HighScore Snippet
It's a HashMap. You would just do: getStats(playerName).get(Skill.ATTACK.toString()).getLevel(); Why wouldn't you just use a HashMap? This seems like a weird solution xD- Explv's AIO [13 skill AIO in 1 script]
No problem, thanks for the bug report- Explv's AIO [13 skill AIO in 1 script]
I am already aware of this as someone has previously posted it. I have fixed the issue, when the SDN is next updated (some time today) it will be resolved.- HighScore Snippet
Runescape has an official Highscores API that you can make use of Here is an example of how you could use it: public final Map<String, Stat> getStats(final String playerName) { final Map<String, Stat> stats = new HashMap<>(24); try { URL url = new URL("http://services.runescape.com/m=hiscore_oldschool/index_lite.ws?player=" + playerName); URLConnection con = url.openConnection(); con.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36"); con.setUseCaches(true); try(InputStreamReader inputStreamReader = new InputStreamReader(con.getInputStream()); BufferedReader br = new BufferedReader(inputStreamReader)) { String[] splitVals = br.readLine().split(","); Stat overallStat = new Stat(Integer.parseInt(splitVals[0]), Integer.parseInt(splitVals[1]), Integer.parseInt(splitVals[2])); stats.put("Overall", overallStat); for (final Skill skill : Skill.values()) { splitVals = br.readLine().split(","); stats.put(skill.toString(), new Stat(Integer.parseInt(splitVals[0]), Integer.parseInt(splitVals[1]), Integer.parseInt(splitVals[2]))); } } } catch(final Exception e){ e.printStackTrace(); } return stats; } Where Stat is: public final class Stat { private final int rank, level, xp; public Stat(final int rank, final int level, final int xp) { this.rank = rank; this.level = level; this.xp = xp; } public final int getRank() { return rank; } public final int getLevel() { return level; } public final int getXp() { return xp; } @Override public final String toString() { return String.format("Rank: %d, Level: %d, XP: %d", rank, level, xp); } } Testing: getStats("zezima").forEach((s, stat) -> System.out.println(s + " " + stat.toString())); Output: Overall Rank: 1044122, Level: 263, XP: 171029 Hunter Rank: 469487, Level: 1, XP: 0 Thieving Rank: 727948, Level: 13, XP: 1872 Construction Rank: 379600, Level: 1, XP: 0 Cooking Rank: 729252, Level: 31, XP: 14890 Magic Rank: 1254581, Level: 2, XP: 110 Fletching Rank: 409758, Level: 37, XP: 27502 Herblore Rank: 619712, Level: 1, XP: 0 Firemaking Rank: 370103, Level: 43, XP: 50460 Attack Rank: 1488162, Level: 7, XP: 652 Fishing Rank: 800753, Level: 24, XP: 7030 Crafting Rank: 961015, Level: 3, XP: 230 Hitpoints Rank: 1623703, Level: 13, XP: 1989 Ranged Rank: -1, Level: 1, XP: 4 Mining Rank: 1002037, Level: 13, XP: 2047 Runecrafting Rank: 511420, Level: 1, XP: 0 Smithing Rank: 1455957, Level: 1, XP: 18 Agility Rank: 829188, Level: 1, XP: 0 Woodcutting Rank: 596579, Level: 44, XP: 61130 Slayer Rank: 786552, Level: 1, XP: 10 Defence Rank: 1391507, Level: 1, XP: 36 Strength Rank: 1382147, Level: 13, XP: 1848 Prayer Rank: 1097298, Level: 10, XP: 1201 Farming Rank: 487599, Level: 1, XP: 0- Simply Use a method from another class in same package
http://www.tutorialspoint.com/java/- Explv's AIO [13 skill AIO in 1 script]
There is a bug so it won't start, will be fixed for tomorrow though.- Explv's AIO [13 skill AIO in 1 script]
No, I will be adding abyss in the future though. - A Beginners Guide to Writing OSBot Scripts (where to get started!) by Apaec