Jump to content

pupu_pot

Members
  • Posts

    12
  • Joined

  • Last visited

  • Feedback

    0%

Profile Information

  • Gender
    Male

Recent Profile Visitors

958 profile views

pupu_pot's Achievements

Newbie

Newbie (1/10)

4

Reputation

  1. idk, I liked the idea of sticking to that one section as that is what I would do if I were playing myself
  2. Thanks, I will check it out! Do you guys develop code for a living and this is just a hobby for you? I've always been interested in the behind the scenes of these scripts
  3. Thanks for your input Gunman I wanted the crafting action to start whether the inv was full or if there was two or less empty slots, which is why I setup the -2 variable Can you elaborate on the pros and cons of ConditionalSleep2 vs ConditionalSleep vs a custom sleep class? The empty wall part does work, or at least it did when I tested it yesterday And yeah, I do get your point on the AI assistance, I'm definitely not fully understanding the code yet but for my first exposure it's definitely helping a lot. It took a lot of different prompts and trial and error to get to where I'm at, lol
  4. was just wondering if you kind folks would double check my methods below. i have never coded a day in my life before last week, so this was put together with chatGPT along with trial and error. interested to see if you guys have any pointers, or notice anything I have going on here that might be a no-no. i used intelliJ IDEA community version, and right now I created everything under one class, but I think best practice might be to separate out main/mining/crafting classes. I have tested this just for 20 min or so and it seems to work well enough, but I would like to eventually incorporate the following things if the base methods are sound. -simple paint -additional random pauses or other anti-ban methods -GUI so that I can toggle some options upon selecting the script in my osbot selector -figure out how to get custom cursor and logo to work even though I already added them into a resource directory import org.osbot.rs07.api.model.Item; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; @ScriptManifest(author = "pupupot", info = "Mines Amethyst crystals and crafts dart tips", name = "Amethyst Minecraft", version = 1.2, logo = "") public class AmethystMinecraft extends Script { private final int AMETHYST_X = 3008; private final int[] AMETHYST_Y = {9710, 9711, 9712}; // Y positions of amethyst crystals private final String AMETHYST_CRYSTALS_NAME = "Amethyst crystals"; private final String AMETHYST_NAME = "Amethyst"; private final String CHISEL_NAME = "Chisel"; @Override public void onStart() { log("Script started. Let's get this bag.");} @Override public int onLoop() throws InterruptedException { log("Looking for the purple shit to start mining."); // Check if inventory is full and craft dart tips if needed if (getInventory().isFull() || getEmptySlots() <= 2) { craftDartTips(); return 1000; // Wait for a second before checking again } // Check each Y position for amethyst crystals for (int y : AMETHYST_Y) { RS2Object amethyst = getObjects().closest(obj -> obj != null && obj.getName().equals(AMETHYST_CRYSTALS_NAME) && obj.getX() == AMETHYST_X && obj.getY() == y); if (amethyst != null && amethyst.isVisible()) { log("Found the purple shit at X=" + AMETHYST_X + ", Y=" + y); // Attempt to mine the amethyst if (amethyst.interact("Mine")) { log("Mining amethyst... Getting this money"); // Wait until the amethyst turns into "Empty wall" new ConditionalSleep(240000, 2000) { // 240,000 milliseconds (4 minutes) @Override public boolean condition() throws InterruptedException { return !amethyst.exists() || amethyst.getName().equals("Empty wall"); } }.sleep(); // Check if the amethyst was successfully mined if (!amethyst.exists() || amethyst.getName().equals("Empty wall")) { log("Bag secured at X=" + AMETHYST_X + ", Y=" + y); // Check inventory space and craft dart tips if needed if (getEmptySlots() <= 2) { craftDartTips(); } } else { log("Failed to mine amethyst at X=" + AMETHYST_X + ", Y=" + y); } } else { log("Failed to interact with amethyst at X=" + AMETHYST_X + ", Y=" + y); } // Exit loop once one amethyst is successfully mined break; } } return random(600, 700); // Return a short random delay before the next loop } private int getEmptySlots() { int count = 0; for (Item item : getInventory().getItems()) { if (item == null || item.getId() == -1) { count++; } } return count; } private void craftDartTips() throws InterruptedException { // Check if chisel and amethyst are in inventory if (getInventory().contains(CHISEL_NAME) && getInventory().contains(AMETHYST_NAME)) { log("We got the tools. Let's start the crafting process."); // Use chisel on amethyst if (getInventory().interact("Use", CHISEL_NAME)) { new ConditionalSleep(2000) { @Override public boolean condition() throws InterruptedException { return getInventory().isItemSelected(); } }.sleep(); if (getInventory().interact("Use", AMETHYST_NAME)) { log("Waiting for crafting interface to appear."); // Wait for crafting interface to appear new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return getWidgets().isVisible(270, 17); // Interface 270, Component 17 is the dart tip selection } }.sleep(); // Select "Make Amethyst dart tip" option (4th option) if (getWidgets().isVisible(270, 17)) { log("Crafting interface visible. Selecting 'Amethyst dart tips' option."); getWidgets().interact(270, 17, "Make"); } else { log("Crafting interface not visible."); } // Wait for crafting to complete new ConditionalSleep(60000) { @Override public boolean condition() throws InterruptedException { return !getInventory().contains(AMETHYST_NAME); } }.sleep(); log("Crafted amethyst dart tips."); } else { log("Failed to use chisel on amethyst."); } } else { log("Failed to select chisel."); } } else { log("Cannot craft amethyst dart tips. Missing required items."); } } @Override public void onExit() { log("Script stopped. Later Nerd."); } }
  5. Can I have a trial?
  6. Would it be possible to modify the script to be able to click on the soul bearer to send ensouled heads to the player's bank?
  7. How long did this take? any tips for someone wanting to do the same?
  8. Tried it one last time with v186 at Ardougne Knights and it didn't work, but after v187 went live it looks back to normal! Thanks Czar!
  9. Have been using this for a while but it looks like it is not working anymore since the update.
  10. Will the spin flax spell ever be supported? Disregard - haven't tried this out yet but I see it's listed in the menu.
×
×
  • Create New...