Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
- import javax.swing.DefaultComboBoxModel;
- import javax.swing.JButton;
- import javax.swing.JComboBox;
- import javax.swing.JFrame;
- import javax.swing.JPanel;
- import org.osbot.rs07.api.map.Area;
- import org.osbot.rs07.api.model.RS2Object;
- import org.osbot.rs07.script.Script;
- import org.osbot.rs07.script.ScriptManifest;
- @ScriptManifest(author = "Mr Pro Pop", info = "JFrame", logo = "", name = "JFrame", version = 1)
- public class aaaa extends Script {
- private JFrame gui;
- private JComboBox comboBox;
- private JButton btnStart;
- private static String tree = null;
- private Area WALK = new Area(3180, 3275, 3161, 3262);
- /**
- * @wbp.parser.entryPoint
- */
- public void JFrame() {
- gui = new JFrame();
- comboBox = new JComboBox();
- btnStart = new JButton();
- gui.setTitle("title");
- gui.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- gui.setBounds(100, 100, 406, 155);
- gui.getContentPane();
- gui.getContentPane().setLayout(null);
- comboBox.setModel(new DefaultComboBoxModel(new String[] {"Select An Option", "Tree", "Oak", "Willow"}));
- comboBox.setBounds(30, 34, 124, 44);
- gui.getContentPane().add(comboBox);
- btnStart.setBounds(236, 40, 89, 33);
- gui.getContentPane().add(btnStart);
- gui.getContentPane().add(btnStart);
- gui.setVisible(true);
- btnStart.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- // TODO Auto-generated method stub
- gui.setVisible(false);
- gui.dispose();
- tree = comboBox.getSelectedItem().toString();
- if (tree.equals("Willow")) {
- Area WALK = new Area(3180, 3275, 3161, 3262);
- }
- }
- }
- });
- }
- public void onStart() {
- JFrame();
- }
- public int onLoop() throws InterruptedException {
- RS2Object willow = getObjects().closest(o -> o.getName().equalsIgnoreCase("Willow") && WALK.contains(o));
- willow.interact("Chop down");
- if(getInventory().isFull()) if(!getInventory().isFull() && !WALK.contains(myPlayer()));{
- inventory.dropAll();
- getWalking().webWalk(WALK);
- return 300;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement