Update dropping items

This commit is contained in:
Danial
2021-10-07 13:35:42 +13:00
parent e85177ebf9
commit ab7be16b6b
3 changed files with 43 additions and 2 deletions
+3 -1
View File
@@ -39,7 +39,6 @@ public class Main extends Script implements MessageListener, Paintable {
strategies.add(new UpdateBank()); strategies.add(new UpdateBank());
strategies.add(new UpdateExperience()); strategies.add(new UpdateExperience());
strategies.add(new ScriptState()); strategies.add(new ScriptState());
strategies.add(new Drop());
// if(Variables.skill_to_train == Skill.CRAFTING) { // if(Variables.skill_to_train == Skill.CRAFTING) {
// strategies.add(new Crafting()); // strategies.add(new Crafting());
@@ -79,6 +78,9 @@ public class Main extends Script implements MessageListener, Paintable {
strategies.add(new Walk()); strategies.add(new Walk());
strategies.add(new PickupItems()); strategies.add(new PickupItems());
} }
// These strategies should always be running
strategies.add(new Drop());
strategies.add(new HandleLogin()); strategies.add(new HandleLogin());
provide(strategies); provide(strategies);
return true; return true;
+6 -1
View File
@@ -47,10 +47,11 @@ public class Variables {
// Thieving // Thieving
public static ThievingNpcs thieving_npc_selected = ThievingNpcs.MAN_WOMAN; public static ThievingNpcs thieving_npc_selected = ThievingNpcs.MAN_WOMAN;
//public static String thieving_method = "None"; public static String thieving_method = "Drop";
// Fishing // Fishing
public static FishingSpots fishing_spot_selected = FishingSpots.NET; public static FishingSpots fishing_spot_selected = FishingSpots.NET;
public static String fishing_method = "Drop";
// Banking // Banking
public static int[] bank_items = new int[]{}; public static int[] bank_items = new int[]{};
@@ -207,6 +208,10 @@ public class Variables {
return woodcutting_method.equalsIgnoreCase("Drop"); return woodcutting_method.equalsIgnoreCase("Drop");
case "Mining": case "Mining":
return mining_method.equalsIgnoreCase("Drop"); return mining_method.equalsIgnoreCase("Drop");
case "Fishing":
return fishing_method.equalsIgnoreCase("Drop");
case "Thieving":
return thieving_method.equalsIgnoreCase("Drop");
default: default:
return false; return false;
} }
+34
View File
@@ -52,9 +52,11 @@ public class UI extends JFrame {
private JComboBox thievingNpcSelect = new JComboBox(); private JComboBox thievingNpcSelect = new JComboBox();
private JLabel lblThievingNpcCustomID = new JLabel("Custom NPC IDs"); private JLabel lblThievingNpcCustomID = new JLabel("Custom NPC IDs");
private JTextField thievingNpcCustomID = new JTextField(); private JTextField thievingNpcCustomID = new JTextField();
private JComboBox thievingMethod = new JComboBox();
// Fishing // Fishing
private JComboBox fishingTypeSelect = new JComboBox(); private JComboBox fishingTypeSelect = new JComboBox();
private JComboBox fishingMethod = new JComboBox();
// Our colors // Our colors
private Color Color_MidnightBlue = new Color(44, 62, 80); private Color Color_MidnightBlue = new Color(44, 62, 80);
@@ -600,6 +602,22 @@ public class UI extends JFrame {
lblThievingNpcCustomID.setVisible(false); lblThievingNpcCustomID.setVisible(false);
thievingNpcCustomID.setVisible(false); thievingNpcCustomID.setVisible(false);
// What should we do with our items
JLabel lblThievingMethod = new JLabel("Method");
lblThievingMethod.setForeground(Color_WhiteSmoke);
lblThievingMethod.setBounds(20, 60, 150, 20);
thievingPanel.add(lblThievingMethod);
thievingMethod.setModel(new DefaultComboBoxModel(new String[]{
"Drop",
}));
thievingMethod.setBounds(20, 80, 150, 20);
thievingMethod.addActionListener (new ActionListener () {
public void actionPerformed(ActionEvent e) {
Variables.thieving_method = thievingMethod.getSelectedItem().toString();
}
});
thievingPanel.add(thievingMethod);
/* /*
* Fishing Panel * Fishing Panel
*/ */
@@ -628,6 +646,22 @@ public class UI extends JFrame {
}); });
fishingPanel.add(fishingTypeSelect); fishingPanel.add(fishingTypeSelect);
// What should we do with out fish
JLabel lblFishingMethod = new JLabel("Method");
lblFishingMethod.setForeground(Color_WhiteSmoke);
lblFishingMethod.setBounds(20, 60, 150, 20);
fishingPanel.add(lblFishingMethod);
fishingMethod.setModel(new DefaultComboBoxModel(new String[]{
"Drop",
}));
fishingMethod.setBounds(20, 80, 150, 20);
fishingMethod.addActionListener (new ActionListener () {
public void actionPerformed(ActionEvent e) {
Variables.fishing_method = fishingMethod.getSelectedItem().toString();
}
});
fishingPanel.add(fishingMethod);
/* /*
* Slave Panel * Slave Panel
* *