-
Posts
229 -
Joined
-
Last visited
-
Days Won
1 -
Feedback
100%
Everything posted by yfoo
-
Wow really nice. Mind adding a random gaussian sleep after all bars have been smelted before banking?
-
Very nice. Thanks for sharing.
-
Selecting the Closest Battlestaff in crafting script
yfoo replied to timepudding's topic in Scripting Help
Use ```inventory.interact(13,"Use"))``` To select slot 13. followed by ```inventory.interact(14, USE)```. Here is how I dod mine private boolean combineComponents() throws InterruptedException { int[] slotPair = getInvSlotPair(); Item item1 = inventory.getItemInSlot(slotPair[0]); Item item2 = inventory.getItemInSlot(slotPair[1]); boolean notNull = item1 != null && item2 != null; boolean notSameItem = notNull && item1.getId() != item2.getId(); // Assert Item1 and 2 are the equivalent items determined at script start (ItemA and B). // Not foolproof, but a simple method boolean sumTo0 = notNull && (item1.getId() + item2.getId() - itemA.getId() - itemB.getId() == 0); boolean canUseSlotPair = notSameItem && sumTo0; if (canUseSlotPair && inventory.interact(slotPair[0], USE)) { ScriptPaint.setStatus("ItemA -> ItemB"); sleep(randomGaussian(300, 100)); return inventory.isItemSelected() && inventory.interact(slotPair[1], USE); } else { ScriptPaint.setStatus("ItemA -> ItemB w/ backup interaction"); if (inventory.interact(USE, itemA.getId())) { sleep(randomGaussian(300, 100)); return inventory.isItemSelected() && inventory.interact(USE, itemB.getId()); } } return false; } -
When I wrote it like 2 weeks ago it worked. You need to override the break manager with an instance of the class Put this in onStart bot.getRandomExecutor().overrideOSBotRandom(BreakManagerHook.initInstance(bot)); Then use this to start a break early. BreakManagerHook.getInstance().startBreakEarly();
-
Gets stuck on black knights fortress, It attempts to enter through the wrong door, it should go through the single doors next to the guards. https://ibb.co/t3Ghqqb
-
Is VPN subbing for big discounts safe?
yfoo replied to Hernandez2000's topic in Community Discussion
That works sure, but why not just rwt gold then buy bonds. Cheaper than using pesos probably. Buy from a private seller rather than a major site, less chance of being rwt flagged. . -
This was the end result I settled with. I also happened to need a hook to know when the break ended to potentially check if my position was crashed while I was away. The OnExit() allows me to know that. For now I'm not doing anything with it just logging (log("Return from break!");) package Util; import org.osbot.rs07.Bot; import org.osbot.rs07.randoms.BreakManager; public class BreakManagerHook extends BreakManager { private volatile boolean breakEarly; private volatile boolean shouldActivateCalled; private static BreakManagerHook instance; public static BreakManagerHook getInstance() { if(instance == null) { throw new NullPointerException("ExcavatePlantIgnite is null"); } return instance; } public static BreakManagerHook initInstance(Bot bot) { instance = new BreakManagerHook(bot); return instance; } private BreakManagerHook(Bot IiIiiiIiiII) { super(IiIiiiIiiII); } @Override public synchronized boolean shouldActivate() { if(breakEarly && !shouldActivateCalled) { log(String.format("Thread %d notifying...", Thread.currentThread().getId())); shouldActivateCalled = true; this.notify(); } if(super.shouldActivate() && breakEarly) { breakEarly = false; log("breakEarly -> false"); } return super.shouldActivate() || breakEarly; } @Override public void onExit() { super.onExit(); log("Return from break!"); } public synchronized void startBreakEarly() throws InterruptedException { breakEarly = true; shouldActivateCalled = false; while (!shouldActivateCalled) { log(String.format("Thread %d waiting until shouldActivate() called...", Thread.currentThread().getId())); this.wait(); } log("Exited startBreakEarly"); } }
-
Yes, I do not want a break to happen at a certain time. I was working on a blast mining script If there was not enough time remaining before break to do cycle then start the break early.
-
Ok this seems to work. shouldActivate() gets called multiple times, so I have to "short circuit" it. @Override public boolean shouldActivate() { if(breakNow) log("Early breaking"); return super.shouldActivate() || breakNow; }
-
I want to start a break early. This doesn't work. OSB logs "Started random solver : " then immediately calls onExit, skipping BreakManager's onloop. package Util; import org.osbot.rs07.Bot; import org.osbot.rs07.randoms.BreakManager; public class BreakManagerHook extends BreakManager { private static boolean breakNow = false; public BreakManagerHook(Bot IiIiiiIiiII) { super(IiIiiiIiiII); } @Override public boolean shouldActivate() { if(super.shouldActivate() || breakNow) { breakNow = false; return true; } return false; } @Override public void onExit() { super.onExit(); log("Return from break hook!"); } public static void startBreakNow() { breakNow = true; } }
-
Wow, I didn't even know this was a thing in the game.
-
For the time being, you can use one of the GE NPCs to "decant" your rings just like how potions work.
-
initial bid, 55M.
-
That is strange, I've ran this script on paladins alot and I've never died. Give me your location used, inventory setup, and account HP and I can take a look.
-
OSRS (as of now) doesn't use kernal anticheat, so no need yet for crazy solutions involving 2 computers and DMA. Its pattern matching banned account play patterns and a bit of client detection. Assuming client detection is not an issue, switching up tasks and "playing like a player" mostly handles the pattern matching designed to catch bot farms building accounts in a particular way. RN most major bots hook onto use the legacy java client which apparently is ~90% bots according to Jagex. Maybe a year from now, we would have likely switched into the c++ new client. There maybe some hiccups with detection with early versions but with trial and error things get figured out like RS3. Then Jagex does some other BS down the line and the cycle repeats.
-
Script doesn't exist publicly. You must code it yourself or commission someone to do it for you.
-
Any one of the AIOs under the smithing section will do it. https://osbot.org/mvc/sdn2/scripts/18
-
Should work but not optimal, script will bank when inventory is full instead of dropping junk seeds and continuing. Setup inventory to being a small amount of food, leaving lots of open slots. I also recommend the ardy location over draynor. Its possible to misclick on a stall and take guard aggro. There is some runaway code to prevent dying, but I never tested that part, and I don't remember if it stops the script afterwards or walks back and resumes.
-
Currently writing an anti-ban and want opinions.
yfoo replied to Kintaro Oe's topic in Botting & Bans
Contextual based on the actual activity you're doing. Example: Powerfishing script. AFK for a bit after the your character stops fishing. This can be due to the fishing spot moving or inventory being full. Proceed to drop fish if the inventory is full or almost full after your character stops fishing. Its reasonable for someone to drop fish if there is only 1 inventory slot left. Then restart fishing to maximize AFK time per fishing spot interaction Example Thieving Script. When the player is stunned, randomly select an action(s) to preform or none at all... Such as Eating Food, Spam clicking, Dropping junk (jugs after drinking wine), Opening pouches, Menu hover the NPC, ect. For each script session, set a random clicking cadance to use for pickpocketing. I simply set a mean/std_deviation at script start. Then use these 2 numbers to generate random sleep intervals between clicks. Continue pickpocketing for a few iterations even after your character is at max pouches. Basically some things you would expect a real player to do. -
> Add some code to check if the genie is interacting with the player. I think this is the best way to do it. Character has IsInteracting So you can use ``` genieInstance.IsInteracting(myPlayer()) ``` https://osbot.org/api/org/osbot/rs07/api/model/Character.html#isInteracting-org.osbot.rs07.api.model.Character-
-
Why did you set only certain amethyst positions to be mine-able? private final List<Integer> AMETHYST_Y = Arrays.asList(9710, 9711, 9712); // Y positions of amethyst crystals
-
As for the GUI error public void onStart() { log("Initializing Script...."); frame = new JFrame("DexCutter"); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.setBounds(50, 50, 400, 400); frame.setVisible(true); //<<<<<<<<<<<<<<<<< ... Move frame.setVisible(true); to the end of onStart(). It is set to visible before al the other components are added to the panel.
-
1. Put the image in resources so that a network request is not needed then use SystemIO to get thz. There is no guarantee that the hosting service won't delete your image randomly. Refer to the link below for a more concise tutorial. RS2Object treeObject = getObjects().closest(tree.getObjectId()); if (treeObject == null) { this.log("Yew tree is null...."); } log("does it contain tree obj? " + treeArea.contains(treeObject)); 2. Use the filter API. This can be simplified to something like ``` RS2Object treeObject = getObjects().closest(rs2Object -> rs2Object.getId() == tree.getObjectId() && treeArea.contains(rs2Object); ``` This will ensure tree interactions are only done on trees of a certain type (regular, oak, willow, ect.) and are in the designated area. 3. The Paint and GUI are crammed in the the Script class its hard to read. Consider splitting these up into individual classes. You can designate a painter class by having it implement Painter. Then in onStart calling getBot().addPainter(<paint instance>) Make sure to remove this in onStop with getBot().removePainter(<same instance as above>) Otherwise the paint may not get cleaned up if the script crashes/exits. 4. You don't need to call this if you are intending to immediately interact with the object. The interaction will do this if the object is not on screen. if (getCamera().toEntity(treeObject)) Its a great first attempt. Ill take a look at the gui later.
-
Surprisingly, while it is know Jagex collects mouse movements they maybe are ignoring them for botting bans. The general consensus is that invokes don't seem to increase ban rates over using osb regular mouse. This may or may not be the case in the future. Maybe mouse data is unreliable as touchscreen PCs do exist. I also think some runelite plugins use invokes. I've seen a world hopper plugin that allows a hotkey to be bound for hopping to the next world without having the use the standard interface.