Jump to content

LagunaPreza

Members
  • Posts

    6
  • Joined

  • Last visited

  • Feedback

    0%

Profile Information

  • Gender
    Male

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

LagunaPreza's Achievements

Newbie

Newbie (1/10)

0

Reputation

  1. Ohh man, I didn't know that lol Thanks for the help!
  2. Thanks for the code but for some reason this also doesn't work for me.. My code now: package core; import org.osbot.rs07.api.model.GroundItem; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; import java.awt.*; @ScriptManifest(name = "Small Net Looter", author = "LagunaPreza", version = 1.0, info = "", logo = "") public class NetLooter extends Script { @Override public void onStart() { // Code here will execute before the loop is started } @Override public void onExit() { // Code here will execute after the script ends } @Override public int onLoop() throws InterruptedException { GroundItem net; net = groundItems.closest("Small fishing net"); if(net != null && !inventory.isFull() && map.canReach(net)) { net.interact("Take"); sleepy(2500, net == null); } if(net == null) { sleep(200); } return 700; // The amount of time in milliseconds before the loop starts over } public void sleepy(int time, boolean until) { new ConditionalSleep(time) { @Override public boolean condition() throws InterruptedException { return until; } }.sleep(); } @Override public void onPaint(Graphics2D g) { // This is where you will put your code for paint(s) } }
  3. Hey, Could someone help me with this piece of code ? I'm trying to make a small fish net looter but my character does nothing. GroundItem net = getGroundItems().closest("Small fishing net"); if(!inventory.isFull() && net != null) { net.interact("Take"); }
  4. Hey all, I recently started with Java coding and I'm fooling around now for my own learning purposes, I'm trying to make an easy Imp killer/looter but the looting part isn't working.. The imps will get killed, however when they drop a bead (either black white yellow or red) it just wont pick it up.. Why ? I have this code in the onLoop: (Yes I know I should probably be using cases) if(!inventory.isFull() && getGroundItems().closest("Black bead", "White bead", "Red bead", "Yellow bead") != null) { getGroundItems().closest("Black bead").interact("Take"); getGroundItems().closest("White bead").interact("Take"); getGroundItems().closest("Red bead").interact("Take"); getGroundItems().closest("Yellow bead").interact("Take"); } else if(!inventory.isFull() && getNpcs().closest("Imp") != null && !myPlayer().isUnderAttack()) { getNpcs().closest("Imp").interact("Attack"); sleep(random(300, 700)); }
  5. Script kills 1 imp then does nothing, also unable to stop the script... Had to kill my vps
×
×
  • Create New...