Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.*;
- import java.awt.event.*;
- import javax.swing.*;
- import org.rsbot.script.Script;
- import org.rsbot.script.util.Timer;
- import org.rsbot.script.wrappers.RSNPC;
- import org.rsbot.script.methods.Game;
- import org.rsbot.script.methods.Magic;
- import org.rsbot.script.methods.Skills;
- import org.rsbot.script.ScriptManifest;
- import org.rsbot.event.events.MessageEvent;
- import org.rsbot.event.listeners.PaintListener;
- import org.rsbot.event.listeners.MessageListener;
- @SuppressWarnings("unused")
- @ScriptManifest(authors = "ToxicGod", name = "ToxicMagic", version = 1.1, description = "Multipul magic train methods")
- public class ToxicMagic extends Script implements PaintListener,
- MessageListener {
- ScriptManifest props = getClass().getAnnotation(ScriptManifest.class);
- GUI g = new GUI();
- enchanterGUI n = new enchanterGUI();
- private String SpellType = "", RemoteWord = "", Status = "Loading....";
- private boolean guiWait = true;
- /**
- *
- * Antiban Variables
- */
- private boolean CheckMagicExp = true, CheckFriendslist = true,
- MouseMovements = true, CameraMovements = true;
- /**
- *
- * Alching Variables
- */
- private boolean HighAlch = false, LowAlch = false;
- private int ItemID;
- /**
- *
- * Teleporting Variables
- */
- public boolean MobilisingArmies = false;
- public boolean VorrockTele = false;
- public boolean FaladorTele = false;
- public boolean LumbridgeTele = false;
- public boolean CamelotTele = false;
- public boolean HouseTele = false;
- public boolean TrollheimTele = false;
- public boolean ArdougneTele = false;
- public boolean WatchTower = false;
- public boolean NoTele = false;
- public boolean AutoTele = false;
- public boolean stopScript = false;
- /**
- *
- * SuperHeating variables
- */
- private final int Copper_Ore = 436;
- private final int Tin_Ore = 438;
- private final int Gold_Ore = 444;
- private final int Silve_Ore = 442;
- private final int Iron_Ore = 440;
- private final int Coal_Ore = 453;
- private final int Mithril_Ore = 447;
- private final int Adamant_Ore = 449;
- private final int Runite_Ore = 451;
- private boolean BronzeBars = false, IronBars = false, GoldBars = false,
- SilverBars = false, SteelBars = false, MithrilBars = false,
- AdamantBars = false, RuniteBars = false;
- /**
- *
- * Cursing Variables
- */
- private int Spell = 0;
- private int NPC_ID = 0;
- private int ActionCheck;
- /**
- *
- * Enchantment Variables
- */
- private int RawItemId = 0;
- private int Enchant_spell = 0;
- private final int[] Runes = { 564, 566, 556, 554, 557, 555 };
- /**
- *
- * Paint Variables
- */
- private long StartTime = 0;
- private int StartExp = 0;
- private int LevelsGained = 0;
- private int ExpHour = 0;
- private int ExpGained = 0;
- public boolean onStart() {
- g.setVisible(true);
- while (guiWait) {
- sleep(10);
- }
- try {
- ItemID = Integer.parseInt(g.textField2.getText());
- } catch (Exception c) {
- }
- mouse.setSpeed(g.slider1.getValue());
- StartTime = System.currentTimeMillis();
- StartExp = skills.getCurrentExp(Skills.MAGIC);
- return true;
- }
- private enum State {
- ALCH, TELEPORTING, SUPERHEATING, NPC_CURSING, Jewrely_Enchantment, UNKNOWN
- }
- private State getState() {
- if (SpellType.equals("Alching")) {
- return State.ALCH;
- } else if (SpellType.equals("Teleport")) {
- return State.TELEPORTING;
- } else if (SpellType.equals("SuperHeat")) {
- return State.SUPERHEATING;
- } else if (SpellType.equals("Cursing")) {
- return State.NPC_CURSING;
- } else if (SpellType.equals("Jewelry Enchantment")) {
- return State.Jewrely_Enchantment;
- }
- return State.UNKNOWN;
- }
- private Color PaintColors() {
- if (g.comboBox2.getSelectedIndex() == 0) {
- return Color.BLACK;
- } else if (g.comboBox2.getSelectedIndex() == 1) {
- return Color.RED.darker().darker();
- } else if (g.comboBox2.getSelectedIndex() == 2) {
- return Color.BLUE.darker();
- } else if (g.comboBox2.getSelectedIndex() == 3) {
- return color4.darker();
- } else if (g.comboBox2.getSelectedIndex() == 4) {
- return color3.darker();
- }
- return null;
- }
- @Override
- public int loop() {
- switch (getState()) {
- case ALCH:
- if (HighAlch == true) {
- if (game.getCurrentTab() != Game.TAB_MAGIC
- && !magic.isSpellSelected()) {
- game.openTab(Game.TAB_MAGIC, true);
- sleep(random(550, 650));
- } else if (game.getCurrentTab() == Game.TAB_MAGIC) {
- magic.castSpell(Magic.SPELL_HIGH_LEVEL_ALCHEMY);
- Status = "Casting Alch";
- sleep(400);
- AntiBan();
- }
- if (game.getCurrentTab() == Game.TAB_INVENTORY
- && magic.isSpellSelected()) {
- if (inventory.contains(ItemID) && inventory.contains(561)) {
- sleep(500);
- inventory.getItem(ItemID).doClick(true);
- AntiBan();
- sleep(500);
- Status = "Casting Alch";
- } else {
- log(Color.RED,
- "You have ran out of nature runes or your item!");
- onFinish();
- }
- }
- }
- if (LowAlch == true) {
- if (game.getCurrentTab() != Game.TAB_MAGIC
- && !magic.isSpellSelected()) {
- game.openTab(Game.TAB_MAGIC, true);
- return random(550, 650);
- } else if (game.getCurrentTab() == Game.TAB_MAGIC) {
- sleep(500);
- magic.castSpell(Magic.SPELL_LOW_LEVEL_ALCHEMY);
- Status = "Casting Alch";
- sleep(500);
- AntiBan();
- }
- if (game.getCurrentTab() == Game.TAB_INVENTORY
- && magic.isSpellSelected()) {
- if (inventory.contains(ItemID) && inventory.contains(561)) {
- sleep(500);
- inventory.getItem(ItemID).doClick(true);
- AntiBan();
- Status = "Casting Alch";
- } else {
- log(Color.RED,
- "You have ran out of nature runes or your item!");
- onFinish();
- }
- }
- }
- if (!inventory.contains(ItemID) || !inventory.contains(561)) {
- log(Color.RED, "You have ran out of nature runes or your item!");
- stopScript(true);
- }
- break;
- case TELEPORTING:
- if (game.getCurrentTab() != Game.TAB_MAGIC) {
- game.openTab(Game.TAB_MAGIC, true);
- } else if (game.getCurrentTab() == Game.TAB_MAGIC) {
- castMagicSpell();
- AntiBan();
- }
- break;
- case NPC_CURSING:
- RSNPC npc = npcs.getNearest(NPC_ID);
- if (getMyPlayer().getAnimation() == -1) {
- ActionCheck++;
- } else {
- ActionCheck = 0;
- }
- if (ActionCheck > 3) {
- if (npc != null && game.getCurrentTab() != Game.TAB_MAGIC) {
- game.open(Game.TAB_MAGIC, true);
- Status = "Opening MagicTab";
- sleep(500);
- }
- if (game.getCurrentTab() == Game.TAB_MAGIC
- && !magic.isSpellSelected()) {
- magic.castSpell(Spell);
- Status = "Casting Spell";
- sleep(600);
- } else if (game.getCurrentTab() == Game.TAB_MAGIC
- && magic.isSpellSelected()) {
- npc.doAction("Cast");
- Status = "Casting Spell on Npc";
- sleep(600);
- }
- }
- break;
- case Jewrely_Enchantment:
- mouse.setSpeed(random(3, 5));
- if (game.getCurrentTab() != Game.TAB_MAGIC
- && !magic.isSpellSelected()) {
- game.openTab(Game.TAB_MAGIC, true);
- sleep(random(550, 650));
- } else if (game.getCurrentTab() == Game.TAB_MAGIC) {
- magic.castSpell(Enchant_spell);
- Status = "Casting Enchant";
- sleep(400);
- AntiBan();
- }
- if (game.getCurrentTab() == Game.TAB_INVENTORY
- && magic.isSpellSelected()) {
- if (inventory.contains(RawItemId)) {
- sleep(500);
- inventory.getItem(RawItemId).doClick(true);
- Status = "Casting Enchant";
- AntiBan();
- sleep(500);
- } else {
- bank.open();
- if (bank.isOpen()) {
- bank.depositAllExcept(Runes);
- sleep(500);
- if(bank.getCount(RawItemId) > 0){
- bank.withdraw(RawItemId, 0);
- bank.close();
- } else {
- log.severe("Finished Task!");
- bank.close();
- stopScript(false);
- }
- }
- }
- }
- break;
- case UNKNOWN:
- log.severe("Script got confused somewhere. "
- + "Probably because you didn't chose a method to train.");
- break;
- }
- return random(400, 500);
- }
- public void castMagicSpell() {
- if (VorrockTele == true) {
- mouse.setSpeed(random(3, 6));
- magic.castSpell(Magic.SPELL_VARROCK_TELEPORT);
- Status = "Casting Teleport";
- } else if (FaladorTele == true) {
- mouse.setSpeed(random(3, 6));
- magic.castSpell(Magic.SPELL_FALADOR_TELEPORT);
- Status = "Casting Teleport";
- } else if (LumbridgeTele == true) {
- mouse.setSpeed(random(3, 6));
- magic.castSpell(Magic.SPELL_LUMBRIDGE_TELEPORT);
- Status = "Casting Teleport";
- } else if (CamelotTele == true) {
- mouse.setSpeed(random(3, 6));
- magic.castSpell(Magic.SPELL_CAMELOT_TELEPORT);
- Status = "Casting Teleport";
- } else if (TrollheimTele == true) {
- mouse.setSpeed(random(5, 7));
- magic.castSpell(Magic.SPELL_TROLLHEIM_TELEPORT);
- Status = "Casting Teleport";
- } else if (ArdougneTele == true) {
- mouse.setSpeed(random(3, 6));
- magic.castSpell(Magic.SPELL_ARDOUGNE_TELEPORT);
- Status = "Casting Teleport";
- } else if (WatchTower == true) {
- mouse.setSpeed(random(3, 6));
- magic.castSpell(Magic.SPELL_WATCHTOWER_TELEPORT);
- Status = "Casting Teleport";
- }
- }
- private void AntiBan() {
- if (CheckMagicExp = true) {
- if (random(1, 300) == 10) {
- game.open(Game.TAB_STATS, true);
- sleep(500);
- skills.doHover(Skills.INTERFACE_MAGIC);
- sleep(random(800, 1300));
- }
- }
- if (CheckFriendslist == true) {
- if (random(1, 300) == 12) {
- game.open(Game.TAB_FRIENDS, true);
- sleep(random(600, 1500));
- }
- }
- if (MouseMovements == true) {
- if (random(1, 300) == 20) {
- mouse.moveOffScreen();
- sleep(1000);
- } else if (random(1, 300) == 25) {
- mouse.moveSlightly();
- mouse.moveSlightly();
- } else if (random(1, 300) == 5) {
- mouse.moveRandomly(random(1, 300));
- sleep(400);
- } else if (random(1, 300) == 50) {
- mouse.moveOffScreen();
- sleep(1500);
- }
- }
- if (CameraMovements == true) {
- if (random(1, 300) == 20) {
- camera.turnTo(getMyPlayer().getLocation().randomize(5, 5), 5);
- }
- }
- if (random(1, 300) == 40) {
- AfkHandler();
- }
- if (random(1, 300) == 34) {
- RandomXpChecker();
- }
- }
- private void AfkHandler() {
- switch (random(1, 5)) {
- case 1:
- sleep(random(500, 600));
- break;
- case 2:
- sleep(random(650, 750));
- break;
- case 3:
- sleep(random(200, 1000));
- break;
- case 4:
- sleep(random(500, 1150));
- break;
- case 5:
- sleep(random(1200, 1400));
- break;
- }
- }
- private void RandomXpChecker() {
- game.openTab(Game.TAB_STATS);
- switch (random(0, 21)) {
- case 0:
- skills.doHover(Skills.INTERFACE_FISHING);
- sleep(random(2000, 3000));
- game.openTab(Game.TAB_INVENTORY);
- break;
- case 1:
- skills.doHover(Skills.INTERFACE_WOODCUTTING);
- sleep(random(2000, 3000));
- game.openTab(Game.TAB_INVENTORY);
- break;
- case 2:
- skills.doHover(Skills.INTERFACE_ATTACK);
- sleep(random(2000, 3000));
- game.openTab(Game.TAB_INVENTORY);
- break;
- case 3:
- skills.doHover(Skills.INTERFACE_STRENGTH);
- sleep(random(2000, 3000));
- game.openTab(Game.TAB_INVENTORY);
- break;
- case 4:
- skills.doHover(Skills.INTERFACE_COOKING);
- sleep(random(2000, 3000));
- game.openTab(Game.TAB_INVENTORY);
- break;
- case 5:
- skills.doHover(Skills.INTERFACE_RANGE);
- sleep(random(2000, 3000));
- game.openTab(Game.TAB_INVENTORY);
- break;
- case 6:
- skills.doHover(Skills.INTERFACE_FIREMAKING);
- sleep(random(2000, 3000));
- game.openTab(Game.TAB_INVENTORY);
- break;
- case 7:
- skills.doHover(Skills.INTERFACE_CONSTRUCTION);
- sleep(random(2000, 3000));
- game.openTab(Game.TAB_INVENTORY);
- break;
- case 8:
- skills.doHover(Skills.INTERFACE_RUNECRAFTING);
- sleep(random(2000, 3000));
- game.openTab(Game.TAB_INVENTORY);
- break;
- case 9:
- skills.doHover(Skills.INTERFACE_SUMMONING);
- sleep(random(2000, 3000));
- game.openTab(Game.TAB_INVENTORY);
- break;
- case 10:
- skills.doHover(Skills.INTERFACE_SLAYER);
- sleep(random(2000, 3000));
- game.openTab(Game.TAB_INVENTORY);
- break;
- case 11:
- skills.doHover(Skills.INTERFACE_CRAFTING);
- sleep(random(2000, 3000));
- game.openTab(Game.TAB_INVENTORY);
- break;
- case 12:
- skills.doHover(Skills.INTERFACE_FARMING);
- sleep(random(2000, 3000));
- game.openTab(Game.TAB_INVENTORY);
- break;
- case 13:
- skills.doHover(Skills.INTERFACE_AGILITY);
- sleep(random(2000, 3000));
- game.openTab(Game.TAB_INVENTORY);
- break;
- case 14:
- skills.doHover(Skills.INTERFACE_THIEVING);
- sleep(random(2000, 3000));
- game.openTab(Game.TAB_INVENTORY);
- break;
- case 15:
- skills.doHover(Skills.INTERFACE_HUNTER);
- sleep(random(2000, 3000));
- game.openTab(Game.TAB_INVENTORY);
- break;
- case 16:
- skills.doHover(Skills.INTERFACE_MINING);
- sleep(random(2000, 3000));
- game.openTab(Game.TAB_INVENTORY);
- break;
- case 17:
- skills.doHover(Skills.INTERFACE_SMITHING);
- sleep(random(2000, 3000));
- game.openTab(Game.TAB_INVENTORY);
- break;
- case 18:
- skills.doHover(Skills.INTERFACE_MAGIC);
- sleep(random(2000, 3000));
- game.openTab(Game.TAB_INVENTORY);
- break;
- case 19:
- skills.doHover(Skills.INTERFACE_FLETCHING);
- sleep(random(2000, 3000));
- game.openTab(Game.TAB_INVENTORY);
- break;
- case 20:
- skills.doHover(Skills.INTERFACE_PRAYER);
- sleep(random(2000, 3000));
- game.openTab(Game.TAB_INVENTORY);
- break;
- }
- }
- public class GUI extends JFrame {
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- public GUI() {
- initComponents();
- }
- private void SpellTypeActionPerformed(ActionEvent e) {
- int spellType = comboBox1.getSelectedIndex();
- switch (spellType) {
- case 0:
- comboBox3.setVisible(false);
- label8.setVisible(false);
- textField2.setVisible(false);
- label7.setVisible(false);
- button1.setText("Start Training");
- break;
- case 1:
- button1.setText("Start Training");
- comboBox3.setVisible(true);
- comboBox3.setModel(new DefaultComboBoxModel(new String[] {
- "Varrock Teleport", "Lumbridge Teleport",
- "Falador Teleport", "Camelot Teleport",
- "Ardougne Teleport", "Watchtower Teleport",
- "Trollheim Teleport" }));
- label8.setVisible(false);
- textField2.setVisible(false);
- label7.setVisible(true);
- break;
- case 2:
- button1.setText("Start Training");
- comboBox3.setVisible(true);
- comboBox3.setModel(new DefaultComboBoxModel(new String[] {
- "Low Alch", "High Alch" }));
- label8.setVisible(true);
- label8.setText("Item ID: ");
- textField2.setVisible(true);
- label7.setVisible(true);
- break;
- case 3:
- button1.setText("Start Training");
- comboBox3.setVisible(true);
- comboBox3
- .setModel(new DefaultComboBoxModel(new String[] {
- "Confuse", "Weaken", "Curse", "Vulnerability",
- "Stun" }));
- label8.setVisible(true);
- label8.setText("NPC ID: ");
- textField2.setVisible(true);
- label7.setVisible(true);
- break;
- case 4:
- comboBox3.setVisible(false);
- label8.setVisible(false);
- textField2.setVisible(false);
- label7.setVisible(false);
- button1.setVisible(true);
- button1.setText("Continue");
- break;
- }
- }
- private void StartButton(ActionEvent e) {
- try {
- String Chosen = comboBox1.getSelectedItem().toString();
- String Tele = comboBox3.getSelectedItem().toString();
- String Bars = comboBox3.getSelectedItem().toString();
- String Spells = comboBox3.getSelectedItem().toString();
- if (Chosen.equals("Teleports")) {
- SpellType = "Teleport";
- if (Tele.contains("Varrock")) {
- VorrockTele = true;
- } else if (Tele.contains("Lumbridge")) {
- LumbridgeTele = true;
- } else if (Tele.contains("Falador")) {
- FaladorTele = true;
- } else if (Tele.contains("Camelot")) {
- CamelotTele = true;
- } else if (Tele.contains("Ardougne")) {
- ArdougneTele = true;
- } else if (Tele.contains("Watchtower")) {
- WatchTower = true;
- } else if (Tele.contains("Trollheim")) {
- TrollheimTele = true;
- }
- guiWait = false;
- } else if (Chosen.equals("Alching")) {
- SpellType = "Alching";
- if (comboBox3.getSelectedItem().toString().contains("High")) {
- HighAlch = true;
- } else {
- LowAlch = true;
- }
- guiWait = false;
- } else if (Chosen.equals("SuperHeating")) {
- SpellType = "SuperHeat";
- if (Bars.equals("Bronze")) {
- BronzeBars = true;
- } else if (Bars.equals("Iron")) {
- IronBars = true;
- } else if (Bars.equals("Steel")) {
- SteelBars = true;
- } else if (Bars.equals("Silver")) {
- SilverBars = true;
- } else if (Bars.equals("Gold")) {
- GoldBars = true;
- } else if (Bars.equals("Mithril")) {
- MithrilBars = true;
- } else if (Bars.equals("Adamant")) {
- AdamantBars = true;
- } else if (Bars.equals("Runite")) {
- RuniteBars = true;
- }
- guiWait = false;
- } else if (Chosen.equals("Cursing")) {
- SpellType = "Cursing";
- if (Spells.equals("Confuse")) {
- Spell = Magic.SPELL_CONFUSE;
- } else if (Spells.equals("Weaken")) {
- Spell = Magic.SPELL_WEAKEN;
- } else if (Spells.equals("Curse")) {
- Spell = Magic.SPELL_CURSE;
- } else if (Spells.equals("Vulnerability")) {
- Spell = Magic.SPELL_VULNERABILITY;
- } else if (Spells.equals("Stun")) {
- Spell = Magic.SPELL_STUN;
- }
- guiWait = false;
- NPC_ID = Integer.parseInt(g.textField2.getText());
- g.dispose();
- }
- } catch (NullPointerException g) {
- }
- if (comboBox1.getSelectedItem().equals("Jewelry Enchantment")) {
- SpellType = "Jewelry Enchantment";
- log.severe("Please start script eather bank closed or bank closed with item in it!");
- log.severe("Banking is not yet flawless! Do one of the above and your fine!");
- g.dispose();
- n.setVisible(true);
- }
- }
- private void ContinueButton(ActionEvent e) {
- }
- private void RemoteControlActionPerformed(ActionEvent e) {
- /**
- * if (checkBox1.isSelected()) { textField1.setEnabled(true); } else
- * { textField1.setEnabled(false); }
- */
- }
- private void initComponents() {
- label1 = new JLabel();
- label2 = new JLabel();
- tabbedPane1 = new JTabbedPane();
- panel1 = new JPanel();
- label3 = new JLabel();
- comboBox1 = new JComboBox();
- button1 = new JButton();
- button2 = new JButton();
- label7 = new JLabel();
- comboBox3 = new JComboBox();
- label8 = new JLabel();
- textField2 = new JTextField();
- panel3 = new JPanel();
- label4 = new JLabel();
- comboBox2 = new JComboBox();
- label5 = new JLabel();
- slider1 = new JSlider();
- checkBox1 = new JCheckBox();
- scrollPane2 = new JScrollPane();
- editorPane2 = new JEditorPane();
- textField1 = new JTextField();
- label6 = new JLabel();
- panel4 = new JPanel();
- checkBox2 = new JCheckBox();
- checkBox3 = new JCheckBox();
- checkBox4 = new JCheckBox();
- checkBox5 = new JCheckBox();
- textField3 = new JTextField();
- label10 = new JLabel();
- scrollPane1 = new JScrollPane();
- editorPane1 = new JEditorPane();
- // ======== this ========
- setTitle("ToxicMagic");
- setBackground(new Color(51, 51, 51));
- setForeground(new Color(51, 51, 51));
- setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
- setAlwaysOnTop(true);
- setResizable(false);
- Container contentPane = getContentPane();
- contentPane.setLayout(null);
- // ---- label1 ----
- label1.setText("ToxicGod's Multi Magic Trainer");
- label1.setFont(new Font("Algerian", Font.BOLD, 20));
- label1.setForeground(new Color(204, 0, 0));
- label1.setBackground(Color.white);
- contentPane.add(label1);
- label1.setBounds(5, 10, label1.getPreferredSize().width, 23);
- // ---- label2 ----
- label2.setText("Version " + props.version());
- label2.setFont(new Font("Tahoma", Font.PLAIN, 14));
- label2.setForeground(Color.white);
- contentPane.add(label2);
- label2.setBounds(new Rectangle(new Point(265, 46), label2
- .getPreferredSize()));
- // ======== tabbedPane1 ========
- {
- // ======== panel1 ========
- {
- panel1.setBackground(Color.black);
- // JFormDesigner evaluation mark
- panel1.setBorder(new javax.swing.border.CompoundBorder(
- new javax.swing.border.TitledBorder(
- new javax.swing.border.EmptyBorder(0, 0, 0,
- 0), "",
- javax.swing.border.TitledBorder.CENTER,
- javax.swing.border.TitledBorder.BOTTOM,
- new java.awt.Font("Dialog",
- java.awt.Font.BOLD, 12),
- java.awt.Color.red), panel1.getBorder()));
- panel1.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
- public void propertyChange(
- java.beans.PropertyChangeEvent e) {
- if ("border".equals(e.getPropertyName()))
- throw new RuntimeException();
- }
- });
- panel1.setLayout(null);
- // ---- label3 ----
- label3.setText("Spell Type: ");
- label3.setFont(new Font("Tahoma", Font.PLAIN, 14));
- label3.setForeground(Color.orange);
- panel1.add(label3);
- label3.setBounds(5, 20, label3.getPreferredSize().width, 30);
- // ---- comboBox1 ----
- comboBox1.setBackground(new Color(0, 0, 204));
- comboBox1.setForeground(new Color(0, 0, 204));
- comboBox1.setModel(new DefaultComboBoxModel(new String[] {
- "None", "Teleports", "Alching", "Cursing",
- "Jewelry Enchantment" }));
- comboBox1.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- SpellTypeActionPerformed(e);
- }
- });
- panel1.add(comboBox1);
- comboBox1.setBounds(80, 25, 250, 25);
- // ---- button1 ----
- button1.setText("Start Training");
- button1.setFont(new Font("Tahoma", Font.PLAIN, 20));
- button1.setForeground(new Color(204, 0, 0));
- button1.setBackground(new Color(153, 0, 0));
- button1.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- StartButton(e);
- }
- });
- panel1.add(button1);
- button1.setBounds(5, 230, 330, 40);
- // ---- label7 ----
- label7.setText("Spell: ");
- label7.setVisible(false);
- label7.setForeground(Color.orange);
- label7.setFont(new Font("Tahoma", Font.PLAIN, 16));
- panel1.add(label7);
- label7.setBounds(5, 65, label7.getPreferredSize().width, 25);
- // ---- comboBox3 ----
- comboBox3.setVisible(false);
- panel1.add(comboBox3);
- comboBox3.setBounds(80, 65, 250, 25);
- // ---- label8 ----
- label8.setText("Item To Alch: ");
- label8.setVisible(false);
- label8.setForeground(Color.orange);
- label8.setFont(new Font("Tahoma", Font.PLAIN, 14));
- panel1.add(label8);
- label8.setBounds(5, 110, label8.getPreferredSize().width,
- 25);
- panel1.add(textField2);
- textField2.setBounds(95, 110, 235, 25);
- textField2.setVisible(false);
- { // compute preferred size
- Dimension preferredSize = new Dimension();
- for (int i = 0; i < panel1.getComponentCount(); i++) {
- Rectangle bounds = panel1.getComponent(i)
- .getBounds();
- preferredSize.width = Math.max(bounds.x
- + bounds.width, preferredSize.width);
- preferredSize.height = Math.max(bounds.y
- + bounds.height, preferredSize.height);
- }
- Insets insets = panel1.getInsets();
- preferredSize.width += insets.right;
- preferredSize.height += insets.bottom;
- panel1.setMinimumSize(preferredSize);
- panel1.setPreferredSize(preferredSize);
- }
- }
- tabbedPane1.addTab("Main Tab", panel1);
- // ======== panel3 ========
- {
- panel3.setBackground(Color.black);
- panel3.setLayout(null);
- // ---- label4 ----
- label4.setText("Paint Color: ");
- label4.setForeground(new Color(255, 153, 0));
- label4.setFont(new Font("Tahoma", Font.PLAIN, 16));
- panel3.add(label4);
- label4.setBounds(new Rectangle(new Point(10, 15), label4
- .getPreferredSize()));
- // ---- comboBox2 ----
- comboBox2.setModel(new DefaultComboBoxModel(new String[] {
- "Black", "Red", "Blue", "Brown", "Purple" }));
- panel3.add(comboBox2);
- comboBox2.setBounds(100, 15, 230, 20);
- // ---- label5 ----
- label5.setText("Mouse Speed: ");
- label5.setForeground(new Color(255, 204, 0));
- label5.setFont(new Font("Tahoma", Font.PLAIN, 14));
- panel3.add(label5);
- label5.setBounds(new Rectangle(new Point(10, 55), label5
- .getPreferredSize()));
- // ---- slider1 ----
- slider1.setBackground(Color.black);
- slider1.setPaintLabels(true);
- slider1.setPaintTicks(true);
- slider1.setSnapToTicks(true);
- slider1.setForeground(Color.white);
- slider1.setMajorTickSpacing(1);
- slider1.setMinorTickSpacing(1);
- slider1.setMaximum(10);
- panel3.add(slider1);
- slider1.setBounds(5, 80, 330, 40);
- // ---- checkBox1 ----
- checkBox1.setText("Enable Remote Control");
- checkBox1.setEnabled(false);
- checkBox1.setBackground(Color.black);
- checkBox1.setForeground(Color.white);
- checkBox1.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- RemoteControlActionPerformed(e);
- }
- });
- panel3.add(checkBox1);
- checkBox1.setBounds(new Rectangle(new Point(5, 140),
- checkBox1.getPreferredSize()));
- // ======== scrollPane2 ========
- {
- // ---- editorPane2 ----
- editorPane2
- .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");
- editorPane2.setForeground(Color.white);
- editorPane2.setBackground(Color.darkGray);
- scrollPane2.setViewportView(editorPane2);
- }
- panel3.add(scrollPane2);
- scrollPane2.setBounds(5, 165, 330, 55);
- // ---- textField1 ----
- textField1.setEnabled(false);
- panel3.add(textField1);
- textField1.setBounds(85, 240, 250,
- textField1.getPreferredSize().height);
- // ---- label6 ----
- label6.setText("Key Word:");
- label6.setForeground(Color.white);
- label6.setFont(new Font("Tahoma", Font.PLAIN, 16));
- panel3.add(label6);
- label6.setBounds(new Rectangle(new Point(5, 240), label6
- .getPreferredSize()));
- { // compute preferred size
- Dimension preferredSize = new Dimension();
- for (int i = 0; i < panel3.getComponentCount(); i++) {
- Rectangle bounds = panel3.getComponent(i)
- .getBounds();
- preferredSize.width = Math.max(bounds.x
- + bounds.width, preferredSize.width);
- preferredSize.height = Math.max(bounds.y
- + bounds.height, preferredSize.height);
- }
- Insets insets = panel3.getInsets();
- preferredSize.width += insets.right;
- preferredSize.height += insets.bottom;
- panel3.setMinimumSize(preferredSize);
- panel3.setPreferredSize(preferredSize);
- }
- }
- tabbedPane1.addTab("Extra Options", panel3);
- // ======== panel4 ========
- {
- panel4.setBackground(Color.black);
- panel4.setLayout(null);
- // ---- checkBox2 ----
- checkBox2.setText("Check Magic Exp");
- checkBox2.setBackground(Color.black);
- checkBox2.setForeground(new Color(255, 153, 0));
- checkBox2.setFont(new Font("Tahoma", Font.PLAIN, 12));
- panel4.add(checkBox2);
- checkBox2.setBounds(new Rectangle(new Point(10, 15),
- checkBox2.getPreferredSize()));
- // ---- checkBox3 ----
- checkBox3.setText("Check friends list");
- checkBox3.setBackground(Color.black);
- checkBox3.setForeground(new Color(255, 153, 0));
- checkBox3.setFont(new Font("Tahoma", Font.PLAIN, 12));
- panel4.add(checkBox3);
- checkBox3.setBounds(10, 45, 125, 23);
- // ---- checkBox4 ----
- checkBox4.setText("Random Mouse Movements");
- checkBox4.setBackground(Color.black);
- checkBox4.setForeground(new Color(255, 153, 0));
- checkBox4.setFont(new Font("Tahoma", Font.PLAIN, 12));
- panel4.add(checkBox4);
- checkBox4.setBounds(10, 75, 180, 23);
- // ---- checkBox5 ----
- checkBox5.setText("Random Camera Movements");
- checkBox5.setBackground(Color.black);
- checkBox5.setForeground(new Color(255, 153, 0));
- checkBox5.setFont(new Font("Tahoma", Font.PLAIN, 12));
- panel4.add(checkBox5);
- checkBox5.setBounds(10, 105, 180, 23);
- // ---- textField3 ----
- textField3.setBackground(Color.darkGray);
- textField3.setForeground(Color.white);
- textField3
- .setText("Script made by: ToxicGod. All Credits go to ToxicGod");
- textField3.setHorizontalAlignment(SwingConstants.CENTER);
- panel4.add(textField3);
- textField3.setBounds(5, 200, 330, 70);
- // ---- label10 ----
- label10.setText("Credits: ");
- label10.setForeground(Color.white);
- panel4.add(label10);
- label10.setBounds(new Rectangle(new Point(145, 180),
- label10.getPreferredSize()));
- { // compute preferred size
- Dimension preferredSize = new Dimension();
- for (int i = 0; i < panel4.getComponentCount(); i++) {
- Rectangle bounds = panel4.getComponent(i)
- .getBounds();
- preferredSize.width = Math.max(bounds.x
- + bounds.width, preferredSize.width);
- preferredSize.height = Math.max(bounds.y
- + bounds.height, preferredSize.height);
- }
- Insets insets = panel4.getInsets();
- preferredSize.width += insets.right;
- preferredSize.height += insets.bottom;
- panel4.setMinimumSize(preferredSize);
- panel4.setPreferredSize(preferredSize);
- }
- }
- tabbedPane1.addTab("AntiBan Options", panel4);
- }
- contentPane.add(tabbedPane1);
- tabbedPane1.setBounds(10, 45, 347, 305);
- // ======== scrollPane1 ========
- {
- // ---- editorPane1 ----
- editorPane1.setBackground(Color.black);
- scrollPane1.setViewportView(editorPane1);
- }
- contentPane.add(scrollPane1);
- scrollPane1.setBounds(0, 0, 370, 365);
- { // compute preferred size
- Dimension preferredSize = new Dimension();
- for (int i = 0; i < contentPane.getComponentCount(); i++) {
- Rectangle bounds = contentPane.getComponent(i).getBounds();
- preferredSize.width = Math.max(bounds.x + bounds.width,
- preferredSize.width);
- preferredSize.height = Math.max(bounds.y + bounds.height,
- preferredSize.height);
- }
- Insets insets = contentPane.getInsets();
- preferredSize.width += insets.right;
- preferredSize.height += insets.bottom;
- contentPane.setMinimumSize(preferredSize);
- contentPane.setPreferredSize(preferredSize);
- }
- pack();
- setLocationRelativeTo(getOwner());
- }
- private JLabel label1;
- private JLabel label2;
- private JTabbedPane tabbedPane1;
- private JPanel panel1;
- private JLabel label3;
- private JComboBox comboBox1;
- private JButton button1;
- private JButton button2;
- private JLabel label7;
- private JComboBox comboBox3;
- private JLabel label8;
- private JTextField textField2;
- private JPanel panel3;
- private JLabel label4;
- private JComboBox comboBox2;
- private JLabel label5;
- private JSlider slider1;
- private JCheckBox checkBox1;
- private JScrollPane scrollPane2;
- private JEditorPane editorPane2;
- private JTextField textField1;
- private JLabel label6;
- private JPanel panel4;
- private JCheckBox checkBox2;
- private JCheckBox checkBox3;
- private JCheckBox checkBox4;
- private JCheckBox checkBox5;
- private JTextField textField3;
- private JLabel label10;
- private JScrollPane scrollPane1;
- private JEditorPane editorPane1;
- }
- @Override
- public void messageReceived(MessageEvent e) {
- final String msg = e.getMessage();
- if (msg.contains("do not have enough")) {
- stopScript(true);
- }
- if (msg.contains("advanced")) {
- LevelsGained++;
- }
- if (msg.contains("has already been")) {
- ActionCheck = 0;
- }
- }
- // START: Code generated using Enfilade's Easel
- private final Color color1 = new Color(0, 0, 0);
- private final Color color2 = new Color(255, 255, 255);
- private final Color color3 = new Color(102, 0, 102);
- private final Color color4 = new Color(112, 63, 0);
- private final BasicStroke stroke1 = new BasicStroke(1);
- private final Font font1 = new Font("Arial", 0, 20);
- private final Font font2 = new Font("Arial", 0, 12);
- private final Font font3 = new Font("Arial", 0, 10);
- public void onRepaint(Graphics g1) {
- Graphics2D g = (Graphics2D) g1;
- long millis = System.currentTimeMillis() - StartTime;
- String time = Timer.format(millis);
- ExpGained = skills.getCurrentExp(Skills.MAGIC) - StartExp;
- ExpHour = (int) ((ExpGained) * 3600000D / (System.currentTimeMillis() - StartTime));
- g.setColor(PaintColors());
- g.fillRect(382, 208, 134, 128);
- g.setColor(color2);
- g.setStroke(stroke1);
- g.drawRect(382, 208, 134, 128);
- g.setColor(PaintColors());
- g.fillRect(382, 170, 135, 32);
- g.setColor(color2);
- g.drawRect(382, 170, 135, 32);
- g.setFont(font1);
- g.drawString("ToxicMagic", 405, 188);
- g.setFont(font2);
- g.drawString("By: ToxicGod", 417, 199);
- g.drawString("Status: " + Status, 385, 224);
- g.drawString("Run Time: " + time, 385, 237);
- g.drawString("Exp Gained: " + ExpGained, 385, 257);
- g.drawString("Exp/Hr: " + ExpHour, 385, 270);
- g.drawString("Exp TNL: " + skills.getExpToNextLevel(Skills.MAGIC), 385,
- 283);
- g.setFont(font3);
- g.drawString("Spell Type: " + SpellType, 385, 333);
- g.setFont(font2);
- g.drawString("Level Gained: " + LevelsGained, 385, 314);
- g.drawString("Level: " + skills.getCurrentLevel(Skills.MAGIC), 385, 301);
- }
- // END: Code generated using Enfilade's Easel
- @Override
- public void onFinish() {
- env.takeScreenshot(true);
- }
- public class enchanterGUI extends JFrame {
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- public enchanterGUI() {
- initComponents();
- }
- private void Start(ActionEvent e) {
- final String ItemType = comboBox1.getSelectedItem().toString();
- final String EnchantType = comboBox2.getSelectedItem().toString();
- if (ItemType.equals("Enchant Rings")
- && EnchantType.equals("Sapphire")) {
- RawItemId = 1637;
- Enchant_spell = Magic.SPELL_LVL1_ENCHANT;
- } else if (ItemType.equals("Enchant Rings")
- && EnchantType.equals("Emerald")) {
- RawItemId = 1639;
- Enchant_spell = Magic.SPELL_LVL2_ENCHANT;
- } else if (ItemType.equals("Enchant Rings")
- && EnchantType.equals("Ruby")) {
- RawItemId = 1641;
- Enchant_spell = Magic.SPELL_LVL3_ENCHANT;
- } else if (ItemType.equals("Enchant Rings")
- && EnchantType.equals("Diamond")) {
- RawItemId = 1643;
- Enchant_spell = Magic.SPELL_LVL4_ENCHANT;
- } else if (ItemType.equals("Enchant Rings")
- && EnchantType.equals("Dragonstone")) {
- RawItemId = 1645;
- Enchant_spell = Magic.SPELL_LVL5_ENCHANT;
- } else if (ItemType.equals("Enchant Rings")
- && EnchantType.equals("Onyx")) {
- RawItemId = 6575;
- Enchant_spell = Magic.SPELL_LVL6_ENCHANT;
- } else if (ItemType.equals("Enchant Necklace")
- && EnchantType.equals("Sapphire")) {
- RawItemId = 1656;
- Enchant_spell = Magic.SPELL_LVL1_ENCHANT;
- } else if (ItemType.equals("Enchant Necklace")
- && EnchantType.equals("Emerald")) {
- RawItemId = 1658;
- Enchant_spell = Magic.SPELL_LVL2_ENCHANT;
- } else if (ItemType.equals("Enchant Necklace")
- && EnchantType.equals("Ruby")) {
- RawItemId = 1660;
- Enchant_spell = Magic.SPELL_LVL3_ENCHANT;
- } else if (ItemType.equals("Enchant Necklace")
- && EnchantType.equals("Diamond")) {
- RawItemId = 1662;
- Enchant_spell = Magic.SPELL_LVL4_ENCHANT;
- } else if (ItemType.equals("Enchant Necklace")
- && EnchantType.equals("Dragonstone")) {
- RawItemId = 1664;
- Enchant_spell = Magic.SPELL_LVL5_ENCHANT;
- } else if (ItemType.equals("Enchant Necklace")
- && EnchantType.equals("Onyx")) {
- RawItemId = 6577;
- Enchant_spell = Magic.SPELL_LVL6_ENCHANT;
- } else if (ItemType.equals("Enchant Amulets")
- && EnchantType.equals("Sapphire")) {
- RawItemId = 1694;
- Enchant_spell = Magic.SPELL_LVL1_ENCHANT;
- } else if (ItemType.equals("Enchant Amulets")
- && EnchantType.equals("Emerald")) {
- RawItemId = 1696;
- Enchant_spell = Magic.SPELL_LVL2_ENCHANT;
- } else if (ItemType.equals("Enchant Amulets")
- && EnchantType.equals("Ruby")) {
- RawItemId = 1698;
- Enchant_spell = Magic.SPELL_LVL3_ENCHANT;
- } else if (ItemType.equals("Enchant Amulets")
- && EnchantType.equals("Diamond")) {
- RawItemId = 1700;
- Enchant_spell = Magic.SPELL_LVL4_ENCHANT;
- } else if (ItemType.equals("Enchant Amulets")
- && EnchantType.equals("Dragonstone")) {
- RawItemId = 1702;
- Enchant_spell = Magic.SPELL_LVL5_ENCHANT;
- } else if (ItemType.equals("Enchant Amulets")
- && EnchantType.equals("Onyx")) {
- RawItemId = 6581;
- Enchant_spell = Magic.SPELL_LVL6_ENCHANT;
- } else if (ItemType.equals("Enchant Bracelets")
- && EnchantType.equals("Sapphire")) {
- RawItemId = 11072;
- Enchant_spell = Magic.SPELL_LVL1_ENCHANT;
- } else if (ItemType.equals("Enchant Bracelets")
- && EnchantType.equals("Emerald")) {
- RawItemId = 11076;
- Enchant_spell = Magic.SPELL_LVL2_ENCHANT;
- } else if (ItemType.equals("Enchant Bracelets")
- && EnchantType.equals("Ruby")) {
- RawItemId = 11085;
- Enchant_spell = Magic.SPELL_LVL3_ENCHANT;
- } else if (ItemType.equals("Enchant Bracelets")
- && EnchantType.equals("Diamond")) {
- RawItemId = 11092;
- Enchant_spell = Magic.SPELL_LVL4_ENCHANT;
- } else if (ItemType.equals("Enchant Bracelets")
- && EnchantType.equals("Dragonstone")) {
- RawItemId = 11115;
- Enchant_spell = Magic.SPELL_LVL5_ENCHANT;
- } else if (ItemType.equals("Enchant Bracelets")
- && EnchantType.equals("Onyx")) {
- RawItemId = 11130;
- Enchant_spell = Magic.SPELL_LVL6_ENCHANT;
- }
- n.dispose();
- guiWait = false;
- }
- private void initComponents() {
- label1 = new JLabel();
- label2 = new JLabel();
- comboBox1 = new JComboBox();
- label3 = new JLabel();
- comboBox2 = new JComboBox();
- button1 = new JButton();
- scrollPane1 = new JScrollPane();
- editorPane1 = new JEditorPane();
- // ======== this ========
- setTitle("ToxicMagic");
- setResizable(false);
- Container contentPane = getContentPane();
- contentPane.setLayout(null);
- // ---- label1 ----
- label1.setText("Jewelry Enchanter");
- label1.setBackground(new Color(153, 0, 0));
- label1.setForeground(new Color(153, 0, 0));
- label1.setFont(new Font("Dialog", Font.BOLD, 24));
- contentPane.add(label1);
- label1.setBounds(new Rectangle(new Point(90, 10), label1
- .getPreferredSize()));
- // ---- label2 ----
- label2.setText("Enchant Type:");
- label2.setForeground(new Color(153, 0, 0));
- contentPane.add(label2);
- label2.setBounds(10, 60, 105, 25);
- // ---- comboBox1 ----
- comboBox1.setBackground(new Color(153, 0, 0));
- comboBox1.setForeground(Color.black);
- comboBox1.setModel(new DefaultComboBoxModel(new String[] {
- "Enchant Rings", "Enchant Necklace", "Enchant Amulets",
- "Enchant Bracelets" }));
- contentPane.add(comboBox1);
- comboBox1.setBounds(115, 60, 265,
- comboBox1.getPreferredSize().height);
- // ---- label3 ----
- label3.setText("Spell: ");
- label3.setForeground(new Color(153, 0, 0));
- contentPane.add(label3);
- label3.setBounds(10, 100, 105, 25);
- // ---- comboBox2 ----
- comboBox2.setBackground(new Color(153, 0, 0));
- comboBox2.setForeground(Color.black);
- contentPane.add(comboBox2);
- comboBox2.setBounds(115, 100, 265,
- comboBox2.getPreferredSize().height);
- comboBox2.setModel(new DefaultComboBoxModel(new String[] {
- "Sapphire", "Emerald", "Ruby", "Diamond", "Dragonstone",
- "Onyx" }));
- // ---- button1 ----
- button1.setText("Start Script");
- button1.setBackground(new Color(153, 0, 0));
- button1.setForeground(Color.black);
- button1.setFont(new Font("Dialog", Font.BOLD, 14));
- button1.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- Start(e);
- }
- });
- contentPane.add(button1);
- button1.setBounds(10, 140, 371, button1.getPreferredSize().height);
- // ======== scrollPane1 ========
- {
- // ---- editorPane1 ----
- editorPane1.setBackground(Color.black);
- editorPane1.setEditable(false);
- editorPane1.setEnabled(false);
- scrollPane1.setViewportView(editorPane1);
- }
- contentPane.add(scrollPane1);
- scrollPane1.setBounds(0, 0, 395, 175);
- { // compute preferred size
- Dimension preferredSize = new Dimension();
- for (int i = 0; i < contentPane.getComponentCount(); i++) {
- Rectangle bounds = contentPane.getComponent(i).getBounds();
- preferredSize.width = Math.max(bounds.x + bounds.width,
- preferredSize.width);
- preferredSize.height = Math.max(bounds.y + bounds.height,
- preferredSize.height);
- }
- Insets insets = contentPane.getInsets();
- preferredSize.width += insets.right;
- preferredSize.height += insets.bottom;
- contentPane.setMinimumSize(preferredSize);
- contentPane.setPreferredSize(preferredSize);
- }
- pack();
- setLocationRelativeTo(getOwner());
- }
- private JLabel label1;
- private JLabel label2;
- private JComboBox comboBox1;
- private JLabel label3;
- private JComboBox comboBox2;
- private JButton button1;
- private JScrollPane scrollPane1;
- private JEditorPane editorPane1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement