-
Posts
1642 -
Joined
-
Last visited
-
Days Won
4 -
Feedback
0%
Everything posted by Dreamliner
-
here's how I do it: public void onMessage(String s) throws InterruptedException { if (s.contains("You're assigned to kill")) { String[] half = s.split(";"); String[] token = half[0].split(" "); String[] token2 = half[1].split(" "); String monster = fixMonster(token[4].replaceAll(";", "")); int num = Integer.parseInt(token2[2]); this.t = new Task(monster, num); this.gem_checked = false; } else if (s.contains("You've completed your task")) { this.t.setNum(0); this.client.getInventory().interactWithName("Teleport to house", "Break"); } else if (s.contains("You need something new to hunt")) { } else if (s.contains("I'm already under attack")) { this.npc = null; } else if (s.contains("You have been poisoned")) { Item i = this.client.getInventory().getItemForNameThatContains("poison"); this.client.getInventory().interactWithId(i.getId(), "Drink"); } } public String fixMonster(String s) { String r = s; if (s.equalsIgnoreCase("rockslugs")) { r = "rockslug"; } else if (s.equalsIgnoreCase("dogs")) { r = "guard dog"; } else if (s.equalsIgnoreCase("kalphite")) { r = "kalphite"; this.area = new Area(3460, 9475, 3473, 9493); } else if (s.equalsIgnoreCase("aberrant")) { r = "aberrant spectre"; this.helm = 4168; this.chest = 5575; this.legs = 5576; this.pray_task = true; this.topray = Prayer.PROTECT_FROM_MAGIC; } else if (s.equalsIgnoreCase("banshees")) { this.helm = 4166; r = "banshee"; } else if (s.equalsIgnoreCase("wolves")) { r = "wolf"; } else if (s.equalsIgnoreCase("greater")) { r = "greater demon"; this.area = new Area(2626, 9511, 2645, 9494); } else if (s.equalsIgnoreCase("fire")) { r = "fire giant"; this.area = new Area(2584, 9885, 2575, 9899); } else if (s.endsWith("s")) { r = s.substring(0, s.length() - 1); } return r; }
-
There is. I find it more useful to scan thru all NPC's and find ones with the slayer task in their name - it's more universal private NPC getClosestAttackableNPC(String s, Area a) { Player p = this.client.getMyPlayer(); List<NPC> npclist = this.client.getLocalNPCs(); NPC b = null; double d = 20.0; if (a == null) { a = new Area(0, 0, 20000, 20000); } if (npclist != null) { NPC facing = null; int lowhp = 101; for (NPC n : npclist) { if (n.isInArea(a)) { if (n.instance.getDefinition().getCombatLevel() > 0) { if (n.isFacing(p)) { if (n.getPosition().distance(p.getPosition()) < 4) { if (n.getHealth() < lowhp) { lowhp = n.getHealth(); facing = n; } } } } } } for (NPC n : npclist) { if (n.getName().toLowerCase().contains(s)) { if (n.instance.getDefinition().getCombatLevel() > 0) { if (!n.isUnderAttack()) { if (n.isInArea(a)) { if (n.getHealth() > 0) { if (n.getPosition().distance(p.getPosition()) < d) { d = n.getPosition().distance(p.getPosition()); b = n; } } } } } } } if (d > 5) { return b; } else if (facing != null) { return facing; } } return b; } Just realized I can condense this code quite a bit - will do that when i get back
-
It still is 332 for some odd reason
-
I quit. here's a picture of cortana naked: http://goo.gl/mUOMUR
-
Happy birthday!
-
No, we hate you because you condemned us by being american.
-
-
You insulted an entire country, what else did you expect to happen?
-
What the fuck does being american have to do with it? for christ sakes, look at china,russia.. the entire earth for that matter. I think you should stop being ignorant. Anyone that hates a certain culture is blind themselves imho. Oh. And since you're canadian, I assume you want internet money.
-
I'm using this as my personal log for this project I've been working on - I'm making a bot which has a universal monster killer which is geared toward the slayer task you're doing. On start of the script, it checks the slayer gem to parse your task and amount. That is saved in the bot and used as reference to which monster it needs to kill. It then starts killing the monsters until it reaches 0, teleports out of there and grabs another task from duradel. A few little features I've built into it so far is guthan's support, support for anti poisons, support for super sets, quick weapon/armor switching for specs and time sensitive guthan healing. I'll be posting some screen shots and a daily change log at the bottom of this post. This sort of bot would take a very long time to fully automate due to issues with path finding etc, so I'm doing the best I can to have human walking with automated slaying. I don't think I'm going to release the bot, due to improbability of making this completely flawless. - but we will see in the future. Current task support (flawless buggy not started) Hellhounds Kalphites Aberrant Spectres Turoths (this task sucks - i always skip it) Banshees Wolves (gets stuck looking for the closest wolf and has to run through the mountain to get to it) Greater Demons (current task, need to figure out what to do with the dogs) Fire Giants Bats To-Do List fix finding closest npc - often it finds one closest which it has to run around a wall to get to fix tasks that have agressive non slayer task monsters make sure bot stays in agro'd area such as greater demons w/ dogs Current features Guthans Poison Support Equipment variations per task Checks for slayer item required to kill monsters (nosepeg etc) Super sets Enables piety on DDS spec Per task area support (more) Updates- 10/03/2013 - Did a few updates (too many to remember/list) 10/02/2013 - Been very busy at school Changelog 9/29/2013 Added fully working task prayer for certain tasks (aberrant specters etc) Added anti-ban Added a definable boundary area for tasks - initially set to the whole world, and altered by each individual task - it wont attack monsters outside of the area (hardcoded) Added antipoison support for kalphite tasks Added ledge support for hell hounds under taverly Fixed speed issue with guthan switching Added varying equipment per task (initiate for prayer/regular stuff for normal tasks) and many more
-
a neat little trick is to use an object for loop (not sure on the correct name) for (NPC n : npcs) { if (n.getFacing() == null && blahblah) { } } So basically it iterates through whatever list you do. Easy way of not having to find the size of the list and count up *I believe it's called an advancing for loop
-
It's very close to being released. This has been a WIP for the past month or so
-
Just a quick proggie This script ranges Ogres in the biohazard training cage. Sits behind the fence, shoots ogres Will be releasing very soon on the SDN
-
was
-
thogij u sho ud nkow
-
very good method for solving randoms. I used this method for quite some time for the shouldActivate()
-
[09/17/2013] RuneScape Update (revision 20)
Dreamliner replied to
Laz's topic in News & AnnouncementsRick Turpwhateverthefuckhisnameis is broken -
I keep getting this error: [ERROR][09/14/13 10:25:56 AM]: Error on executing random worker! java.lang.NullPointerException at org.osbot.LPt2.shouldActivate(gh:25) at org.osbot.script.rs2.randoms.RandomManager.scan(pe:192) at org.osbot.lpT7.run(co:7) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) [ERROR][09/14/13 10:25:56 AM]: Error on executing random worker! java.lang.NullPointerException at org.osbot.LPt2.shouldActivate(gh:25) at org.osbot.script.rs2.randoms.RandomManager.scan(pe:192) at org.osbot.lpT7.run(co:7) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) [ERROR][09/14/13 10:25:57 AM]: Error on executing random worker! java.lang.NullPointerException at org.osbot.LPt2.shouldActivate(gh:25) at org.osbot.script.rs2.randoms.RandomManager.scan(pe:192) at org.osbot.lpT7.run(co:7) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) [ERROR][09/14/13 10:25:57 AM]: Error on executing random worker! java.lang.NullPointerException at org.osbot.LPt2.shouldActivate(gh:25) at org.osbot.script.rs2.randoms.RandomManager.scan(pe:192) at org.osbot.lpT7.run(co:7) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) [ERROR][09/14/13 10:25:57 AM]: Error on executing random worker! java.lang.NullPointerException at org.osbot.LPt2.shouldActivate(gh:25) at org.osbot.script.rs2.randoms.RandomManager.scan(pe:192) at org.osbot.lpT7.run(co:7) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
-
*cough* unlike some people on this forum