Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 41.58 KB | None | 0 0
  1. import java.awt.*;
  2. import java.awt.event.*;
  3. import javax.swing.*;
  4.  
  5. import org.rsbot.script.Script;
  6. import org.rsbot.script.util.Timer;
  7. import org.rsbot.script.wrappers.RSNPC;
  8. import org.rsbot.script.methods.Game;
  9. import org.rsbot.script.methods.Magic;
  10. import org.rsbot.script.methods.Skills;
  11. import org.rsbot.script.ScriptManifest;
  12. import org.rsbot.event.events.MessageEvent;
  13. import org.rsbot.event.listeners.PaintListener;
  14. import org.rsbot.event.listeners.MessageListener;
  15.  
  16. @SuppressWarnings("unused")
  17. @ScriptManifest(authors = "ToxicGod", name = "ToxicMagic", version = 1.1, description = "Multipul magic train methods")
  18. public class ToxicMagic extends Script implements PaintListener,
  19.         MessageListener {
  20.  
  21.     ScriptManifest props = getClass().getAnnotation(ScriptManifest.class);
  22.  
  23.     GUI g = new GUI();
  24.     enchanterGUI n = new enchanterGUI();
  25.     private String SpellType = "", RemoteWord = "", Status = "Loading....";
  26.     private boolean guiWait = true;
  27.  
  28.     /**
  29.      *
  30.      * Antiban Variables
  31.      */
  32.     private boolean CheckMagicExp = true, CheckFriendslist = true,
  33.             MouseMovements = true, CameraMovements = true;
  34.  
  35.     /**
  36.      *
  37.      * Alching Variables
  38.      */
  39.     private boolean HighAlch = false, LowAlch = false;
  40.     private int ItemID;
  41.  
  42.     /**
  43.      *
  44.      * Teleporting Variables
  45.      */
  46.     public boolean MobilisingArmies = false;
  47.     public boolean VorrockTele = false;
  48.     public boolean FaladorTele = false;
  49.     public boolean LumbridgeTele = false;
  50.     public boolean CamelotTele = false;
  51.     public boolean HouseTele = false;
  52.     public boolean TrollheimTele = false;
  53.     public boolean ArdougneTele = false;
  54.     public boolean WatchTower = false;
  55.     public boolean NoTele = false;
  56.     public boolean AutoTele = false;
  57.     public boolean stopScript = false;
  58.  
  59.     /**
  60.      *
  61.      * SuperHeating variables
  62.      */
  63.     private final int Copper_Ore = 436;
  64.     private final int Tin_Ore = 438;
  65.     private final int Gold_Ore = 444;
  66.     private final int Silve_Ore = 442;
  67.     private final int Iron_Ore = 440;
  68.     private final int Coal_Ore = 453;
  69.     private final int Mithril_Ore = 447;
  70.     private final int Adamant_Ore = 449;
  71.     private final int Runite_Ore = 451;
  72.  
  73.     private boolean BronzeBars = false, IronBars = false, GoldBars = false,
  74.             SilverBars = false, SteelBars = false, MithrilBars = false,
  75.             AdamantBars = false, RuniteBars = false;
  76.  
  77.     /**
  78.      *
  79.      * Cursing Variables
  80.      */
  81.     private int Spell = 0;
  82.     private int NPC_ID = 0;
  83.     private int ActionCheck;
  84.  
  85.     /**
  86.      *
  87.      * Enchantment Variables
  88.      */
  89.     private int RawItemId = 0;
  90.     private int Enchant_spell = 0;
  91.     private final int[] Runes = { 564, 566, 556, 554, 557, 555 };
  92.  
  93.     /**
  94.      *
  95.      * Paint Variables
  96.      */
  97.     private long StartTime = 0;
  98.     private int StartExp = 0;
  99.     private int LevelsGained = 0;
  100.     private int ExpHour = 0;
  101.     private int ExpGained = 0;
  102.  
  103.     public boolean onStart() {
  104.         g.setVisible(true);
  105.         while (guiWait) {
  106.             sleep(10);
  107.         }
  108.         try {
  109.             ItemID = Integer.parseInt(g.textField2.getText());
  110.         } catch (Exception c) {
  111.         }
  112.         mouse.setSpeed(g.slider1.getValue());
  113.         StartTime = System.currentTimeMillis();
  114.         StartExp = skills.getCurrentExp(Skills.MAGIC);
  115.         return true;
  116.     }
  117.  
  118.     private enum State {
  119.         ALCH, TELEPORTING, SUPERHEATING, NPC_CURSING, Jewrely_Enchantment, UNKNOWN
  120.     }
  121.  
  122.     private State getState() {
  123.         if (SpellType.equals("Alching")) {
  124.             return State.ALCH;
  125.         } else if (SpellType.equals("Teleport")) {
  126.             return State.TELEPORTING;
  127.         } else if (SpellType.equals("SuperHeat")) {
  128.             return State.SUPERHEATING;
  129.         } else if (SpellType.equals("Cursing")) {
  130.             return State.NPC_CURSING;
  131.         } else if (SpellType.equals("Jewelry Enchantment")) {
  132.             return State.Jewrely_Enchantment;
  133.         }
  134.         return State.UNKNOWN;
  135.     }
  136.  
  137.     private Color PaintColors() {
  138.         if (g.comboBox2.getSelectedIndex() == 0) {
  139.             return Color.BLACK;
  140.         } else if (g.comboBox2.getSelectedIndex() == 1) {
  141.             return Color.RED.darker().darker();
  142.         } else if (g.comboBox2.getSelectedIndex() == 2) {
  143.             return Color.BLUE.darker();
  144.         } else if (g.comboBox2.getSelectedIndex() == 3) {
  145.             return color4.darker();
  146.         } else if (g.comboBox2.getSelectedIndex() == 4) {
  147.             return color3.darker();
  148.         }
  149.         return null;
  150.     }
  151.  
  152.     @Override
  153.     public int loop() {
  154.         switch (getState()) {
  155.         case ALCH:
  156.             if (HighAlch == true) {
  157.                 if (game.getCurrentTab() != Game.TAB_MAGIC
  158.                         && !magic.isSpellSelected()) {
  159.                     game.openTab(Game.TAB_MAGIC, true);
  160.                     sleep(random(550, 650));
  161.                 } else if (game.getCurrentTab() == Game.TAB_MAGIC) {
  162.                     magic.castSpell(Magic.SPELL_HIGH_LEVEL_ALCHEMY);
  163.                     Status = "Casting Alch";
  164.                     sleep(400);
  165.                     AntiBan();
  166.                 }
  167.                 if (game.getCurrentTab() == Game.TAB_INVENTORY
  168.                         && magic.isSpellSelected()) {
  169.                     if (inventory.contains(ItemID) && inventory.contains(561)) {
  170.                         sleep(500);
  171.                         inventory.getItem(ItemID).doClick(true);
  172.                         AntiBan();
  173.                         sleep(500);
  174.                         Status = "Casting Alch";
  175.                     } else {
  176.                         log(Color.RED,
  177.                                 "You have ran out of nature runes or your item!");
  178.                         onFinish();
  179.                     }
  180.                 }
  181.             }
  182.             if (LowAlch == true) {
  183.                 if (game.getCurrentTab() != Game.TAB_MAGIC
  184.                         && !magic.isSpellSelected()) {
  185.                     game.openTab(Game.TAB_MAGIC, true);
  186.                     return random(550, 650);
  187.                 } else if (game.getCurrentTab() == Game.TAB_MAGIC) {
  188.                     sleep(500);
  189.                     magic.castSpell(Magic.SPELL_LOW_LEVEL_ALCHEMY);
  190.                     Status = "Casting Alch";
  191.                     sleep(500);
  192.                     AntiBan();
  193.                 }
  194.                 if (game.getCurrentTab() == Game.TAB_INVENTORY
  195.                         && magic.isSpellSelected()) {
  196.                     if (inventory.contains(ItemID) && inventory.contains(561)) {
  197.                         sleep(500);
  198.                         inventory.getItem(ItemID).doClick(true);
  199.                         AntiBan();
  200.                         Status = "Casting Alch";
  201.                     } else {
  202.                         log(Color.RED,
  203.                                 "You have ran out of nature runes or your item!");
  204.                         onFinish();
  205.                     }
  206.                 }
  207.             }
  208.             if (!inventory.contains(ItemID) || !inventory.contains(561)) {
  209.                 log(Color.RED, "You have ran out of nature runes or your item!");
  210.                 stopScript(true);
  211.             }
  212.             break;
  213.         case TELEPORTING:
  214.             if (game.getCurrentTab() != Game.TAB_MAGIC) {
  215.                 game.openTab(Game.TAB_MAGIC, true);
  216.             } else if (game.getCurrentTab() == Game.TAB_MAGIC) {
  217.                 castMagicSpell();
  218.                 AntiBan();
  219.             }
  220.             break;
  221.         case NPC_CURSING:
  222.             RSNPC npc = npcs.getNearest(NPC_ID);
  223.             if (getMyPlayer().getAnimation() == -1) {
  224.                 ActionCheck++;
  225.             } else {
  226.                 ActionCheck = 0;
  227.             }
  228.  
  229.             if (ActionCheck > 3) {
  230.                 if (npc != null && game.getCurrentTab() != Game.TAB_MAGIC) {
  231.                     game.open(Game.TAB_MAGIC, true);
  232.                     Status = "Opening MagicTab";
  233.                     sleep(500);
  234.                 }
  235.                 if (game.getCurrentTab() == Game.TAB_MAGIC
  236.                         && !magic.isSpellSelected()) {
  237.                     magic.castSpell(Spell);
  238.                     Status = "Casting Spell";
  239.                     sleep(600);
  240.                 } else if (game.getCurrentTab() == Game.TAB_MAGIC
  241.                         && magic.isSpellSelected()) {
  242.                     npc.doAction("Cast");
  243.                     Status = "Casting Spell on Npc";
  244.                     sleep(600);
  245.                 }
  246.             }
  247.             break;
  248.         case Jewrely_Enchantment:
  249.             mouse.setSpeed(random(3, 5));
  250.             if (game.getCurrentTab() != Game.TAB_MAGIC
  251.                     && !magic.isSpellSelected()) {
  252.                 game.openTab(Game.TAB_MAGIC, true);
  253.                 sleep(random(550, 650));
  254.             } else if (game.getCurrentTab() == Game.TAB_MAGIC) {
  255.                 magic.castSpell(Enchant_spell);
  256.                 Status = "Casting Enchant";
  257.                 sleep(400);
  258.                 AntiBan();
  259.             }
  260.             if (game.getCurrentTab() == Game.TAB_INVENTORY
  261.                     && magic.isSpellSelected()) {
  262.                 if (inventory.contains(RawItemId)) {
  263.                     sleep(500);
  264.                     inventory.getItem(RawItemId).doClick(true);
  265.                     Status = "Casting Enchant";
  266.                     AntiBan();
  267.                     sleep(500);
  268.                 } else {
  269.                     bank.open();
  270.                     if (bank.isOpen()) {
  271.                         bank.depositAllExcept(Runes);
  272.                         sleep(500);
  273.                         if(bank.getCount(RawItemId) > 0){
  274.                             bank.withdraw(RawItemId, 0);
  275.                             bank.close();
  276.                         } else {
  277.                             log.severe("Finished Task!");
  278.                             bank.close();
  279.                             stopScript(false);
  280.                         }
  281.                     }
  282.                 }
  283.             }
  284.             break;
  285.         case UNKNOWN:
  286.             log.severe("Script got confused somewhere. "
  287.                     + "Probably because you didn't chose a method to train.");
  288.             break;
  289.         }
  290.         return random(400, 500);
  291.     }
  292.  
  293.     public void castMagicSpell() {
  294.         if (VorrockTele == true) {
  295.             mouse.setSpeed(random(3, 6));
  296.             magic.castSpell(Magic.SPELL_VARROCK_TELEPORT);
  297.             Status = "Casting Teleport";
  298.         } else if (FaladorTele == true) {
  299.             mouse.setSpeed(random(3, 6));
  300.             magic.castSpell(Magic.SPELL_FALADOR_TELEPORT);
  301.             Status = "Casting Teleport";
  302.         } else if (LumbridgeTele == true) {
  303.             mouse.setSpeed(random(3, 6));
  304.             magic.castSpell(Magic.SPELL_LUMBRIDGE_TELEPORT);
  305.             Status = "Casting Teleport";
  306.         } else if (CamelotTele == true) {
  307.             mouse.setSpeed(random(3, 6));
  308.             magic.castSpell(Magic.SPELL_CAMELOT_TELEPORT);
  309.             Status = "Casting Teleport";
  310.         } else if (TrollheimTele == true) {
  311.             mouse.setSpeed(random(5, 7));
  312.             magic.castSpell(Magic.SPELL_TROLLHEIM_TELEPORT);
  313.             Status = "Casting Teleport";
  314.         } else if (ArdougneTele == true) {
  315.             mouse.setSpeed(random(3, 6));
  316.             magic.castSpell(Magic.SPELL_ARDOUGNE_TELEPORT);
  317.             Status = "Casting Teleport";
  318.         } else if (WatchTower == true) {
  319.             mouse.setSpeed(random(3, 6));
  320.             magic.castSpell(Magic.SPELL_WATCHTOWER_TELEPORT);
  321.             Status = "Casting Teleport";
  322.         }
  323.     }
  324.  
  325.     private void AntiBan() {
  326.         if (CheckMagicExp = true) {
  327.             if (random(1, 300) == 10) {
  328.                 game.open(Game.TAB_STATS, true);
  329.                 sleep(500);
  330.                 skills.doHover(Skills.INTERFACE_MAGIC);
  331.                 sleep(random(800, 1300));
  332.             }
  333.         }
  334.         if (CheckFriendslist == true) {
  335.             if (random(1, 300) == 12) {
  336.                 game.open(Game.TAB_FRIENDS, true);
  337.                 sleep(random(600, 1500));
  338.             }
  339.         }
  340.         if (MouseMovements == true) {
  341.             if (random(1, 300) == 20) {
  342.                 mouse.moveOffScreen();
  343.                 sleep(1000);
  344.             } else if (random(1, 300) == 25) {
  345.                 mouse.moveSlightly();
  346.                 mouse.moveSlightly();
  347.             } else if (random(1, 300) == 5) {
  348.                 mouse.moveRandomly(random(1, 300));
  349.                 sleep(400);
  350.             } else if (random(1, 300) == 50) {
  351.                 mouse.moveOffScreen();
  352.                 sleep(1500);
  353.             }
  354.         }
  355.         if (CameraMovements == true) {
  356.             if (random(1, 300) == 20) {
  357.                 camera.turnTo(getMyPlayer().getLocation().randomize(5, 5), 5);
  358.             }
  359.         }
  360.         if (random(1, 300) == 40) {
  361.             AfkHandler();
  362.         }
  363.         if (random(1, 300) == 34) {
  364.             RandomXpChecker();
  365.         }
  366.     }
  367.  
  368.     private void AfkHandler() {
  369.         switch (random(1, 5)) {
  370.         case 1:
  371.             sleep(random(500, 600));
  372.             break;
  373.         case 2:
  374.             sleep(random(650, 750));
  375.             break;
  376.         case 3:
  377.             sleep(random(200, 1000));
  378.             break;
  379.         case 4:
  380.             sleep(random(500, 1150));
  381.             break;
  382.         case 5:
  383.             sleep(random(1200, 1400));
  384.             break;
  385.         }
  386.     }
  387.  
  388.     private void RandomXpChecker() {
  389.         game.openTab(Game.TAB_STATS);
  390.         switch (random(0, 21)) {
  391.         case 0:
  392.             skills.doHover(Skills.INTERFACE_FISHING);
  393.             sleep(random(2000, 3000));
  394.             game.openTab(Game.TAB_INVENTORY);
  395.             break;
  396.         case 1:
  397.             skills.doHover(Skills.INTERFACE_WOODCUTTING);
  398.             sleep(random(2000, 3000));
  399.             game.openTab(Game.TAB_INVENTORY);
  400.             break;
  401.         case 2:
  402.             skills.doHover(Skills.INTERFACE_ATTACK);
  403.             sleep(random(2000, 3000));
  404.             game.openTab(Game.TAB_INVENTORY);
  405.             break;
  406.         case 3:
  407.             skills.doHover(Skills.INTERFACE_STRENGTH);
  408.             sleep(random(2000, 3000));
  409.             game.openTab(Game.TAB_INVENTORY);
  410.             break;
  411.         case 4:
  412.             skills.doHover(Skills.INTERFACE_COOKING);
  413.             sleep(random(2000, 3000));
  414.             game.openTab(Game.TAB_INVENTORY);
  415.             break;
  416.         case 5:
  417.             skills.doHover(Skills.INTERFACE_RANGE);
  418.             sleep(random(2000, 3000));
  419.             game.openTab(Game.TAB_INVENTORY);
  420.             break;
  421.         case 6:
  422.             skills.doHover(Skills.INTERFACE_FIREMAKING);
  423.             sleep(random(2000, 3000));
  424.             game.openTab(Game.TAB_INVENTORY);
  425.             break;
  426.         case 7:
  427.             skills.doHover(Skills.INTERFACE_CONSTRUCTION);
  428.             sleep(random(2000, 3000));
  429.             game.openTab(Game.TAB_INVENTORY);
  430.             break;
  431.         case 8:
  432.             skills.doHover(Skills.INTERFACE_RUNECRAFTING);
  433.             sleep(random(2000, 3000));
  434.             game.openTab(Game.TAB_INVENTORY);
  435.             break;
  436.         case 9:
  437.             skills.doHover(Skills.INTERFACE_SUMMONING);
  438.             sleep(random(2000, 3000));
  439.             game.openTab(Game.TAB_INVENTORY);
  440.             break;
  441.         case 10:
  442.             skills.doHover(Skills.INTERFACE_SLAYER);
  443.             sleep(random(2000, 3000));
  444.             game.openTab(Game.TAB_INVENTORY);
  445.             break;
  446.         case 11:
  447.             skills.doHover(Skills.INTERFACE_CRAFTING);
  448.             sleep(random(2000, 3000));
  449.             game.openTab(Game.TAB_INVENTORY);
  450.             break;
  451.         case 12:
  452.             skills.doHover(Skills.INTERFACE_FARMING);
  453.             sleep(random(2000, 3000));
  454.             game.openTab(Game.TAB_INVENTORY);
  455.             break;
  456.         case 13:
  457.             skills.doHover(Skills.INTERFACE_AGILITY);
  458.             sleep(random(2000, 3000));
  459.             game.openTab(Game.TAB_INVENTORY);
  460.             break;
  461.         case 14:
  462.             skills.doHover(Skills.INTERFACE_THIEVING);
  463.             sleep(random(2000, 3000));
  464.             game.openTab(Game.TAB_INVENTORY);
  465.             break;
  466.         case 15:
  467.             skills.doHover(Skills.INTERFACE_HUNTER);
  468.             sleep(random(2000, 3000));
  469.             game.openTab(Game.TAB_INVENTORY);
  470.             break;
  471.         case 16:
  472.             skills.doHover(Skills.INTERFACE_MINING);
  473.             sleep(random(2000, 3000));
  474.             game.openTab(Game.TAB_INVENTORY);
  475.             break;
  476.         case 17:
  477.             skills.doHover(Skills.INTERFACE_SMITHING);
  478.             sleep(random(2000, 3000));
  479.             game.openTab(Game.TAB_INVENTORY);
  480.             break;
  481.         case 18:
  482.             skills.doHover(Skills.INTERFACE_MAGIC);
  483.             sleep(random(2000, 3000));
  484.             game.openTab(Game.TAB_INVENTORY);
  485.             break;
  486.         case 19:
  487.             skills.doHover(Skills.INTERFACE_FLETCHING);
  488.             sleep(random(2000, 3000));
  489.             game.openTab(Game.TAB_INVENTORY);
  490.             break;
  491.         case 20:
  492.             skills.doHover(Skills.INTERFACE_PRAYER);
  493.             sleep(random(2000, 3000));
  494.             game.openTab(Game.TAB_INVENTORY);
  495.             break;
  496.         }
  497.     }
  498.  
  499.     public class GUI extends JFrame {
  500.         /**
  501.          *
  502.          */
  503.         private static final long serialVersionUID = 1L;
  504.  
  505.         public GUI() {
  506.             initComponents();
  507.         }
  508.  
  509.         private void SpellTypeActionPerformed(ActionEvent e) {
  510.             int spellType = comboBox1.getSelectedIndex();
  511.             switch (spellType) {
  512.             case 0:
  513.                 comboBox3.setVisible(false);
  514.                 label8.setVisible(false);
  515.                 textField2.setVisible(false);
  516.                 label7.setVisible(false);
  517.                 button1.setText("Start Training");
  518.                 break;
  519.             case 1:
  520.                 button1.setText("Start Training");
  521.                 comboBox3.setVisible(true);
  522.                 comboBox3.setModel(new DefaultComboBoxModel(new String[] {
  523.                         "Varrock Teleport", "Lumbridge Teleport",
  524.                         "Falador Teleport", "Camelot Teleport",
  525.                         "Ardougne Teleport", "Watchtower Teleport",
  526.                         "Trollheim Teleport" }));
  527.                 label8.setVisible(false);
  528.                 textField2.setVisible(false);
  529.                 label7.setVisible(true);
  530.                 break;
  531.             case 2:
  532.                 button1.setText("Start Training");
  533.                 comboBox3.setVisible(true);
  534.                 comboBox3.setModel(new DefaultComboBoxModel(new String[] {
  535.                         "Low Alch", "High Alch" }));
  536.                 label8.setVisible(true);
  537.                 label8.setText("Item ID: ");
  538.                 textField2.setVisible(true);
  539.                 label7.setVisible(true);
  540.                 break;
  541.             case 3:
  542.                 button1.setText("Start Training");
  543.                 comboBox3.setVisible(true);
  544.                 comboBox3
  545.                         .setModel(new DefaultComboBoxModel(new String[] {
  546.                                 "Confuse", "Weaken", "Curse", "Vulnerability",
  547.                                 "Stun" }));
  548.                 label8.setVisible(true);
  549.                 label8.setText("NPC ID: ");
  550.                 textField2.setVisible(true);
  551.                 label7.setVisible(true);
  552.                 break;
  553.             case 4:
  554.                 comboBox3.setVisible(false);
  555.                 label8.setVisible(false);
  556.                 textField2.setVisible(false);
  557.                 label7.setVisible(false);
  558.                 button1.setVisible(true);
  559.                 button1.setText("Continue");
  560.                 break;
  561.             }
  562.         }
  563.  
  564.         private void StartButton(ActionEvent e) {
  565.             try {
  566.                 String Chosen = comboBox1.getSelectedItem().toString();
  567.                 String Tele = comboBox3.getSelectedItem().toString();
  568.                 String Bars = comboBox3.getSelectedItem().toString();
  569.                 String Spells = comboBox3.getSelectedItem().toString();
  570.                 if (Chosen.equals("Teleports")) {
  571.                     SpellType = "Teleport";
  572.                     if (Tele.contains("Varrock")) {
  573.                         VorrockTele = true;
  574.                     } else if (Tele.contains("Lumbridge")) {
  575.                         LumbridgeTele = true;
  576.                     } else if (Tele.contains("Falador")) {
  577.                         FaladorTele = true;
  578.                     } else if (Tele.contains("Camelot")) {
  579.                         CamelotTele = true;
  580.                     } else if (Tele.contains("Ardougne")) {
  581.                         ArdougneTele = true;
  582.                     } else if (Tele.contains("Watchtower")) {
  583.                         WatchTower = true;
  584.                     } else if (Tele.contains("Trollheim")) {
  585.                         TrollheimTele = true;
  586.                     }
  587.                     guiWait = false;
  588.                 } else if (Chosen.equals("Alching")) {
  589.                     SpellType = "Alching";
  590.                     if (comboBox3.getSelectedItem().toString().contains("High")) {
  591.                         HighAlch = true;
  592.                     } else {
  593.                         LowAlch = true;
  594.                     }
  595.                     guiWait = false;
  596.                 } else if (Chosen.equals("SuperHeating")) {
  597.                     SpellType = "SuperHeat";
  598.                     if (Bars.equals("Bronze")) {
  599.                         BronzeBars = true;
  600.                     } else if (Bars.equals("Iron")) {
  601.                         IronBars = true;
  602.                     } else if (Bars.equals("Steel")) {
  603.                         SteelBars = true;
  604.                     } else if (Bars.equals("Silver")) {
  605.                         SilverBars = true;
  606.                     } else if (Bars.equals("Gold")) {
  607.                         GoldBars = true;
  608.                     } else if (Bars.equals("Mithril")) {
  609.                         MithrilBars = true;
  610.                     } else if (Bars.equals("Adamant")) {
  611.                         AdamantBars = true;
  612.                     } else if (Bars.equals("Runite")) {
  613.                         RuniteBars = true;
  614.                     }
  615.                     guiWait = false;
  616.                 } else if (Chosen.equals("Cursing")) {
  617.                     SpellType = "Cursing";
  618.                     if (Spells.equals("Confuse")) {
  619.                         Spell = Magic.SPELL_CONFUSE;
  620.                     } else if (Spells.equals("Weaken")) {
  621.                         Spell = Magic.SPELL_WEAKEN;
  622.                     } else if (Spells.equals("Curse")) {
  623.                         Spell = Magic.SPELL_CURSE;
  624.                     } else if (Spells.equals("Vulnerability")) {
  625.                         Spell = Magic.SPELL_VULNERABILITY;
  626.                     } else if (Spells.equals("Stun")) {
  627.                         Spell = Magic.SPELL_STUN;
  628.                     }
  629.                     guiWait = false;
  630.                     NPC_ID = Integer.parseInt(g.textField2.getText());
  631.                     g.dispose();
  632.                 }
  633.             } catch (NullPointerException g) {
  634.                
  635.             }
  636.             if (comboBox1.getSelectedItem().equals("Jewelry Enchantment")) {
  637.                 SpellType = "Jewelry Enchantment";
  638.                 log.severe("Please start script eather bank closed or bank closed with item in it!");
  639.                 log.severe("Banking is not yet flawless! Do one of the above and your fine!");
  640.                 g.dispose();
  641.                 n.setVisible(true);
  642.             }
  643.         }
  644.  
  645.         private void ContinueButton(ActionEvent e) {
  646.  
  647.         }
  648.  
  649.         private void RemoteControlActionPerformed(ActionEvent e) {
  650.             /**
  651.              * if (checkBox1.isSelected()) { textField1.setEnabled(true); } else
  652.              * { textField1.setEnabled(false); }
  653.              */
  654.         }
  655.  
  656.         private void initComponents() {
  657.             label1 = new JLabel();
  658.             label2 = new JLabel();
  659.             tabbedPane1 = new JTabbedPane();
  660.             panel1 = new JPanel();
  661.             label3 = new JLabel();
  662.             comboBox1 = new JComboBox();
  663.             button1 = new JButton();
  664.             button2 = new JButton();
  665.             label7 = new JLabel();
  666.             comboBox3 = new JComboBox();
  667.             label8 = new JLabel();
  668.             textField2 = new JTextField();
  669.             panel3 = new JPanel();
  670.             label4 = new JLabel();
  671.             comboBox2 = new JComboBox();
  672.             label5 = new JLabel();
  673.             slider1 = new JSlider();
  674.             checkBox1 = new JCheckBox();
  675.             scrollPane2 = new JScrollPane();
  676.             editorPane2 = new JEditorPane();
  677.             textField1 = new JTextField();
  678.             label6 = new JLabel();
  679.             panel4 = new JPanel();
  680.             checkBox2 = new JCheckBox();
  681.             checkBox3 = new JCheckBox();
  682.             checkBox4 = new JCheckBox();
  683.             checkBox5 = new JCheckBox();
  684.             textField3 = new JTextField();
  685.             label10 = new JLabel();
  686.             scrollPane1 = new JScrollPane();
  687.             editorPane1 = new JEditorPane();
  688.  
  689.             // ======== this ========
  690.             setTitle("ToxicMagic");
  691.             setBackground(new Color(51, 51, 51));
  692.             setForeground(new Color(51, 51, 51));
  693.             setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
  694.             setAlwaysOnTop(true);
  695.             setResizable(false);
  696.             Container contentPane = getContentPane();
  697.             contentPane.setLayout(null);
  698.  
  699.             // ---- label1 ----
  700.             label1.setText("ToxicGod's Multi Magic Trainer");
  701.             label1.setFont(new Font("Algerian", Font.BOLD, 20));
  702.             label1.setForeground(new Color(204, 0, 0));
  703.             label1.setBackground(Color.white);
  704.             contentPane.add(label1);
  705.             label1.setBounds(5, 10, label1.getPreferredSize().width, 23);
  706.  
  707.             // ---- label2 ----
  708.             label2.setText("Version " + props.version());
  709.             label2.setFont(new Font("Tahoma", Font.PLAIN, 14));
  710.             label2.setForeground(Color.white);
  711.             contentPane.add(label2);
  712.             label2.setBounds(new Rectangle(new Point(265, 46), label2
  713.                     .getPreferredSize()));
  714.  
  715.             // ======== tabbedPane1 ========
  716.             {
  717.  
  718.                 // ======== panel1 ========
  719.                 {
  720.                     panel1.setBackground(Color.black);
  721.  
  722.                     // JFormDesigner evaluation mark
  723.                     panel1.setBorder(new javax.swing.border.CompoundBorder(
  724.                             new javax.swing.border.TitledBorder(
  725.                                     new javax.swing.border.EmptyBorder(0, 0, 0,
  726.                                             0), "",
  727.                                     javax.swing.border.TitledBorder.CENTER,
  728.                                     javax.swing.border.TitledBorder.BOTTOM,
  729.                                     new java.awt.Font("Dialog",
  730.                                             java.awt.Font.BOLD, 12),
  731.                                     java.awt.Color.red), panel1.getBorder()));
  732.                     panel1.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
  733.                         public void propertyChange(
  734.                                 java.beans.PropertyChangeEvent e) {
  735.                             if ("border".equals(e.getPropertyName()))
  736.                                 throw new RuntimeException();
  737.                         }
  738.                     });
  739.  
  740.                     panel1.setLayout(null);
  741.  
  742.                     // ---- label3 ----
  743.                     label3.setText("Spell Type: ");
  744.                     label3.setFont(new Font("Tahoma", Font.PLAIN, 14));
  745.                     label3.setForeground(Color.orange);
  746.                     panel1.add(label3);
  747.                     label3.setBounds(5, 20, label3.getPreferredSize().width, 30);
  748.  
  749.                     // ---- comboBox1 ----
  750.                     comboBox1.setBackground(new Color(0, 0, 204));
  751.                     comboBox1.setForeground(new Color(0, 0, 204));
  752.                     comboBox1.setModel(new DefaultComboBoxModel(new String[] {
  753.                             "None", "Teleports", "Alching", "Cursing",
  754.                             "Jewelry Enchantment" }));
  755.                     comboBox1.addActionListener(new ActionListener() {
  756.                         @Override
  757.                         public void actionPerformed(ActionEvent e) {
  758.                             SpellTypeActionPerformed(e);
  759.                         }
  760.                     });
  761.                     panel1.add(comboBox1);
  762.                     comboBox1.setBounds(80, 25, 250, 25);
  763.  
  764.                     // ---- button1 ----
  765.                     button1.setText("Start Training");
  766.                     button1.setFont(new Font("Tahoma", Font.PLAIN, 20));
  767.                     button1.setForeground(new Color(204, 0, 0));
  768.                     button1.setBackground(new Color(153, 0, 0));
  769.                     button1.addActionListener(new ActionListener() {
  770.                         @Override
  771.                         public void actionPerformed(ActionEvent e) {
  772.                             StartButton(e);
  773.                         }
  774.                     });
  775.                     panel1.add(button1);
  776.                     button1.setBounds(5, 230, 330, 40);
  777.  
  778.                     // ---- label7 ----
  779.                     label7.setText("Spell: ");
  780.                     label7.setVisible(false);
  781.                     label7.setForeground(Color.orange);
  782.                     label7.setFont(new Font("Tahoma", Font.PLAIN, 16));
  783.                     panel1.add(label7);
  784.                     label7.setBounds(5, 65, label7.getPreferredSize().width, 25);
  785.  
  786.                     // ---- comboBox3 ----
  787.                     comboBox3.setVisible(false);
  788.                     panel1.add(comboBox3);
  789.                     comboBox3.setBounds(80, 65, 250, 25);
  790.  
  791.                     // ---- label8 ----
  792.                     label8.setText("Item To Alch: ");
  793.                     label8.setVisible(false);
  794.                     label8.setForeground(Color.orange);
  795.                     label8.setFont(new Font("Tahoma", Font.PLAIN, 14));
  796.                     panel1.add(label8);
  797.                     label8.setBounds(5, 110, label8.getPreferredSize().width,
  798.                             25);
  799.                     panel1.add(textField2);
  800.                     textField2.setBounds(95, 110, 235, 25);
  801.                     textField2.setVisible(false);
  802.  
  803.                     { // compute preferred size
  804.                         Dimension preferredSize = new Dimension();
  805.                         for (int i = 0; i < panel1.getComponentCount(); i++) {
  806.                             Rectangle bounds = panel1.getComponent(i)
  807.                                     .getBounds();
  808.                             preferredSize.width = Math.max(bounds.x
  809.                                     + bounds.width, preferredSize.width);
  810.                             preferredSize.height = Math.max(bounds.y
  811.                                     + bounds.height, preferredSize.height);
  812.                         }
  813.                         Insets insets = panel1.getInsets();
  814.                         preferredSize.width += insets.right;
  815.                         preferredSize.height += insets.bottom;
  816.                         panel1.setMinimumSize(preferredSize);
  817.                         panel1.setPreferredSize(preferredSize);
  818.                     }
  819.                 }
  820.                 tabbedPane1.addTab("Main Tab", panel1);
  821.  
  822.                 // ======== panel3 ========
  823.                 {
  824.                     panel3.setBackground(Color.black);
  825.                     panel3.setLayout(null);
  826.  
  827.                     // ---- label4 ----
  828.                     label4.setText("Paint Color: ");
  829.                     label4.setForeground(new Color(255, 153, 0));
  830.                     label4.setFont(new Font("Tahoma", Font.PLAIN, 16));
  831.                     panel3.add(label4);
  832.                     label4.setBounds(new Rectangle(new Point(10, 15), label4
  833.                             .getPreferredSize()));
  834.  
  835.                     // ---- comboBox2 ----
  836.                     comboBox2.setModel(new DefaultComboBoxModel(new String[] {
  837.                             "Black", "Red", "Blue", "Brown", "Purple" }));
  838.                     panel3.add(comboBox2);
  839.                     comboBox2.setBounds(100, 15, 230, 20);
  840.  
  841.                     // ---- label5 ----
  842.                     label5.setText("Mouse Speed: ");
  843.                     label5.setForeground(new Color(255, 204, 0));
  844.                     label5.setFont(new Font("Tahoma", Font.PLAIN, 14));
  845.                     panel3.add(label5);
  846.                     label5.setBounds(new Rectangle(new Point(10, 55), label5
  847.                             .getPreferredSize()));
  848.  
  849.                     // ---- slider1 ----
  850.                     slider1.setBackground(Color.black);
  851.                     slider1.setPaintLabels(true);
  852.                     slider1.setPaintTicks(true);
  853.                     slider1.setSnapToTicks(true);
  854.                     slider1.setForeground(Color.white);
  855.                     slider1.setMajorTickSpacing(1);
  856.                     slider1.setMinorTickSpacing(1);
  857.                     slider1.setMaximum(10);
  858.                     panel3.add(slider1);
  859.                     slider1.setBounds(5, 80, 330, 40);
  860.  
  861.                     // ---- checkBox1 ----
  862.                     checkBox1.setText("Enable Remote Control");
  863.                     checkBox1.setEnabled(false);
  864.                     checkBox1.setBackground(Color.black);
  865.                     checkBox1.setForeground(Color.white);
  866.                     checkBox1.addActionListener(new ActionListener() {
  867.                         @Override
  868.                         public void actionPerformed(ActionEvent e) {
  869.                             RemoteControlActionPerformed(e);
  870.                         }
  871.                     });
  872.                     panel3.add(checkBox1);
  873.                     checkBox1.setBounds(new Rectangle(new Point(5, 140),
  874.                             checkBox1.getPreferredSize()));
  875.  
  876.                     // ======== scrollPane2 ========
  877.                     {
  878.  
  879.                         // ---- editorPane2 ----
  880.                         editorPane2
  881.                                 .setText("Remote Control lets you be able to stop the script using \na keyword that another one of your accounts/friend says to you will botting. Make the key word something that no one would say");
  882.                         editorPane2.setForeground(Color.white);
  883.                         editorPane2.setBackground(Color.darkGray);
  884.                         scrollPane2.setViewportView(editorPane2);
  885.                     }
  886.                     panel3.add(scrollPane2);
  887.                     scrollPane2.setBounds(5, 165, 330, 55);
  888.  
  889.                     // ---- textField1 ----
  890.                     textField1.setEnabled(false);
  891.                     panel3.add(textField1);
  892.                     textField1.setBounds(85, 240, 250,
  893.                             textField1.getPreferredSize().height);
  894.  
  895.                     // ---- label6 ----
  896.                     label6.setText("Key Word:");
  897.                     label6.setForeground(Color.white);
  898.                     label6.setFont(new Font("Tahoma", Font.PLAIN, 16));
  899.                     panel3.add(label6);
  900.                     label6.setBounds(new Rectangle(new Point(5, 240), label6
  901.                             .getPreferredSize()));
  902.  
  903.                     { // compute preferred size
  904.                         Dimension preferredSize = new Dimension();
  905.                         for (int i = 0; i < panel3.getComponentCount(); i++) {
  906.                             Rectangle bounds = panel3.getComponent(i)
  907.                                     .getBounds();
  908.                             preferredSize.width = Math.max(bounds.x
  909.                                     + bounds.width, preferredSize.width);
  910.                             preferredSize.height = Math.max(bounds.y
  911.                                     + bounds.height, preferredSize.height);
  912.                         }
  913.                         Insets insets = panel3.getInsets();
  914.                         preferredSize.width += insets.right;
  915.                         preferredSize.height += insets.bottom;
  916.                         panel3.setMinimumSize(preferredSize);
  917.                         panel3.setPreferredSize(preferredSize);
  918.                     }
  919.                 }
  920.                 tabbedPane1.addTab("Extra Options", panel3);
  921.  
  922.                 // ======== panel4 ========
  923.                 {
  924.                     panel4.setBackground(Color.black);
  925.                     panel4.setLayout(null);
  926.  
  927.                     // ---- checkBox2 ----
  928.                     checkBox2.setText("Check Magic Exp");
  929.                     checkBox2.setBackground(Color.black);
  930.                     checkBox2.setForeground(new Color(255, 153, 0));
  931.                     checkBox2.setFont(new Font("Tahoma", Font.PLAIN, 12));
  932.                     panel4.add(checkBox2);
  933.                     checkBox2.setBounds(new Rectangle(new Point(10, 15),
  934.                             checkBox2.getPreferredSize()));
  935.  
  936.                     // ---- checkBox3 ----
  937.                     checkBox3.setText("Check friends list");
  938.                     checkBox3.setBackground(Color.black);
  939.                     checkBox3.setForeground(new Color(255, 153, 0));
  940.                     checkBox3.setFont(new Font("Tahoma", Font.PLAIN, 12));
  941.                     panel4.add(checkBox3);
  942.                     checkBox3.setBounds(10, 45, 125, 23);
  943.  
  944.                     // ---- checkBox4 ----
  945.                     checkBox4.setText("Random Mouse Movements");
  946.                     checkBox4.setBackground(Color.black);
  947.                     checkBox4.setForeground(new Color(255, 153, 0));
  948.                     checkBox4.setFont(new Font("Tahoma", Font.PLAIN, 12));
  949.                     panel4.add(checkBox4);
  950.                     checkBox4.setBounds(10, 75, 180, 23);
  951.  
  952.                     // ---- checkBox5 ----
  953.                     checkBox5.setText("Random Camera Movements");
  954.                     checkBox5.setBackground(Color.black);
  955.                     checkBox5.setForeground(new Color(255, 153, 0));
  956.                     checkBox5.setFont(new Font("Tahoma", Font.PLAIN, 12));
  957.                     panel4.add(checkBox5);
  958.                     checkBox5.setBounds(10, 105, 180, 23);
  959.  
  960.                     // ---- textField3 ----
  961.                     textField3.setBackground(Color.darkGray);
  962.                     textField3.setForeground(Color.white);
  963.                     textField3
  964.                             .setText("Script made by: ToxicGod. All Credits go to ToxicGod");
  965.                     textField3.setHorizontalAlignment(SwingConstants.CENTER);
  966.                     panel4.add(textField3);
  967.                     textField3.setBounds(5, 200, 330, 70);
  968.  
  969.                     // ---- label10 ----
  970.                     label10.setText("Credits: ");
  971.                     label10.setForeground(Color.white);
  972.                     panel4.add(label10);
  973.                     label10.setBounds(new Rectangle(new Point(145, 180),
  974.                             label10.getPreferredSize()));
  975.  
  976.                     { // compute preferred size
  977.                         Dimension preferredSize = new Dimension();
  978.                         for (int i = 0; i < panel4.getComponentCount(); i++) {
  979.                             Rectangle bounds = panel4.getComponent(i)
  980.                                     .getBounds();
  981.                             preferredSize.width = Math.max(bounds.x
  982.                                     + bounds.width, preferredSize.width);
  983.                             preferredSize.height = Math.max(bounds.y
  984.                                     + bounds.height, preferredSize.height);
  985.                         }
  986.                         Insets insets = panel4.getInsets();
  987.                         preferredSize.width += insets.right;
  988.                         preferredSize.height += insets.bottom;
  989.                         panel4.setMinimumSize(preferredSize);
  990.                         panel4.setPreferredSize(preferredSize);
  991.                     }
  992.                 }
  993.                 tabbedPane1.addTab("AntiBan Options", panel4);
  994.  
  995.             }
  996.             contentPane.add(tabbedPane1);
  997.             tabbedPane1.setBounds(10, 45, 347, 305);
  998.  
  999.             // ======== scrollPane1 ========
  1000.             {
  1001.  
  1002.                 // ---- editorPane1 ----
  1003.                 editorPane1.setBackground(Color.black);
  1004.                 scrollPane1.setViewportView(editorPane1);
  1005.             }
  1006.             contentPane.add(scrollPane1);
  1007.             scrollPane1.setBounds(0, 0, 370, 365);
  1008.  
  1009.             { // compute preferred size
  1010.                 Dimension preferredSize = new Dimension();
  1011.                 for (int i = 0; i < contentPane.getComponentCount(); i++) {
  1012.                     Rectangle bounds = contentPane.getComponent(i).getBounds();
  1013.                     preferredSize.width = Math.max(bounds.x + bounds.width,
  1014.                             preferredSize.width);
  1015.                     preferredSize.height = Math.max(bounds.y + bounds.height,
  1016.                             preferredSize.height);
  1017.                 }
  1018.                 Insets insets = contentPane.getInsets();
  1019.                 preferredSize.width += insets.right;
  1020.                 preferredSize.height += insets.bottom;
  1021.                 contentPane.setMinimumSize(preferredSize);
  1022.                 contentPane.setPreferredSize(preferredSize);
  1023.             }
  1024.             pack();
  1025.             setLocationRelativeTo(getOwner());
  1026.         }
  1027.  
  1028.         private JLabel label1;
  1029.         private JLabel label2;
  1030.         private JTabbedPane tabbedPane1;
  1031.         private JPanel panel1;
  1032.         private JLabel label3;
  1033.         private JComboBox comboBox1;
  1034.         private JButton button1;
  1035.         private JButton button2;
  1036.         private JLabel label7;
  1037.         private JComboBox comboBox3;
  1038.         private JLabel label8;
  1039.         private JTextField textField2;
  1040.         private JPanel panel3;
  1041.         private JLabel label4;
  1042.         private JComboBox comboBox2;
  1043.         private JLabel label5;
  1044.         private JSlider slider1;
  1045.         private JCheckBox checkBox1;
  1046.         private JScrollPane scrollPane2;
  1047.         private JEditorPane editorPane2;
  1048.         private JTextField textField1;
  1049.         private JLabel label6;
  1050.         private JPanel panel4;
  1051.         private JCheckBox checkBox2;
  1052.         private JCheckBox checkBox3;
  1053.         private JCheckBox checkBox4;
  1054.         private JCheckBox checkBox5;
  1055.         private JTextField textField3;
  1056.         private JLabel label10;
  1057.         private JScrollPane scrollPane1;
  1058.         private JEditorPane editorPane1;
  1059.     }
  1060.  
  1061.     @Override
  1062.     public void messageReceived(MessageEvent e) {
  1063.         final String msg = e.getMessage();
  1064.         if (msg.contains("do not have enough")) {
  1065.             stopScript(true);
  1066.         }
  1067.         if (msg.contains("advanced")) {
  1068.             LevelsGained++;
  1069.         }
  1070.         if (msg.contains("has already been")) {
  1071.             ActionCheck = 0;
  1072.         }
  1073.     }
  1074.  
  1075.     // START: Code generated using Enfilade's Easel
  1076.     private final Color color1 = new Color(0, 0, 0);
  1077.     private final Color color2 = new Color(255, 255, 255);
  1078.     private final Color color3 = new Color(102, 0, 102);
  1079.     private final Color color4 = new Color(112, 63, 0);
  1080.  
  1081.     private final BasicStroke stroke1 = new BasicStroke(1);
  1082.  
  1083.     private final Font font1 = new Font("Arial", 0, 20);
  1084.     private final Font font2 = new Font("Arial", 0, 12);
  1085.     private final Font font3 = new Font("Arial", 0, 10);
  1086.  
  1087.     public void onRepaint(Graphics g1) {
  1088.         Graphics2D g = (Graphics2D) g1;
  1089.  
  1090.         long millis = System.currentTimeMillis() - StartTime;
  1091.         String time = Timer.format(millis);
  1092.         ExpGained = skills.getCurrentExp(Skills.MAGIC) - StartExp;
  1093.         ExpHour = (int) ((ExpGained) * 3600000D / (System.currentTimeMillis() - StartTime));
  1094.  
  1095.         g.setColor(PaintColors());
  1096.         g.fillRect(382, 208, 134, 128);
  1097.         g.setColor(color2);
  1098.         g.setStroke(stroke1);
  1099.         g.drawRect(382, 208, 134, 128);
  1100.         g.setColor(PaintColors());
  1101.         g.fillRect(382, 170, 135, 32);
  1102.         g.setColor(color2);
  1103.         g.drawRect(382, 170, 135, 32);
  1104.         g.setFont(font1);
  1105.         g.drawString("ToxicMagic", 405, 188);
  1106.         g.setFont(font2);
  1107.         g.drawString("By: ToxicGod", 417, 199);
  1108.         g.drawString("Status: " + Status, 385, 224);
  1109.         g.drawString("Run Time: " + time, 385, 237);
  1110.         g.drawString("Exp Gained: " + ExpGained, 385, 257);
  1111.         g.drawString("Exp/Hr: " + ExpHour, 385, 270);
  1112.         g.drawString("Exp TNL: " + skills.getExpToNextLevel(Skills.MAGIC), 385,
  1113.                 283);
  1114.         g.setFont(font3);
  1115.         g.drawString("Spell Type: " + SpellType, 385, 333);
  1116.         g.setFont(font2);
  1117.         g.drawString("Level Gained: " + LevelsGained, 385, 314);
  1118.         g.drawString("Level: " + skills.getCurrentLevel(Skills.MAGIC), 385, 301);
  1119.     }
  1120.  
  1121.     // END: Code generated using Enfilade's Easel
  1122.  
  1123.     @Override
  1124.     public void onFinish() {
  1125.         env.takeScreenshot(true);
  1126.     }
  1127.  
  1128.     public class enchanterGUI extends JFrame {
  1129.         /**
  1130.          *
  1131.          */
  1132.         private static final long serialVersionUID = 1L;
  1133.  
  1134.         public enchanterGUI() {
  1135.             initComponents();
  1136.         }
  1137.  
  1138.         private void Start(ActionEvent e) {
  1139.             final String ItemType = comboBox1.getSelectedItem().toString();
  1140.             final String EnchantType = comboBox2.getSelectedItem().toString();
  1141.             if (ItemType.equals("Enchant Rings")
  1142.                     && EnchantType.equals("Sapphire")) {
  1143.                 RawItemId = 1637;
  1144.                 Enchant_spell = Magic.SPELL_LVL1_ENCHANT;
  1145.             } else if (ItemType.equals("Enchant Rings")
  1146.                     && EnchantType.equals("Emerald")) {
  1147.                 RawItemId = 1639;
  1148.                 Enchant_spell = Magic.SPELL_LVL2_ENCHANT;
  1149.             } else if (ItemType.equals("Enchant Rings")
  1150.                     && EnchantType.equals("Ruby")) {
  1151.                 RawItemId = 1641;
  1152.                 Enchant_spell = Magic.SPELL_LVL3_ENCHANT;
  1153.             } else if (ItemType.equals("Enchant Rings")
  1154.                     && EnchantType.equals("Diamond")) {
  1155.                 RawItemId = 1643;
  1156.                 Enchant_spell = Magic.SPELL_LVL4_ENCHANT;
  1157.             } else if (ItemType.equals("Enchant Rings")
  1158.                     && EnchantType.equals("Dragonstone")) {
  1159.                 RawItemId = 1645;
  1160.                 Enchant_spell = Magic.SPELL_LVL5_ENCHANT;
  1161.             } else if (ItemType.equals("Enchant Rings")
  1162.                     && EnchantType.equals("Onyx")) {
  1163.                 RawItemId = 6575;
  1164.                 Enchant_spell = Magic.SPELL_LVL6_ENCHANT;
  1165.             } else if (ItemType.equals("Enchant Necklace")
  1166.                     && EnchantType.equals("Sapphire")) {
  1167.                 RawItemId = 1656;
  1168.                 Enchant_spell = Magic.SPELL_LVL1_ENCHANT;
  1169.             } else if (ItemType.equals("Enchant Necklace")
  1170.                     && EnchantType.equals("Emerald")) {
  1171.                 RawItemId = 1658;
  1172.                 Enchant_spell = Magic.SPELL_LVL2_ENCHANT;
  1173.             } else if (ItemType.equals("Enchant Necklace")
  1174.                     && EnchantType.equals("Ruby")) {
  1175.                 RawItemId = 1660;
  1176.                 Enchant_spell = Magic.SPELL_LVL3_ENCHANT;
  1177.             } else if (ItemType.equals("Enchant Necklace")
  1178.                     && EnchantType.equals("Diamond")) {
  1179.                 RawItemId = 1662;
  1180.                 Enchant_spell = Magic.SPELL_LVL4_ENCHANT;
  1181.             } else if (ItemType.equals("Enchant Necklace")
  1182.                     && EnchantType.equals("Dragonstone")) {
  1183.                 RawItemId = 1664;
  1184.                 Enchant_spell = Magic.SPELL_LVL5_ENCHANT;
  1185.             } else if (ItemType.equals("Enchant Necklace")
  1186.                     && EnchantType.equals("Onyx")) {
  1187.                 RawItemId = 6577;
  1188.                 Enchant_spell = Magic.SPELL_LVL6_ENCHANT;
  1189.             } else if (ItemType.equals("Enchant Amulets")
  1190.                     && EnchantType.equals("Sapphire")) {
  1191.                 RawItemId = 1694;
  1192.                 Enchant_spell = Magic.SPELL_LVL1_ENCHANT;
  1193.             } else if (ItemType.equals("Enchant Amulets")
  1194.                     && EnchantType.equals("Emerald")) {
  1195.                 RawItemId = 1696;
  1196.                 Enchant_spell = Magic.SPELL_LVL2_ENCHANT;
  1197.             } else if (ItemType.equals("Enchant Amulets")
  1198.                     && EnchantType.equals("Ruby")) {
  1199.                 RawItemId = 1698;
  1200.                 Enchant_spell = Magic.SPELL_LVL3_ENCHANT;
  1201.             } else if (ItemType.equals("Enchant Amulets")
  1202.                     && EnchantType.equals("Diamond")) {
  1203.                 RawItemId = 1700;
  1204.                 Enchant_spell = Magic.SPELL_LVL4_ENCHANT;
  1205.             } else if (ItemType.equals("Enchant Amulets")
  1206.                     && EnchantType.equals("Dragonstone")) {
  1207.                 RawItemId = 1702;
  1208.                 Enchant_spell = Magic.SPELL_LVL5_ENCHANT;
  1209.             } else if (ItemType.equals("Enchant Amulets")
  1210.                     && EnchantType.equals("Onyx")) {
  1211.                 RawItemId = 6581;
  1212.                 Enchant_spell = Magic.SPELL_LVL6_ENCHANT;
  1213.             } else if (ItemType.equals("Enchant Bracelets")
  1214.                     && EnchantType.equals("Sapphire")) {
  1215.                 RawItemId = 11072;
  1216.                 Enchant_spell = Magic.SPELL_LVL1_ENCHANT;
  1217.             } else if (ItemType.equals("Enchant Bracelets")
  1218.                     && EnchantType.equals("Emerald")) {
  1219.                 RawItemId = 11076;
  1220.                 Enchant_spell = Magic.SPELL_LVL2_ENCHANT;
  1221.             } else if (ItemType.equals("Enchant Bracelets")
  1222.                     && EnchantType.equals("Ruby")) {
  1223.                 RawItemId = 11085;
  1224.                 Enchant_spell = Magic.SPELL_LVL3_ENCHANT;
  1225.             } else if (ItemType.equals("Enchant Bracelets")
  1226.                     && EnchantType.equals("Diamond")) {
  1227.                 RawItemId = 11092;
  1228.                 Enchant_spell = Magic.SPELL_LVL4_ENCHANT;
  1229.             } else if (ItemType.equals("Enchant Bracelets")
  1230.                     && EnchantType.equals("Dragonstone")) {
  1231.                 RawItemId = 11115;
  1232.                 Enchant_spell = Magic.SPELL_LVL5_ENCHANT;
  1233.             } else if (ItemType.equals("Enchant Bracelets")
  1234.                     && EnchantType.equals("Onyx")) {
  1235.                 RawItemId = 11130;
  1236.                 Enchant_spell = Magic.SPELL_LVL6_ENCHANT;
  1237.             }
  1238.             n.dispose();
  1239.             guiWait = false;
  1240.         }
  1241.  
  1242.         private void initComponents() {
  1243.             label1 = new JLabel();
  1244.             label2 = new JLabel();
  1245.             comboBox1 = new JComboBox();
  1246.             label3 = new JLabel();
  1247.             comboBox2 = new JComboBox();
  1248.             button1 = new JButton();
  1249.             scrollPane1 = new JScrollPane();
  1250.             editorPane1 = new JEditorPane();
  1251.  
  1252.             // ======== this ========
  1253.             setTitle("ToxicMagic");
  1254.             setResizable(false);
  1255.             Container contentPane = getContentPane();
  1256.             contentPane.setLayout(null);
  1257.  
  1258.             // ---- label1 ----
  1259.             label1.setText("Jewelry Enchanter");
  1260.             label1.setBackground(new Color(153, 0, 0));
  1261.             label1.setForeground(new Color(153, 0, 0));
  1262.             label1.setFont(new Font("Dialog", Font.BOLD, 24));
  1263.             contentPane.add(label1);
  1264.             label1.setBounds(new Rectangle(new Point(90, 10), label1
  1265.                     .getPreferredSize()));
  1266.  
  1267.             // ---- label2 ----
  1268.             label2.setText("Enchant Type:");
  1269.             label2.setForeground(new Color(153, 0, 0));
  1270.             contentPane.add(label2);
  1271.             label2.setBounds(10, 60, 105, 25);
  1272.  
  1273.             // ---- comboBox1 ----
  1274.             comboBox1.setBackground(new Color(153, 0, 0));
  1275.             comboBox1.setForeground(Color.black);
  1276.             comboBox1.setModel(new DefaultComboBoxModel(new String[] {
  1277.                     "Enchant Rings", "Enchant Necklace", "Enchant Amulets",
  1278.                     "Enchant Bracelets" }));
  1279.             contentPane.add(comboBox1);
  1280.             comboBox1.setBounds(115, 60, 265,
  1281.                     comboBox1.getPreferredSize().height);
  1282.  
  1283.             // ---- label3 ----
  1284.             label3.setText("Spell: ");
  1285.             label3.setForeground(new Color(153, 0, 0));
  1286.             contentPane.add(label3);
  1287.             label3.setBounds(10, 100, 105, 25);
  1288.  
  1289.             // ---- comboBox2 ----
  1290.             comboBox2.setBackground(new Color(153, 0, 0));
  1291.             comboBox2.setForeground(Color.black);
  1292.             contentPane.add(comboBox2);
  1293.             comboBox2.setBounds(115, 100, 265,
  1294.                     comboBox2.getPreferredSize().height);
  1295.             comboBox2.setModel(new DefaultComboBoxModel(new String[] {
  1296.                     "Sapphire", "Emerald", "Ruby", "Diamond", "Dragonstone",
  1297.                     "Onyx" }));
  1298.  
  1299.             // ---- button1 ----
  1300.             button1.setText("Start Script");
  1301.             button1.setBackground(new Color(153, 0, 0));
  1302.             button1.setForeground(Color.black);
  1303.             button1.setFont(new Font("Dialog", Font.BOLD, 14));
  1304.             button1.addActionListener(new ActionListener() {
  1305.                 @Override
  1306.                 public void actionPerformed(ActionEvent e) {
  1307.                     Start(e);
  1308.                 }
  1309.             });
  1310.             contentPane.add(button1);
  1311.             button1.setBounds(10, 140, 371, button1.getPreferredSize().height);
  1312.  
  1313.             // ======== scrollPane1 ========
  1314.             {
  1315.  
  1316.                 // ---- editorPane1 ----
  1317.                 editorPane1.setBackground(Color.black);
  1318.                 editorPane1.setEditable(false);
  1319.                 editorPane1.setEnabled(false);
  1320.                 scrollPane1.setViewportView(editorPane1);
  1321.             }
  1322.             contentPane.add(scrollPane1);
  1323.             scrollPane1.setBounds(0, 0, 395, 175);
  1324.  
  1325.             { // compute preferred size
  1326.                 Dimension preferredSize = new Dimension();
  1327.                 for (int i = 0; i < contentPane.getComponentCount(); i++) {
  1328.                     Rectangle bounds = contentPane.getComponent(i).getBounds();
  1329.                     preferredSize.width = Math.max(bounds.x + bounds.width,
  1330.                             preferredSize.width);
  1331.                     preferredSize.height = Math.max(bounds.y + bounds.height,
  1332.                             preferredSize.height);
  1333.                 }
  1334.                 Insets insets = contentPane.getInsets();
  1335.                 preferredSize.width += insets.right;
  1336.                 preferredSize.height += insets.bottom;
  1337.                 contentPane.setMinimumSize(preferredSize);
  1338.                 contentPane.setPreferredSize(preferredSize);
  1339.             }
  1340.             pack();
  1341.             setLocationRelativeTo(getOwner());
  1342.         }
  1343.  
  1344.         private JLabel label1;
  1345.         private JLabel label2;
  1346.         private JComboBox comboBox1;
  1347.         private JLabel label3;
  1348.         private JComboBox comboBox2;
  1349.         private JButton button1;
  1350.         private JScrollPane scrollPane1;
  1351.         private JEditorPane editorPane1;
  1352.     }
  1353. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement