Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.Color;
- import java.awt.Graphics;
- import java.awt.Graphics2D;
- import java.awt.Point;
- import org.veloxbot.api.ActiveScript;
- import org.veloxbot.api.Manifest;
- import org.veloxbot.api.Validatable;
- import org.veloxbot.api.methods.Game;
- import org.veloxbot.api.methods.Inventory;
- import org.veloxbot.api.methods.Mouse;
- import org.veloxbot.api.utils.Random;
- import org.veloxbot.api.wrappers.DTM;
- @Manifest(authors = { "Nissan Nut", "Velox" },
- name = "Nissan's Superheater",
- version = 0.1,
- description= "Basic Superheater.")
- /**
- * Simple Superheater Script
- * 11/10/2012 Dev Started
- * @author Tanner (Nissan Nut)
- */
- public class Superheater extends ActiveScript implements Validatable {
- private SuperheaterUI UI = new SuperheaterUI();
- private boolean antiban = true;
- private int o1 = 0, o2 = 0, brs = 0, angle = 90, mouseSpeed = 5;
- private DTM ore, ore2, bar;
- private final DTM NATURE_RUNE = DTM.fromString("17_123_20_5/103_99_98_-11_-5_5/74_71_71_-2_10_5/147_140_140_9_-3_5"),
- COAL = DTM.fromString("38_38_29_5/92_74_52_-12_2_5/92_74_52_-3_8_5/38_38_29_8_5_5/105_84_59_10_-5_5"),
- IRON_ORE = DTM.fromString("54_32_24_5/86_69_48_-13_3_5/94_76_53_-3_10_5/54_32_24_7_6_5/103_82_57_10_-4_5"),
- MITHRIL_ORE = DTM.fromString("54_55_81_5/100_81_57_-11_3_5/90_72_51_-5_10_5/46_46_69_7_5_5/109_87_61_11_-6_5"),
- ADAMANTITE_ORE = DTM.fromString("64_74_64_5/98_79_56_-11_2_5/92_74_52_-5_11_5/62_71_62_8_6_5/109_87_61_11_-5_5"),
- RUNITE_ORE = DTM.fromString("71_85_92_5/87_70_49_-15_3_5/98_79_56_-5_10_5/55_66_71_7_5_5/105_84_59_9_-6_5"),
- GOLD_ORE = DTM.fromString("190_151_28_5/98_79_56_-11_2_5/87_70_49_-7_10_5/172_137_25_7_6_5/100_81_57_11_-4_5"),
- SILVER_ORE = DTM.fromString("126_127_132_5/95_76_52_-11_4_5/91_72_50_-3_11_5/103_82_57_12_-4_1"),
- COPPER_ORE = DTM.fromString("189_108_57_5/97_77_54_-10_1_5/91_72_50_-4_7_5/105_84_58_10_-6_5"),
- TIN_ORE = DTM.fromString("105_101_101_5/82_65_45_-14_4_5/97_77_54_-3_10_5/99_79_55_12_-4_5"),
- BRONZE_BAR = DTM.fromString("79_59_35_5/59_45_26_-8_-2_5/33_25_14_-13_5_5/81_61_36_-1_6_5"),
- IRON_BAR = DTM.fromString("83_80_80_5/39_38_38_-14_5_5/26_25_25_-14_11_5/86_82_82_-1_7_5"),
- STEEL_BAR = DTM.fromString("128_123_123_5/99_95_94_-8_1_5/39_38_38_-15_11_5/132_127_126_-1_8_5"),
- MITHRIL_BAR = DTM.fromString("66_66_99_5/49_50_74_-8_-3_5/28_29_43_-10_5_5/67_68_101_0_4_5"),
- ADAMANT_BAR = DTM.fromString("72_83_72_5/53_62_54_-7_1_5/28_33_29_-13_6_5/72_83_72_-1_7_5"),
- RUNE_BAR = DTM.fromString("81_97_105_5/62_75_81_-7_1_5/37_45_48_-11_7_5/82_99_107_0_6_5"),
- SILVER_BAR = DTM.fromString("165_165_172_5/128_128_134_-9_-1_5/75_75_79_-15_3_5/168_168_176_-1_6_5"),
- GOLD_BAR = DTM.fromString("207_165_29_5/159_126_22_-8_-2_5/90_72_13_-11_4_5/212_169_30_0_6_5");
- @Override
- public boolean onStart(){
- UI.setVisible(true);
- while (UI.isVisible())
- sleep(10);
- switch (UI.list.getSelectedIndex()){
- case 0:
- ore = TIN_ORE;
- ore2 = COPPER_ORE;
- bar = BRONZE_BAR;
- break;
- case 1:
- ore = IRON_ORE;
- bar = IRON_BAR;
- break;
- case 2:
- ore = IRON_ORE;
- ore2 = COAL;
- bar = STEEL_BAR;
- break;
- case 3:
- ore = SILVER_ORE;
- bar = SILVER_BAR;
- break;
- case 4:
- ore = GOLD_ORE;
- bar = GOLD_BAR;
- break;
- case 5:
- ore = MITHRIL_ORE;
- ore2 = COAL;
- bar = MITHRIL_BAR;
- break;
- case 6:
- ore = ADAMANTITE_ORE;
- ore2 = COAL;
- bar = ADAMANT_BAR;
- break;
- case 7:
- ore = RUNITE_ORE;
- ore2 = COAL;
- bar = RUNE_BAR;
- }
- if (UI.boxNorth.isSelected())
- angle = 0;
- else if (UI.boxEast.isSelected())
- angle = 90;
- else if (UI.boxSouth.isSelected())
- angle = 180;
- else if (UI.boxWest.isSelected())
- angle = 270;
- mouseSpeed = UI.slider.getValue();
- return UI.start;
- }
- @Override
- public long loop() {
- if (antiban)
- Mouse.setMultiplier(Random.nextDouble(mouseSpeed - 1, mouseSpeed + 1)*.1);
- if (Game.Tab.INVENTORY.isOpen()){
- brs = Inventory.getCount(bar);
- o1 = Inventory.getCount(ore);
- if (ore2 != null)
- o2 = Inventory.getCount(ore2);
- }
- return 10;
- }
- @Override
- public void onRepaint(Graphics G){
- Graphics2D g = (Graphics2D) G;
- g.setColor(Color.BLACK);
- g.fillRect(0, 0, 765, 50);
- g.setColor(Color.WHITE);
- g.drawString(Integer.toString(brs) + UI.list.getSelectedValue() + " bars", 15, 20);
- g.drawString("Ores: " + + o1 + "/" + o2, 15, 40);
- Point p = getPointNearPlayer(angle, 30);
- g.drawString("X", p.x, p.y);
- }
- /**
- * Credits to Velox
- * @param angle
- * @param distance
- * @return the point
- */
- public static Point getPointNearPlayer(final int angle, final int distance) {
- final double rads = Math.toRadians(angle + 90 - Game.getCompassAngle());
- return new Point((int) (Game.VIEWPORT_CENTER.x - distance * Math.cos(rads)), (int) (Game.VIEWPORT_CENTER.y - distance * Math.sin(rads)));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment