Jump to content

Sebastian

Members
  • Posts

    283
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by Sebastian

  1. Hello everyone, Is it only possible to have a script thumbnail when the script is uploaded to SDN? Or can i insert it myself. See picture.
  2. Hi @@colby__ , i have tried everything you said in your post but i can't get it working.. Can you maybe help me via Teamviewer or something? I want it to be like this. public int onLoop() throws InterruptedException { switch (getState()) { case CHOP: Entity Willow = objects.closest("Willow"); if (Willow != null && !myPlayer().isAnimating()) { Willow.interact("Chop down"); log("Exiting case dropping......"); log("Entering case chop"); log("Chopping Willow logs"); } else{ sleep(random(500,700)); } break; case DROP: if(powerChop.isSelected()) { inventory.dropAllExcept(1357, 1359); log("Case dropping."); } else { //bank } break; case WAIT: sleep(random(500, 700)); break; } return random(200, 300); } Damn this is getting really frustrating.. Hope ya can help me lol
  3. @@Juggles This is my GUI class: import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JComboBox; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; public class gui { public static void Window(main m) { JFrame jFrame = new JFrame(m.getAuthor() + " " + m.getName() + " v." + m.getVersion()); // set size jFrame.setSize(300, 200); jFrame.setResizable(false); // Add panel JPanel jPanel = new JPanel(null); jFrame.add(jPanel); // add label JLabel jLabel = new JLabel("Select a tree"); jLabel.setBounds(10, 10, 95, 20); jPanel.add(jLabel); // list JComboBox<String> list = new JComboBox<String>(new String[] { "Tree", "Oak", "Willow", "Yew" }); // sets a string in the main class list.addActionListener(e -> m.tree = (String) list.getSelectedItem()); list.setBounds(115, 10, 60, 20); // add list to jPanel jPanel.add(list); JCheckBox powerChop = new JCheckBox("Powerchop"); powerChop.setBounds(0, 40, 110, 20); jPanel.add(powerChop); /** * spinner SpinnerModel model = new SpinnerNumberModel(5, 5, 30, 1); * JSpinner spinner = new JSpinner(model); spinner.addChangeListener(e * -> m.CustomIntInTheMainClass = (int) spinner.getValue()); * spinner.setBounds(115, 30, 60, 20); // add spinner to jPanel * jPanel.add(spinner); */ // button JButton startButton = new JButton("Start"); startButton.addActionListener(e -> { synchronized (m.lock) { m.lock.notify(); } jFrame.setVisible(false); }); startButton.setBounds(0, 80, 50, 20); // add button to jPanel jPanel.add(startButton); jFrame.setVisible(true); } } and this is my main class. What i want is that i can use powerChop in my mainclass in my onloop. I somehow need to tell the main class that powerChop exists. public int onLoop() throws InterruptedException { switch (getState()) { case CHOP: if(powerChop.isSelected()) { } else { } Entity Willow = objects.closest("Willow"); if (Willow != null && !myPlayer().isAnimating()) { Willow.interact("Chop down"); log("Exiting case dropping......"); log("Entering case chop"); log("Chopping Willow logs"); } else{ sleep(random(500,700)); } break; case DROP: inventory.dropAllExcept(1357, 1359); log("Case dropping."); break; case WAIT: sleep(random(500, 700)); break; } return random(200, 300); } Like this if else statement. EDIT @Manner That just shows how to make a GUI in the main class. I don't want that because that is confusing. I like seperated classes because it's way better working for me ;d
  4. Hello everyone! So, i have just finished the layout of my GUI for my bot. My school taught me that i need to make 2 seperate classes. 1 main class and a GUI class. Now i have the gui class complete. I have made 1 CheckBox in the GUI class. Now i want to invoke the CheckBox in my onLoop() in the main class. How do i do this? i'm really struggled... public int onLoop() throws InterruptedException { switch (getState()) { case CHOP: Entity Willow = objects.closest("Willow"); if (Willow != null && !myPlayer().isAnimating()) { Willow.interact("Chop down"); log("Exiting case dropping......"); log("Entering case chop"); log("Chopping Willow logs"); } else{ sleep(random(500,700)); } break; case DROP: inventory.dropAllExcept(1357, 1359); log("Case dropping."); break; case WAIT: sleep(random(500, 700)); break; } return random(200, 300); } JCheckBox powerChop = new JCheckBox("Powerchop"); powerChop.setBounds(0, 40, 110, 20); jPanel.add(powerChop); Hope that you guys can help me! Sincerely your's, Sebastian.
  5. - Script name: Tutorial Island - trial length: 6HRS I would like to get a trial of this. Thinking about goldfarming for a bit. Testing this out and after 6hrs i will decide to buy it. - Are you ging to give feedback on the script?: Yes ofcourse. I know what feedback means to a programmer.
  6. Will try that. Im running Ubuntu Mate on the Raspberri Pi3. Yes, it has internet connection. Yes, i have allowed the jar file to allow exec.
  7. Hello! So i was trying to get OSBOT working on my Ubuntu machine, but i can't connect to the osbot client. When i start the client it says: Stable version: 0.0.0.0 Your version: 2.4.84 Status: Cannot connect to OSBOT! Anyone had these experiences? I cant find it on the forum tho.. Sincerely your's, Sebastian. EDIT: I use Java 8. I red somewhere that you need Java 7?
  8. I got it! If you guys are interested, i'm willing to translate everything to english and publish it here. Could help some people who are learning basic Java.
  9. Yes. Because they think JavaFX is a good way to learn Java and work with classes.
  10. Thanks for the reply. As i said, it's for my school project. Our main language in The Netherlands is Dutch. My teacher wants us to program in dutch...
  11. First of all, i don't know if i may post things like this on this forum, because it's not OSbot related, but it is JavaFX related. Which is related to make bot scripts. So in class i got an assignment. We need to make a JavaFX project. In this project we need to add questions and RadioButtons. I did by making an array for all the questions. And put that into a for loop so i don't have to write a long line of code. This is my for loop: for(int i=0; i<vragen.length; i++) { group[i] = new ToggleGroup(); Label label = new Label((i+1) + vragen[i]); grid.add(label, 0, i); eens[i] = new RadioButton("eens"); eens[i].setToggleGroup(group[i]); grid.add(eens[i], 1, i); oneens[i] = new RadioButton("Oneens"); oneens[i].setToggleGroup(group[i]); grid.add(oneens[i], 2, i); geen_mening[i] = new RadioButton("Geen mening"); geen_mening[i].setToggleGroup(group[i]); grid.add(geen_mening[i], 3, i); } I'm sorry for the language, it's dutch. So this is good, but now i have a problem. The radioButtons needs to give a function. For example: Eens (Agree) = i++; (Give 1 point when you select Agree) Oneens (Disagree) = i--; (Give -1 point when you select Disagree) When i click on the button Submit, it should give an output. I've been struggling with this problem for ages now. You guys are my last hope. Hope ya'll can help me! Sincerely your's, Sebastian.
  12. Learn Java by YouTube. Get to know If and else statements, for loops, while loops, JavaFX (When you know the basics). A good YouTuber is Thenewboston. Cheers.
  13. This is actually really fucking cool! Great job on this!
  14. Sebastian

    porn

    This is actually so bad. Imma kill myself right now.
  15. Hey all, haven't been on the forums lately. I am very busy at this moment. Need to make a Java Android App, website (css html php and JavaScript) for school. It's for a project which needs more time to finish before the deadline. So.. I'm very busy with all that. Will be back in a month i guess.. But. I want to wish you all a very good christmas and a happy new year! Sebastian.
  16. ^ Exactly this. Have been in a fuckedup situation for about half a year. Parents broke up, needed a new house, moving bla bla. Made me kinda depressed. I used to love to go to the gym, so i continued it. Ever since i started working out again, i feel better then fine. Everyday it gives me more energy and love. Now i live on my own, my own house. Working out 5 days a week. Feeling better then ever.
  17. Lmao, Best instagram Bio ever. "i swear im not a terrorist"
  18. Tried with Ethernet cable.. This seems a lot better
  19. Neither of those work.. It just does nothing. This is my stage5. (Mining and Smithing area). case STAGE5: // Mining area NPC miningInstructor = npcs.closest("Mining Instructor"); Entity tinRocks = objects.closest(TINROCKS_ID); Entity copperRock = objects.closest(COPPERROCK_ID); Entity furnace = objects.closest(FURNACE_ID); if (getWidgets().getWidgetContainingText("Mining and Smithing") != null) { // Talking to Mining Instructor log("Talking to Mining Instructor"); miningInstructor.interact("Talk-to"); } else { dialogueGuide(); } if (getWidgets().getWidgetContainingText("Try it now on one of the rocks indicated") != null) { // Prospecting tin ore log("Prospecting ore."); tinRocks.interact("Prospect"); sleep(random(600,700)); } if (getWidgets().getWidgetContainingText("It's tin") != null) { // Prospecting tin ore log("Prospecting ore."); copperRock.interact("Prospect"); camera.toEntity(copperRock); sleep(random(600,700)); } if (getWidgets().getWidgetContainingText("It's copper") != null) { // Talking to Mining Instructor log("Talking to Mining Instructor"); miningInstructor.interact("Talk-to"); sleep(random(600,700)); } else { dialogueGuide(); } if (getWidgets().getWidgetContainingText("It's quite simple really") != null) { // Mining tin ore log("Mining tin ore"); tinRocks.interact("Mine"); camera.toEntity(tinRocks); sleep(random(600,700)); } if (getWidgets().getWidgetContainingText("Now you have some tin ore") != null) { // Mining copper ore log("Mining copper ore."); copperRock.interact("Mine"); camera.toEntity(copperRock); sleep(random(600,700)); } if (getWidgets().getWidgetContainingText("You should now have both some copper and tin ore") != null) { // Smelting a bronze bar getTabs().open(Tab.INVENTORY); log("Smelting bronze bar"); getInventory().interact("Use", "Tin ore"); furnace.interact("Use"); } if (getWidgets().getWidgetContainingText("You retrieve a bar of bronze") != null) { // Closing dialogue log("Does this even work?"); RS2Widget w = getWidgets().getWidgetContainingText("Click to continue"); if (w != null && w.isVisible()) { log("a"); w.interact(); } } break;
  20. Hey Explv, it doesn't do anything nor logging a and b.. if (getWidgets().getWidgetContainingText("You retrieve a bar of bronze") != null) { // Closing dialogue log("Does this even work?"); RS2Widget w = getWidgets().getWidgetContainingText(162, "Click to continue"); if (w != null && w.isVisible()) { log("a"); if (!getDialogues().isPendingContinuation()){ log("b"); w.interact(); } }
  21. Haha yeah... I'm that kind of person.
  22. Hey all. Just installed Cyanogenmod on my Samsung Galaxy S4. The device was really really slow, so i decided to just install Cyanogenmod. I use this phone for android app dev. So.. For everyone with a device as slow as if it comes from the stone age.. Install CyanogenMod and you will be happy ;)
  23. beautiful personality ass
×
×
  • Create New...