Jump to content

Chris

Scripter II
  • Posts

    8355
  • Joined

  • Last visited

  • Days Won

    14
  • Feedback

    100%

Everything posted by Chris

  1. haha ur banned fgt

    1. Show previous comments  2 more
    2. Krys

      Krys

      oh really? cuz i still see his profile and everything

    3. Chris

      Chris

      suspension xD u can still see their stuff

    4. Krys
  2. import org.osbot.rs07.api.filter.Filter; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(name = "Gearz Flesh Crawler Killer", author = "Gearfighter", version = 1.0, info = "", logo = "") public class GearzFleshCrawlerKiller extends Script { @Override public void onStart() { log("Time to kill some Flesh Crawlers"); } @Override public void onExit() { } @Override public int onLoop() throws InterruptedException { //NPC fleshCrawler = npcs.closest("Flesh Crawler"); //try building a filter NPC fleshCrawler = npcs.closest(new Filter<NPC>() { @Override public boolean match(NPC npc) { return npc.exists() && npc.getName().equals("Flesh Crawler") && npc.isAttackable() && npc.getHealthPercent() > 0; } }); if (!getCombat().isFighting() || myPlayer().getInteracting() == null){ if (fleshCrawler != null) { if (fleshCrawler.isVisible()) { fleshCrawler.interact("Attack"); } } } return random(600, 900); } // The amount of time in milliseconds before the loop starts over @Override public void onPaint(Graphics2D g) { // This is where you will put your code for paint(s) } }
  3. import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.api.ui.RS2Widget; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(author = "You", info = "My first script", name = "Tea thiever", version = 0, logo = "") public class main extends Script { @Override public void onStart() { log("Let's get started!"); } private enum State { FISH, COOK, DROP } private State getState() { if(inventory.isEmptyExcept(310, 17794, 309, 17795, 123, 17796) && !myPlayer().isAnimating()) return State.FISH; if(inventory.isFull()) return State.COOK; return State.DROP; } @Override public int onLoop() throws InterruptedException { switch(getState()) { case FISH: //Entity fishingSpot = objects.closest("Fishing Spot"); Wrong. Fishing spots are tied to NPCs //You meant to do: NPC fishingSpot = getNpcs().closest("Fishing Spot"); if (fishingSpot != null) { //ALWAYS NULL CHECK BEFORE INTERACTING..Keep this in mind. logic: if it exists -> interact fishingSpot.interact("Lure"); //sleep } break; case COOK: //Entity fire = objects.closest("fire"); This is okay to do since Object,NPC,etc extend Entity //but should do it like this. RS2Object fire = getObjects().closest("Fire"); RS2Widget cookMenu = widgets.get(307, 4); //I am going to throw some code in here for you. It will be your job to find it in the API docs and understand the methods I am implementing. if (cookMenu != null && cookMenu.isVisible()) { cookMenu.interact("Cook All"); //sleep } else { if (getInventory().isItemSelected()) { if (fire != null) { fire.interact("Use"); //sleep...look into ConditionalSleep } } else { //item is not selected..select something inventory.interact("Use", "Trout"); //sleep } } break; case DROP: inventory.dropAll(331, 332, 333, 334, 25976); break; } return 600; //just return a server tick 600ms } @Override public void onExit() { log("Thanks for running my first script!"); } @Override public void onPaint(Graphics2D g) { } } Try this
  4. I love making free quality scripts for Osbot
  5. ill use my hand before i use a script m8
  6. http://lmgtfy.com/?q=How+to+get+to+the+users+folder+on+mac
  7. Thanks for the quick updates. I will find some missing links when I get the spare time
  8. you are supposed to wait 1-2 weeks for a git acc. iirc. Making shitposts about it will just extend the wait time.
×
×
  • Create New...