Jump to content

MoonMan

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.

MoonMan's Achievements

Newbie

Newbie (1/10)

0

Reputation

  1. so it says my java version is 11.0. This can't be right though because asking my computer what Java version is being run it return 1.8.0, which is version 8. I go to IntelliJ and look for the JDK 8 and I cannot find it. I run linux and have checked using where and whereis to get filepaths of the Java JDK. I go to those filepaths to locate the new JDK and it cannot find them there. I am incredibly confused.
  2. I'll give it a go certainly. Thankyou for all the help. Just so I know, did the script actually function? If you have discord I can ad you and we can discuss further, if thats against forum rules I'm sorry. Its just easier to discuss directly. I might have to just start everything again. I am really confused. I got OSBot up and running on my scripting PC and I compiled the script directly into my script folder and had copy-pasted from this forum post over to IntelliJ. But it still didn't show up. Really lost here.
  3. weird, my script worked perfectly for you? How do you mean "check scrit != null" on my USB? Did you have issues with intelliJ saying the script wasnt using the main function?
  4. I have, I followed it as best I could, I didn't setup GIT because I dont want it setup at the moment. My only issue is that I cannot manage to get the dependencies bit to work. The bit that's irritating me is the fact that IntelliJ says my main class isn't being used. Which makes no sense to me. Thankyou for all the help though, would it help if I sent pictures of all my settings?
  5. I have refreshed a lot of times. Nothing shows up
  6. hey, so I'm having a fair few issues with a script I'm trying to make here. Basically the script is supposed to make pizzas once the player reaches a certain cooking level. Here are my problems. 1. The IDE I am using, IntelliJ, is telling me that the Class 'Main' is never used, in spite of there being no other class. 2. The script its self is not showing up in my OSBot Client. I have built it to a JAR file and ported it over via USB to my PC with OSBot on it and it isn't showing, even when in the script folder. This is what I have done so far: - Checked the IDE is building properly, Artifacts are set to compile to output root, I have triple checked everything is in order. - Removing certain parts of the script that were never used, no change. I have posted in the Discord but wanted to put something out here to reach more people and hopefully be able to help others if they get this issue. Cheers import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.api.map.*; import org.osbot.rs07.api.ui.RS2Widget; import org.osbot.rs07.utility.ConditionalSleep; @ScriptManifest(name = "Pizza bot", author = "", version = 1.0, info = "", logo = "") public class Main extends Script { Position edgeBank = new Position(3096, 3494, 0); Position edgeRang = new Position(3078, 3495, 0); @Override public int onLoop() throws InterruptedException { if(!isCookingLevel()){ if(haveAnchovy()) cookAnchovy(); else fetchIngredients("Raw anchovies", 28); }//end if else{ getWalking().webWalk(edgeBank); putTomato(); putCheese(); putAnchovies(); cookUncooked(); } return(100); } private boolean haveAnchovy(){ if(getInventory().onlyContains("Raw anchovies")) return(true); else return(false); }//end haveAnchovy private void cookAnchovy() throws InterruptedException { getWalking().webWalk(edgeRang); objects.closest("Cooking range").interact("Cook"); sleep(2000); widgets.interact(270, 14, "Cook"); } private boolean isCookingLevel(){//returns true if the required cooking level is met if((getSkills().getDynamic(Skill.COOKING)) == 35) return(true); else return(false); }//end isCookingLevel private void fetchIngredients(String item, int amt) throws InterruptedException { getWalking().webWalk(edgeBank); getBank().open(); getBank().withdraw(item, amt); sleep(500); getBank().close(); } private void putTomato() throws InterruptedException { fetchIngredients("Pizza base", 14); fetchIngredients("Tomato", 14); if (getInventory().getItem("Pizza base").interact("Use", "Pizza base")) //select "use" for pizza base if (getInventory().getItem("Tomato").interact("Use", "Tomato"))//select "use" for tomato sleep(1000);//chill for 1000 makeAll();//call the makeAll method. SEE LINE 23 } private void putCheese() throws InterruptedException{ fetchIngredients("Cheese", 14); if (getInventory().getItem("Incomplete pizza").interact("Use", "Incomplete pizza"))//use pizza if (getInventory().getItem("Cheese").interact("Use", "Cheese"))//use cheese sleep(800);//chill makeAll();//call makeAll } private void putAnchovies() throws InterruptedException{ fetchIngredients("Cooked anchovy", 14); if (getInventory().getItem("Plain pizza").interact("Use", "Plain pizza"))//use pizza if (getInventory().getItem("Anchovies").interact("Use", "Anchovies"))//use anchovy sleep(800);//chill makeAll();//call makeAll } public void makeAll() throws InterruptedException { RS2Widget PizzaWidget; PizzaWidget = getWidgets().get(309, 6); if (PizzaWidget != null && PizzaWidget.isVisible()) if (PizzaWidget.interact("Make all")) sleep(18000); } public void cookAll() throws InterruptedException {//just cooks all RS2Widget Uncooked = widgets.get(307, 4);//declare widget called Uncooked if (Uncooked != null && Uncooked.isVisible()) //do if Uncooked is not null and is visible sleep(500); //chill for 500 Uncooked.interact("Cook All"); //use the uncooked to do the "cook all" interaction new ConditionalSleep(1000000) { //chill for a long time @ Override //override the condition method public boolean condition() throws InterruptedException { return !getInventory().contains("Uncooked pizza"); } }.sleep(); } public void cookUncooked () throws InterruptedException {//cooks uncooked pizza on a range sleep(300); { fetchIngredients("Uncooked pizza", 28);//fetch 28 uncooked pizzas getWalking().webWalk(edgeRang);//walk to the edgeville range RS2Widget UnpizzaWidget = widgets.get(307, 4);//make a widget object RS2Object Range = objects.closest("Range");{ //grab the closest range if (Range.isVisible());//if you see the range if (getInventory().getItem("Uncooked pizza").interact("Use", "Uncooked pizza"))//use pizza if (Range.interact("Use"));//use on range new ConditionalSleep(10000) {//chill for 10000 @ Override public boolean condition() throws InterruptedException {//override condition return (UnpizzaWidget != null && (UnpizzaWidget.isVisible())); } }.sleep();//sleep cookAll();//call cookAll method SEE LINE 77 } } }//end cookUncooked }//end main
×
×
  • Create New...