Jump to content

Popymon24

Members
  • Posts

    18
  • Joined

  • Last visited

  • Feedback

    0%

Profile Information

  • Gender
    Male

Recent Profile Visitors

884 profile views

Popymon24's Achievements

Newbie

Newbie (1/10)

6

Reputation

  1. It's now fully working! Thank you all for the support!
  2. I'm writing a woodchopping script that banks, and I need to get my character from the woodchopping area (position 1) to the bank (position 2). How would I go about having my character walk between the two points; what command would let me input an end position and have my character walk there?
  3. Thank you so much for the help! Now that I've slept for a bit, I don't know why I didn't think of either of these things!
  4. I'm working on a fishing and cooking script, and I want the bot to sleep until all of the raw trout in my inventory is cooked. The code that i have for my conditional sleep is: if (cookMenu != null && cookMenu.isVisible()) { cookMenu.interact("Cook All"); new ConditionalSleep(600000) { @Override public boolean condition() throws InterruptedException { return inventory.onlyContains(314, 309, 331, 343, 333) || !myPlayer().isAnimating() ||getDialogues().inDialogue(); } }.sleep(); The problem is that it doesn't sleep, and continually selects the trout, uses it on the fire, and clicks "Cook All". Any help is appreciated!
  5. Holy crap. Thank you so much. I kinda rushed into scripting, and this helps a lot. Thanks for all the comments you left in it, I'll have a much better grasp next time I decide to write- and some more Java under my belt. EDIT: I went through and checked the ID's, and they were incorrect, which was why the script wasn't working. I had the wrong ID for the fishing rod, so it wasn't starting the FISH state.
  6. i already had it imported. This is my code for the COOK state: case COOK: Entity fire = objects.closest("fire"); inventory.interact("Use", "Trout"); fire.interact("Use"); if (getWidget.isVisible(307,2)) { getWidgets().interact(307,2 "Cooked All"); } break; getWidget, interact, and "Cooked all" both have red lines. It is supposed to recognize the fire, select the trout, right click and click use on the fire, see if the widget is available, then select cook all. I fixed the code. RS2Widget cookMenu = widgets.get(307,4); if(cookMenu != null && cookMenu.isVisible()) cookMenu.interact("Cook All"); I compiled it, and it does nothing. Here's my code: import org.osbot.rs07.api.model.Entity; 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)) 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"); fishingSpot.interact("Lure"); break; case COOK: Entity fire = objects.closest("fire"); inventory.interact("Use", "Trout"); fire.interact("Use"); RS2Widget cookMenu = widgets.get(307,4); if(cookMenu != null && cookMenu.isVisible()) cookMenu.interact("Cook All"); break; case DROP: inventory.dropAll(331, 332, 333, 334, 25976); break; } return random(200, 300); } @Override public void onExit() { log("Thanks for running my first script!"); } @Override public void onPaint(Graphics2D g) { } }
  7. The getWidgets and getWidget both have red lined underneath.
  8. I have no idea how to use widgets. This is my first script, I've barely ever programmed before, and only in C#.
  9. I meant until all the fish were cooked. Thank you so much!
  10. I'm sorry for being such a noob, but I don't see anything to select an item. What would do that?
  11. But to cook on the fire you need to select the item you want to cook then use it on the fire. Also, how would I do this until my inventory is empty? Can you provide some example code?
  12. I wanted to make a script for OSBot, and decided that I wanted to make a script that fished at barbarian village and also cook the fish before dropping them. When I got to making the cooking part, I got stuck because I couldn't use interact on the fire like I could the fishing spots. Any help or touchups of what I have done are gladly welcomed! import org.osbot.rs07.api.model.Entity; 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() { Entity fishingSpot = objects.closest("Fishing Spot"); if(inventory.isEmptyExcept(123)) return State.FISH; Entity fire = objects.closest("fire"); 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"); fishingSpot.interact("Lure"); break; case COOK: Entity fire = objects.closest("fire"); fire.interact("Cook") break; case DROP: inventory.dropAll(331, 332, 333, 334, 25976); break; } return random(200, 300); } @Override public void onExit() { log("Thanks for running my Tea Thiever!"); } @Override public void onPaint(Graphics2D g) { } }
  13. Also: the bot gets stuck sometimes as it will try to click tiles that aren't loaded because of how the camera is positioned. I suggest having the bot click closer to the center of the screen, or on the map, as the map loads faster than tiles. Thank you, and have a nice day!
  14. Yes, I did. To fix it, I just need to pause the script and deposit the rest of the pay-dirt into the input hopper, then collect it, and start the script. It hasn't happened many times, and I don't know how it happens. I make sure the bag is empty when I start. Thank you for your time and effort!
  15. Hey, Czar, I love your scripts, I've bought three of them and loved every single one of them, with few problems. However, I have found two glitches so far. 1. Sometimes, the bot will collect from the bag while still having pay dirt in its inventory (four or five from my experience), causing it to go back and forth between the bank chest and the cleaning hopper. 2. While mining upstairs, the bot gets stuck in the southern part. I'm assuming this is because of the rockfall disconnecting it from the section of the upstairs mine with the ladder, and the bot can't get the rockfall into its view. Thank you, and have a nice day!
×
×
  • Create New...