-
Posts
184 -
Joined
-
Last visited
-
Feedback
100%
Everything posted by Booleans YAY
-
So my script is working flawlessly however the interaction of stairs is faulty. > climbs up stairs (good) > request another climb up stairs < climbs down instead, repeats climbing process looped. went as far as to check tile coordinates afterwords. Little confused on the proper fix on this. if (myPlayer().getX() == 3205 && myPlayer().getY() == 3209 && myPlayer().getZ() == 1) { bankStairs.interact("Climb-up"); }
-
one I linked works perfectly every time for me. i'd run a bulk account list but cbf atm.
-
random value as i said i did in 10 seconds and people can switch to whatever whenever.
-
But if you're too lazy to do a few key strokes then go ahead buy some XD
-
please no hate! But on flip side you can make several fresh accounts and instantly start making gp (current price 45gp*crashing*)
-
Welcome J, see you around!
-
No, if the player account is nulled to any actions performed on the account it'll log itself out, but if the camera is moving and mouse is moving then the game will detect the player is looking for something or doing something.
-
Now that the Grand Exchange has a idle timer of either 6-18 hours idk really which is which. Here's a simple as hell script to does some random stuff for the meantime. package main.script.Idle_Player; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; @ScriptManifest(author = "Booleans Yay", info = "Idling made ez pz", name = "Idle Player", version = 1, logo = "") public class IdlePlayer extends Script { @Override public int onLoop() throws InterruptedException { camera.movePitch(random(180, 180)); mouse.moveRandomly(); return random(10_000, 25_000); } } Feel free to build off of this to your own style you'd prefer, I literally did this under 10 seconds work and did it because it's needed for ingame pretty badly now a days. ok thanks cool!
-
I figured it out myself, I thought maybe moving them would give a better appealing format to reading the script. Anyways thanks for inputs.
-
So i've created many scripts before and even some released as well, i stopped making scripts for a bit now i'm back to do some more. Not really sure what's going on but even when I retry to debug a log info on onstart method no response is taken at all. Simple af fix.
-
Wait for mod w to come by, if anything lower for a bit
-
So this is going to be a beginners guide into utilizing a walking function. This is by all means a standard walker and doesn't support any objects blocking path, different types of objects could be in your way so for sake of simplicity i'll leave it out and if you'd like just request me to do a snippet on walking with object interacts, etc.. Suggest me any script and I can probably do it (still learning some small stuff, but majority is pretty ez pz). Firstly, i'd like you to just read the bullet points below, then read the code and understand the functions, and not get overwhelmed by something that you may not understand at first okay; take your time to understand the functions and ways around the OSB API. If you have any questions feel free to PM me or post on my profile wall, etc.. always willing to help with my current knowledge. For coordinations I just use: https://explv.github.io/ (source code Javascript: https://github.com/Explv/Explv.github.io) credits: Explv Position (this is our destination in where we're trying to head towards automatically for us instead of that long grind in walking. Includes a script run time length Supports the Run function for the player (set Run on startup, also comes with a random chance for run checking) Dismisses the pesky random events that pop up sometimes, also stores an integer value that increments every time we dismiss one For sake of a anti ban like method moving our Mouse to -1,-1 coordinates will make it look like a human like AFK (TODO: Test) If the player is under attack, the player will activate Run mode and will continue to run to destination regardless Standard String drawing for paint (displays any info we collect through variables(example: run time, events dismissed)) package main.script.Bot_Walker; import java.awt.BasicStroke; import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Point; import java.awt.RenderingHints; import java.text.NumberFormat; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.script.Script; public class AutoWalker extends Script { private long timeStarting = System.currentTimeMillis(); private int randomsDismissed; private Position destination = new Position(3222, 3222, 0); @[member=Override] public void onStart() throws InterruptedException { log("Starting up the bot walking"); timeStarting = System.currentTimeMillis(); getSettings().setRunning(true); } private boolean dismissRandom() { for (NPC randomEvent : npcs.getAll()) { if (randomEvent == null || randomEvent.getInteracting() == null || randomEvent.getInteracting() != myPlayer()) { continue; } if (randomEvent.hasAction("Dismiss")) { randomEvent.interact("Dismiss"); randomsDismissed++; return true; } } return false; } @[member=Override] public int onLoop() throws InterruptedException { int randomRun = random(5); if (randomRun == 1) { getSettings().setRunning(getSettings().getRunEnergy() < 25 ? false : true); } if (dismissRandom()) { while (myPlayer().isMoving()) { sleep(random(600, 800)); } } while (myPlayer().isAnimating()) { mouse.move(-1, -1); } if (myPlayer().isUnderAttack()) { getSettings().setRunning(true); getWalking().webWalk(destination); } getWalking().webWalk(destination); return random(200, 300); } @[member=Override] public void onPaint(Graphics2D graphics) { drawMouse(graphics); Font font = new Font("TimesRoman", Font.PLAIN, 12); graphics.setFont(font); graphics.setColor(Color.WHITE); graphics.drawString("Auto Walker script created by: Booleans Yay", 140, 325); graphics.drawString("Randoms Dismissed: " + formatIntegers(randomsDismissed), 5, 55); long runTime = System.currentTimeMillis() - timeStarting; graphics.drawString("Script Runtime: " + formatTime(runTime), 5, 85); } private void drawMouse(Graphics graphics) { ((Graphics2D) graphics).setRenderingHints( new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON)); Point pointer = mouse.getPosition(); Graphics2D spinG = (Graphics2D) graphics.create(); Graphics2D spinGRev = (Graphics2D) graphics.create(); spinG.setColor(new Color(255, 255, 255)); spinGRev.setColor(Color.cyan); spinG.rotate(System.currentTimeMillis() % 2000d / 2000d * (360d) * 2 * Math.PI / 180.0, pointer.x, pointer.y); spinGRev.rotate(System.currentTimeMillis() % 2000d / 2000d * (-360d) * 2 * Math.PI / 180.0, pointer.x, pointer.y); final int outerSize = 20; final int innerSize = 12; spinG.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)); spinGRev.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)); spinG.drawArc(pointer.x - (outerSize / 2), pointer.y - (outerSize / 2), outerSize, outerSize, 100, 75); spinG.drawArc(pointer.x - (outerSize / 2), pointer.y - (outerSize / 2), outerSize, outerSize, -100, 75); spinGRev.drawArc(pointer.x - (innerSize / 2), pointer.y - (innerSize / 2), innerSize, innerSize, 100, 75); spinGRev.drawArc(pointer.x - (innerSize / 2), pointer.y - (innerSize / 2), innerSize, innerSize, -100, 75); } public static String formatIntegers(int number) { return NumberFormat.getInstance().format(number); } public final String formatTime(final long milisecond) { long s = milisecond / 1000, m = s / 60, h = m / 60, d = h / 24; s %= 60; m %= 60; h %= 24; return d > 0 ? String.format("%02d:%02d:%02d:%02d", d, h, m, s) : h > 0 ? String.format("%02d:%02d:%02d", h, m, s) : String.format("%02d:%02d", m, s); } }
- 2 replies
-
- Beginner
- Intermediate
-
(and 1 more)
Tagged with:
-
Use java 8 and latest jdk
-
I tried something like that before and it just comes down to if the player will take longer on a log. Even with my 40 firemaking I sometimes slow down on random logs. Which is why I need to figure out the proper function for sleeping till no animation to prevent this issue.
-
That grenade bounce lol
-
Need some help figuring out how to sleep until the player returns to stand animation. Firemaking can take random lengths of time or failing, so I need to figure out how to sleep till animation is done. new ConditionalSleep(random(2_500)) { @[member=Override] public boolean condition() throws InterruptedException { return !myPlayer().isAnimating(); } }.sleep();
-
No rendering
-
Thanks for this update, hopefully my rare walking issue is resolved now
-
Mule bad accounts and transfer it to a dummy account, let the dummy account be idle for a long time after all the mulling. then dummy mule to main so it's not main mulling which is how jagex catches some. Also don't bot on an important account to you, regardless.
-
Well you can always extend the half trans-piracy over to make that extra room, cause it kind of matters for ascetics reasons. Also having the phrase "(Thiever)" for all lines takes up space and is a bit redundant to use on all lines, especially when there's a larger text saying similar thing. All in all, try to experiment, you can also use the game screen partly as well like I did with my fisher, it's not a issue people would have.
-
Noticed the experience string value looks a little weird, maybe have the full amount of experience instead of shortening it and using the coma function so it'll look nicer, looks bit weird atm.
-
Good job on your first script. Hope to see more in depth scripts. Also make a few to benefit the f2p users as well if you want to.