Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*import java.awt.*;*/
- import org.rsbot.script.Script;
- import org.rsbot.script.ScriptManifest;
- import org.rsbot.script.methods.Game;
- import org.rsbot.script.methods.Magic;
- @ScriptManifest
- (authors = { "asciicat" },
- name = "zzDiamondBoltEnchanter",
- version = 0.63, keywords = { "zzDiamondBoltEnchanter" },
- description = "Enchants Diamond Bolts, improved antiban, paint coming soon")
- public class zzDiamondBoltEnchanter extends Script
- {
- int dbolts=9340;
- int cosmicrune=564;
- int lawrune=563;
- int spell=Magic.SPELL_ENCHANT_CROSSBOW_BOLT;
- /*
- public int maagic = 6;
- public int expGained = 0;
- public int startExp = skills.getCurrentExp(maagic);
- public long startTime = 0;
- private final Font font1 = new Font("Arial", 0, 9);
- private final Font font2 = new Font("Arial", 0, 16);
- private final Font font3 = new Font("Arial", 0, 9);
- private final Color color1 = new Color(255, 255, 0, 141);
- private final Color color2 = new Color(51, 0, 51);
- private final Color color3 = new Color(0, 0, 0);
- private final BasicStroke stroke1 = new BasicStroke(1);
- public long millis = 0;
- public long hours = 0;
- public long minutes = 0;
- public long seconds = 0;
- public long last = 0;
- public void onRepaint(Graphics g1)
- {
- Graphics2D g = (Graphics2D)g1;
- expGained = skills.getCurrentExp(maagic) - startExp;
- millis = System.currentTimeMillis() - startTime;
- hours = millis / (1000 * 60 * 60);
- millis -= hours * (1000 * 60 * 60);
- minutes = millis / (1000 * 60);
- millis -= minutes * (1000 * 60);
- seconds = millis / 1000;
- g.setColor(color1);
- g.fillRect(291, 287, 225, 50);
- g.setColor(color2);
- g.setStroke(stroke1);
- g.drawRect(291, 287, 225, 50);
- g.setFont(font1);
- g.setFont(font3);
- g.setColor(color3);
- g.drawString("Time Running: " + hours +":"+ minutes + ":" + seconds, 294, 314);
- g.drawString("Experience Gained: " + expGained, 294, 324);
- g.setFont(font2);
- g.drawString("zzDiamondBoltEnchanter 0.57", 294, 302);
- }*/
- public boolean onStart()
- {/*
- startExp = skills.getCurrentExp(maagic);
- startTime = System.currentTimeMillis();*/
- log("started, initialized GUI");
- return true;
- }
- public void onFinish()
- {
- log("finshed?");
- stopScript();
- }
- @Override
- public int loop()
- {
- if(getMyPlayer().getAnimation()==-1)
- {
- if(!inventory.contains(dbolts) || !inventory.contains(lawrune) || !inventory.contains(cosmicrune))
- {
- log("ran out of bolts/runes");
- stopScript();
- }
- mouse.setSpeed(random(6,7));
- magic.castSpell(spell);
- sleep(123,345);
- mouse.move(random(200,300),random(200,300));
- sleep(1224,1380);
- int enchrng = random(1,28);
- int rngprq = random(1,3);
- if(enchrng==5)
- {
- mouse.click(220,220,8,8,false);
- sleep(222,333);
- if(rngprq==1)
- {
- mouse.move(200,180,10,40);
- }
- else
- {
- mouse.move(280,280,10,10);
- }
- }
- else if(enchrng==25)
- {
- mouse.click(280,280,10,10,false);
- sleep(280,380);
- if(rngprq==1)
- {
- mouse.move(200,180,10,40);
- }
- else
- {
- mouse.move(280,280,10,10);
- }
- }
- else
- {
- mouse.click(250,250,15,15,false);
- }
- menu.doAction("Enchant 10");
- if(menu.isOpen()==true) //failsafe, if misclicked
- {
- menu.doAction("Enchant 10");
- }
- antiban();
- game.openTab(Game.TAB_MAGIC);
- mouse.move(600,250,100,50);
- }
- else
- {
- sleep(200);
- }
- return 0;
- }
- public void antiban()
- {
- log("initiated antiban");
- int r=random(1,44);
- if(r==1)
- {
- sleep(1000,2000);
- mouse.moveOffScreen();
- sleep(280,1337);
- mouse.move(380,260,300,200);
- sleep(333,942);
- mouse.moveSlightly();
- sleep(77,177);
- camera.setNorth();
- }
- else if(r==2)
- {
- mouse.moveSlightly();
- sleep(480,555);
- mouse.moveSlightly();
- sleep(1111,1333);
- camera.setNorth();
- }
- else if(r==3)
- {
- sleep(333,2667);
- camera.setNorth();
- }
- else if(r==4)
- {
- mouse.move(730,190,30,56);
- sleep(444,666);
- mouse.moveSlightly();
- }
- else if(r==5)
- {
- camera.setNorth();
- sleep(11,77);
- mouse.move(380,260,300,200);
- mouse.moveOffScreen();
- sleep(1111,2323);
- }
- else if(r==6)
- {
- mouse.moveSlightly();
- sleep(77,177);
- camera.setAngle(random(10,25));
- sleep(1111,2222);
- camera.setNorth();
- }
- else if(r==7)
- {
- sleep(666,1667);
- camera.setNorth();
- sleep(1080,1234);
- mouse.moveOffScreen();
- }
- else if(r==8)
- {
- sleep(666,1667);
- mouse.setSpeed(random(2,6));
- mouse.move(380,260,300,200);
- sleep(111,177);
- camera.setAngle(random(0,360));
- sleep(166,199);
- camera.setAngle(random(0,4));
- camera.setNorth();
- mouse.move(380,260,300,200);
- }
- else if(r==9)
- {
- sleep(666,1667);
- mouse.move(380,260,300,200);
- sleep(111,177);
- mouse.move(380,260,300,200);
- camera.setNorth();
- }
- else if(r>=11)
- {
- sleep(666,1667);
- mouse.setSpeed(random(7,8));
- mouse.move(380,260,300,200);
- mouse.moveSlightly();
- sleep(88,124);
- mouse.moveSlightly();
- }
- else
- {
- sleep(4444,5555);
- mouse.moveSlightly();
- sleep(6666,7777);
- }
- log("done with semi-good antiban");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement