Jump to content

Sebastian

Members
  • Posts

    283
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by Sebastian

  1. THAT COULD BE IT! Seems like the most useful thing to do. Problem is, i'm just a starter, can you maybe tell me how to do that? Would be so great because i can work on my GUI again!Edit: i googled that, but i don't really understand what to do.. Man i feel so stupid
  2. Hi everyone, since the newest update of Java, i'm getting this error when i want to run my GUI: Error: could not open `C:\Program Files (x86)\Java\lib\amd64\jvm.cfg'. I've been searching everywhere on the web, tried to install new Java and JDK, but still gives me this error. I use Eclipse. I had to import JavaFX because i'm following the new boston his tutorial on GUI's. I don't really know if it's the JavaFX that is creating this error, or the newest Java update. Sincerely your's, Sebastian.
  3. Thanks bro, but i just don't copy pasta things. I write it so i understand each line!
  4. Ah, the newboston. Good guy! That would be very sweet tho. Kinda looking forward to that tutorial! Anyways, thanks for your time and i will post here when i got the solution what i was struggling with! Sincerely your's, Sebastian.
  5. Thanks for the quick reply! I guess it's on my side that i don't understand a living shit out of GUI's haha. I'm gonna watch more tutorials how to make a GUI. Do you have any idea where to start with? I heard WindowBuilder in Eclipse is a good one?
  6. Both solutions didn't work. But i think that problem is on my side. I'm a little confused tho. I have 2 classes. 1 class for the bot script. and 1 class for the GUI. Do i need to insert this into the onStart() { of my main.java (Bot script) or? Do you guys think it's better to just use 1 class for everything?
  7. Can you help me with one little thing tho? if it's not too much ofcourse: How do stop the loop from my script till the GUI is not visible anymore? Because, when the GUI is open, the script will automaticly start chopping tree's.
  8. Oops. I'm such a noob.. Thanks for the help buddy
  9. Thanks bro. Testing it now. Over-complicated? Do you have a better idea for this? EDIT: It Worked! Thanks buddy. But i have one problem now. When i click on the GUI's exit X, it stops my whole OSBot client. Do you have any solutions to that? Sorry for the big questions tho. Very new to GUI's.
  10. I don't really understand. My GUI is just a class. I followed a tutorial on how to make GUI. So i wanted to just test if the GUI would popup. To make it easier, this is my events.java: import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; public class events extends JFrame { /** * */ private static final long serialVersionUID = 1L; public static void main (String args[]) { events gui = new events(); gui.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); gui.setTitle("Events Program"); gui.setSize(300, 100); gui.setVisible(true); } private JLabel label; private JButton button; private JLabel label2; private JButton button2; private int x = 0,y = 0; public events() { setLayout(new FlowLayout()); button = new JButton("Click for text"); add(button); label = new JLabel(""); add(label); event e = new event(); button.addActionListener(e); button2 = new JButton("Click for more text"); add(button2); label2 = new JLabel(""); add(label2); event2 ev = new event2(); button2.addActionListener(ev); } public class event2 implements ActionListener { public void actionPerformed(ActionEvent ev){ if(y==0){ label2.setText("Label 2 text"); y = 1; } else if(y==1){ y = 0; label2.setText(""); } } } public class event implements ActionListener { public void actionPerformed(ActionEvent e) { if(x==0){ label.setText("Text"); x = 1; } else if(x == 1) { label.setText(""); x = 0; } } } } When i add events.GUI(this); just doesn't work.
  11. Hello everyone. I've been struggling with something. I have 1 class called main.class. And i have an events.class for my GUI. Now i want to load the events.class in the main.class. The reason why i have 2 classes is that i want to keep my classes clean. 1 for the GUI, 1 for the bot script. Thanks in advance, Sebastian.
  12. Aepec. His beginner scripting tutorial opened a whole world for me ^^.
  13. Replace this: With this: if (Willow != null) { if (Willow.isVisible()) { Willow.interact("Chop down"); } else { sleep(random(500, 700)); } } The Willow.isVisible will check if the willow actually is visible. If it's visible, then chop. Else, it's gonna sleep for 500 till 700 milliseconds. Randomly. Hope that works buddy. Nope, the name for a willow tree is Willow. But i'm sure you already knew that.
  14. Being busy with my first Woodcutting AIO Script :) Getting there! #motivated

  15. Great tutorial. Very useful! But i don't know if i'm doing this the right way. Do i need to set a background with: g.Fill or can i just create an image with everything in it. Because when i do so, my TimeRan will not be displayed because the background overlays the TimeRan. Wich we dont want. public void onPaint(Graphics2D g) { timeRan = System.currentTimeMillis() - this.timeBegan; g.drawString(ft(timeRan), 158, 369); g.setColor(Color.BLACK); g.drawImage(bg, 8, 334, null); } Thanks alot, OSRS Sebastian.
  16. Bro! Thanks for this. I'm quite skilled in Java, but this was just what i needed! Made this tea picking bot just by typing everything. No copy pasta. Just to analyze what everything is. Finished this tutorial, and now making an advanced woodcutting script! I watched hoppyc0ding's video, but was very upset that his video is outdated. But then i tried this, and works like a charm. Sir, you have just created another programmer! Thanks bro, and you will see me posting scripts! - Sebastian.
×
×
  • Create New...