Everything posted by Botre
-
Cooked chicken
The answer to today's midsummer even riddle is: cooked chicken
- Sneaky Jagex
-
OSBot 2.0 - Disabling the RunAwayFromCombat antiban
RandomExecutor.unregisterHook(RandomEvent.RUN_AWAY_FROM_COMBAT) ;
-
Closest object for an area/point in Osbot2?
If 50 bots stand in between two trees and all of them pick the right one over the left one then there's nothing glad about that :p Ah well, I'll keep the left one for myself I guess (a)
-
Closest object for an area/point in Osbot2?
I have no doubts about it's functionality ^^ But it's the reason why most people botting are standing at the same bankbooths for example, or will choose the same tree over and over again when standing in between two trees. Not sure if Jagex tracks such behavior, I doubt it actually :p But yeah, just annoys me
-
Closest object for an area/point in Osbot2?
objects.closest seems to always return the first loaded object when multiple objects are the closest (have the same distance), I hate that.
-
Closest object for an area/point in Osbot2?
This should do the job ;) public static RS2Object getClosest(Script script, String name, String action, Integer minDistance, Integer maxDistance, Area mandatoryArea, Area illegalArea, Position mandatoryPosition, Position illegalPosition, boolean mustBeReachable) { RS2Object closestObject = null; double lowestDistance = Double.MAX_VALUE; List<RS2Object> objectList = script.objects.getAll(); int size = objectList.size(); int index = 0; for (RS2Object object : objectList) { index++; if (object == null) { continue; } if (!object.exists()) { continue; } if (!object.getName().toLowerCase().equalsIgnoreCase(name)) { continue; } if (object.getDefinition() == null) { continue; } if (!Arrays.asList(object.getDefinition().getActions()).contains(action)) { continue; } if (minDistance != null && object.getPosition().distance(script.myPosition()) < minDistance) { continue; } if (maxDistance != null && object.getPosition().distance(script.myPosition()) > maxDistance) { continue; } if (mandatoryArea != null && !mandatoryArea.contains(object.getPosition())) { continue; } if (illegalArea != null && illegalArea.contains(object.getPosition())) { continue; } if (mandatoryPosition != null && !object.getPosition().equals(mandatoryPosition)) { continue; } if (illegalPosition != null && object.getPosition().equals(illegalPosition)) { continue; } if (mustBeReachable && !script.map.canReach(object)) { continue; } if (object.getPosition().distance(script.myPosition()) < lowestDistance) { closestObject = object; lowestDistance = object.getPosition().distance(script.myPosition()); } if (object.getPosition().distance(script.myPosition()) == lowestDistance) { if (new Random().nextInt(size - index + 1) == 0) { closestObject = object; lowestDistance = object.getPosition().distance(script.myPosition()); } } } return closestObject; }
-
Randoms fixed with OSBot 2 (soon)
Beast
-
Lumbridge Home Teleport Snippet
Wrote this mainly for the cooldown timer. setCooldown(Message message) goes in the onMessage method of the script instance you use it in. Constructive feedback is appreciated as always! public class LumbridgeHomeTeleporter { private Script script; private int cooldown; public LumbridgeHomeTeleporter(final Script script) { this.script = script; Thread cooldownTimer = new Thread(new Runnable() { public void run() { while (true) { try { MethodProvider.sleep(60000); if (cooldown > 0) { --cooldown; } } catch (InterruptedException e) { e.printStackTrace(); } } } }); cooldownTimer.start(); } public void teleport() throws InterruptedException { if (this.cooldown == 0 && this.script.skills.getDynamic(Skill.MAGIC) > 0) { Timer timer = new Timer(); if (this.script.magic.castSpell(Spell.HOME_TELEPORT)) { while (this.cooldown == 0 && !this.script.map.canReach(LocationArea.LUMBRIDGE_TELEPORT_AREA.getArea().getRandomPosition(0)) && timer.getElapsed() < 10000) { MethodProvider.sleep(600); } } } } public void setCooldown(Message message) { if (message.getType().equals(Message.MessageType.GAME) && message.getMessage().toLowerCase().contains("you need to wait another")) { String match = null; Pattern pattern = Pattern.compile("[0-9]+"); Matcher matcher = pattern.matcher(message.getMessage()); while (matcher.find()) { match = matcher.group(); } this.cooldown = Integer.parseInt(match); } } public int getCooldown() { return this.cooldown; } } h
- client statements?
-
'The OSBot 1 Client will be supported for several months'
If they don't force the switch it won't happen and the switch not happening ins't an option anymore.
-
What RuneScape NPC is the guy above you?
Very evil, twc'ed, bob.
-
Doing "Rune Mysteries" for free.
- Doing "Rune Mysteries" for free.
It's finished, just need to test it and tweak where necessary, tired of making the test accounts myself. Yeah sorry, better safe than sorry I guess :p- Doing "Rune Mysteries" for free.
I'll be doing the "Rune Mysteries" quest for free. ETA: 10-20 minutes. Must agree to the following TOS; - Will be botted, I will in no way to be held responsible for anything runescape-offence related. - You will make sure any wealth is in your bank preferably secured with a bank pin, I will in no way be held responsible for any loss of value on the account, no matter what the circumstances could be. - The account must be in Lumbridge, I will not finish tutorial island for you. If your account is not in Lumbridge the service will be canceled and you will be blocked on OSBot by me. - If I go past the ETA I will not be penalized in any way. Post here + ADD ME ON SKYPE: Botrepreneur, please ask for a PM to confirm its me. Cheers !- APA Rock Crabs
Guys the reason everyone is getting access to all scripts is because the client isn't 100% stable. Please report your client-related bugs in the correct thread: http://osbot.org/forum/forum/232-osbot-2-bugserrors/ There's not much APA can do about broken randoms.- A question that now scares me….
You do get randoms on pvp worlds. Proof: http://osbot.org/forum/topic/50632-randoms-pvp-worlds/ Stop making baseless claims.- A question that now scares me….
You do get randoms on PVP worlds. I have seen it happen countless times :p- Animation resets
Motherlode ore veins are dynamic / have multiple states. Get its depleted id or model and use that reference to check if the vein is depleted instead (the depleted state, contrary to the undepleted state, is static).- A question that now scares me….
You could get a random yes. The risk of getting them is significantly lower on PVP worlds though.- Animation resets
If you stay near the object in question it shouldn't cease existing. Objects change reference when the game reloads (walking away to far / logging out) unless you use their unique hash value as explained by Laz here: http://osbot.org/forum/topic/54215-object-reference-becomes-irrelevant-when-reloading-how-to/ Or is the object you are trying to mine dynamic ? Does it have multiple states? In that case you might need to revisit its declaration.- Animation resets
While (animating) { sleep for the duration of one animation cycle; } The time of a full cycle will always be a multiple of 600 (in ms). Another way of doing it would be to start a timer once you are not animating anymore, and if this timer exceeds the animation rest time -> re-click rock.- Object reference becomes irrelevant when reloading, how to?
Ah beast! Exactly what I was looking for ty!- @JAGEX
- Object reference becomes irrelevant when reloading, how to?
Ok, so I have an Entity variable holding the value of an entity (not null). When I walk away far enough or teleport away, this variable's value becomes irrelevant: when you walk back to the initial Entity the value does not refer to that same Entity anymore (I doesn't refer to anything anymore actually). I suppose this is because the game reloads and a new reference is given, if I'm wrong about this please inform me Is there a way to store the initial value so that it does not become irrelevant whenever an entity is reloaded? I'm thinking about storing data of the initial Entity and then re-scanning for that data, but kinda hoping for a better solution :p - Doing "Rune Mysteries" for free.