Guest User

Untitled

a guest
Dec 11th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.42 KB | None | 0 0
  1. where the variables are!!!!!! :D
  2.  
  3. public class StrategiesFletch {
  4.  
  5. public static int NormalShortBow = 50;
  6. public static int Fletched = NormalShortBow;
  7. public static int NormalLogID = 1511;
  8. public static int OakLogID = 1521;
  9. public static int WillowLogID = 1519;
  10. public static int MapleLogID = 1517;
  11. public static int YewLogID = 1515;
  12. public static int MagicLogID = 1513;
  13. public static int GenericLog = NormalLogID;
  14. public static int NormalArrowShaftsComponent = 14;
  15. public static int NormalshortbowComponent = 15;
  16. public static int NormallongbowComponent = 16;
  17. public static int NormalCrossbowStockComponent = 17;
  18. public static int longbowComponent = 15;
  19. public static int CrossBowStockComponent = 16;
  20. public static int Component = NormalArrowShaftsComponent;
  21. public static int[] BANK_BOOTHS = {782};
  22.  
  23. public static boolean Normal = false;
  24. public static boolean Oak = false;
  25. public static boolean Willow = false;
  26. public static boolean Maple = false;
  27. public static boolean Yew = false;
  28. public static boolean Magic = false;
  29. public static boolean LongBow = false;
  30. public static boolean ShortBow = false;
  31. static Component Make = Widgets.getComponent(905, Component);
  32. public static class MethodOne implements Strategy {
  33.  
  34.  
  35.  
  36. Where i use them
  37.  
  38.  
  39. class FletchingGUI extends JFrame {
  40. public FletchingGUI() {
  41. initComponents();
  42. }
  43.  
  44. private void Itemshappening(ItemEvent e) {
  45. // TODO add your code here
  46. }
  47. private void startButtonActionPerformed(ActionEvent e){
  48. String WoodChoice = (String) WoodToUse.getSelectedItem();
  49. String MakeChoice = (String) Making.getSelectedItem();
  50. if (WoodChoice == "Logs") {
  51. StrategiesFletch.GenericLog = StrategiesFletch.NormalLogID;
  52.  
  53. } else if (WoodChoice == "Oak") {
  54. StrategiesFletch.GenericLog = StrategiesFletch.OakLogID;
  55.  
  56. } else if (WoodChoice == "Willow") {
  57. StrategiesFletch.GenericLog= StrategiesFletch.WillowLogID;
  58.  
  59. }
  60. dispose();
  61.  
  62. }
  63.  
  64. private void initComponents() {
  65. // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
  66. // Generated using JFormDesigner Evaluation license - bob Springfiield
  67. WoodToUse = new JComboBox();
  68. Making = new JComboBox();
  69. label1 = new JLabel();
  70. label2 = new JLabel();
  71. Start = new JButton();
  72.  
  73. //======== this ========
  74. Container contentPane = getContentPane();
  75.  
  76. //---- WoodToUse ----
  77. WoodToUse.addItemListener(new ItemListener() {
  78. @Override
  79. public void itemStateChanged(ItemEvent e) {
  80. Itemshappening(e);
  81. }
  82. });
  83. WoodToUse.setMaximumRowCount(3);
  84. WoodToUse.setModel(new DefaultComboBoxModel(new String[] {
  85. "Logs", "Oak", "Willow" }));
  86.  
  87. //---- Making ----
  88. Making.addItemListener(new ItemListener() {
  89. @Override
  90. public void itemStateChanged(ItemEvent e) {
  91. Itemshappening(e);
  92. }
  93. });
  94.  
  95. //---- label1 ----
  96. label1.setText("Wood Type");
  97.  
  98. //---- label2 ----
  99. label2.setText("What to Make?");
  100.  
  101. //---- Start ----
  102. Start.setText("Start Script");
  103. Start.addActionListener(new ActionListener() {
  104. @Override
  105. public void actionPerformed(ActionEvent e) {
  106. startButtonActionPerformed(e);
  107. }
  108. });
  109.  
  110. GroupLayout contentPaneLayout = new GroupLayout(contentPane);
  111. contentPane.setLayout(contentPaneLayout);
  112. contentPaneLayout.setHorizontalGroup(
  113. contentPaneLayout.createParallelGroup()
  114. .addGroup(contentPaneLayout.createSequentialGroup()
  115. .addGap(19, 19, 19)
  116. .addComponent(WoodToUse, GroupLayout.PREFERRED_SIZE, 145, GroupLayout.PREFERRED_SIZE)
  117. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 62, Short.MAX_VALUE)
  118. .addComponent(Making, GroupLayout.PREFERRED_SIZE, 145, GroupLayout.PREFERRED_SIZE)
  119. .addGap(28, 28, 28))
  120. .addGroup(contentPaneLayout.createSequentialGroup()
  121. .addGap(63, 63, 63)
  122. .addComponent(label1)
  123. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 137, Short.MAX_VALUE)
  124. .addComponent(label2)
  125. .addGap(72, 72, 72))
  126. .addGroup(contentPaneLayout.createSequentialGroup()
  127. .addGap(131, 131, 131)
  128. .addComponent(Start, GroupLayout.PREFERRED_SIZE, 122, GroupLayout.PREFERRED_SIZE)
  129. .addContainerGap(146, Short.MAX_VALUE))
  130. );
  131. contentPaneLayout.setVerticalGroup(
  132. contentPaneLayout.createParallelGroup()
  133. .addGroup(contentPaneLayout.createSequentialGroup()
  134. .addGap(23, 23, 23)
  135. .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
  136. .addComponent(label1)
  137. .addComponent(label2))
  138. .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
  139. .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
  140. .addComponent(WoodToUse, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
  141. .addComponent(Making, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
  142. .addGap(32, 32, 32)
  143. .addComponent(Start)
  144. .addContainerGap(36, Short.MAX_VALUE))
  145. );
  146. pack();
  147. setLocationRelativeTo(getOwner());
  148. // JFormDesigner - End of component initialization //GEN-END:initComponents
  149. }
  150.  
  151. // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
  152. // Generated using JFormDesigner Evaluation license - bob Springfiield
  153. private JComboBox WoodToUse;
  154. private JComboBox Making;
  155. private JLabel label1;
  156. private JLabel label2;
  157. private JButton Start;
  158. // JFormDesigner - End of variables declaration //GEN-END:variables
  159. }
Add Comment
Please, Sign In to add comment