Advertisement
asciicat

zzdbe 0.63

May 26th, 2011
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5.39 KB | None | 0 0
  1. /*import java.awt.*;*/
  2. import org.rsbot.script.Script;
  3. import org.rsbot.script.ScriptManifest;
  4. import org.rsbot.script.methods.Game;
  5. import org.rsbot.script.methods.Magic;
  6.  
  7. @ScriptManifest
  8. (authors = { "asciicat" },
  9.         name = "zzDiamondBoltEnchanter",
  10.         version = 0.63, keywords = { "zzDiamondBoltEnchanter" },
  11.         description = "Enchants Diamond Bolts, improved antiban, paint coming soon")
  12.  
  13. public class zzDiamondBoltEnchanter extends Script
  14. {  
  15.     int dbolts=9340;
  16.     int cosmicrune=564;
  17.     int lawrune=563;
  18.  
  19.     int spell=Magic.SPELL_ENCHANT_CROSSBOW_BOLT;
  20.     /*
  21.     public int maagic = 6;
  22.     public int expGained = 0;
  23.     public int startExp = skills.getCurrentExp(maagic);
  24.    
  25.     public long startTime = 0;
  26.    
  27.     private final Font font1 = new Font("Arial", 0, 9);
  28.     private final Font font2 = new Font("Arial", 0, 16);
  29.     private final Font font3 = new Font("Arial", 0, 9);
  30.  
  31.     private final Color color1 = new Color(255, 255, 0, 141);
  32.     private final Color color2 = new Color(51, 0, 51);
  33.     private final Color color3 = new Color(0, 0, 0);
  34.    
  35.     private final BasicStroke stroke1 = new BasicStroke(1);
  36.  
  37.     public long millis = 0;
  38.     public long hours = 0;
  39.     public long minutes = 0;
  40.     public long seconds = 0;
  41.     public long last = 0;
  42.    
  43.     public void onRepaint(Graphics g1)
  44.     {
  45.         Graphics2D g = (Graphics2D)g1;
  46.         expGained = skills.getCurrentExp(maagic) - startExp;
  47.         millis = System.currentTimeMillis() - startTime;
  48.         hours = millis / (1000 * 60 * 60);
  49.         millis -= hours * (1000 * 60 * 60);
  50.         minutes = millis / (1000 * 60);
  51.         millis -= minutes * (1000 * 60);
  52.         seconds = millis / 1000;
  53.         g.setColor(color1);
  54.         g.fillRect(291, 287, 225, 50);
  55.         g.setColor(color2);
  56.         g.setStroke(stroke1);
  57.         g.drawRect(291, 287, 225, 50);
  58.         g.setFont(font1);
  59.         g.setFont(font3);
  60.         g.setColor(color3);
  61.         g.drawString("Time Running: " + hours +":"+ minutes + ":" + seconds, 294, 314);
  62.         g.drawString("Experience Gained: " + expGained, 294, 324);
  63.         g.setFont(font2);
  64.        
  65.         g.drawString("zzDiamondBoltEnchanter 0.57", 294, 302);
  66.     }*/
  67.  
  68.     public boolean onStart()
  69.     {/*
  70.         startExp = skills.getCurrentExp(maagic);
  71.         startTime = System.currentTimeMillis();*/
  72.         log("started, initialized GUI");
  73.         return true;
  74.     }
  75.  
  76.     public void onFinish()
  77.     {
  78.         log("finshed?");
  79.         stopScript();
  80.     }
  81.  
  82.     @Override
  83.     public int loop()
  84.     {
  85.         if(getMyPlayer().getAnimation()==-1)
  86.         {
  87.             if(!inventory.contains(dbolts) || !inventory.contains(lawrune) || !inventory.contains(cosmicrune))
  88.             {
  89.                 log("ran out of bolts/runes");
  90.                 stopScript();
  91.             }
  92.             mouse.setSpeed(random(6,7));
  93.             magic.castSpell(spell);
  94.             sleep(123,345);
  95.             mouse.move(random(200,300),random(200,300));
  96.             sleep(1224,1380);
  97.             int enchrng = random(1,28);
  98.             int rngprq = random(1,3);
  99.             if(enchrng==5)
  100.             {
  101.                 mouse.click(220,220,8,8,false);
  102.                 sleep(222,333);
  103.                 if(rngprq==1)
  104.                 {
  105.                     mouse.move(200,180,10,40);
  106.                 }
  107.                 else
  108.                 {
  109.                     mouse.move(280,280,10,10);
  110.                 }
  111.             }
  112.             else if(enchrng==25)
  113.             {
  114.                 mouse.click(280,280,10,10,false);
  115.                 sleep(280,380);
  116.                 if(rngprq==1)
  117.                 {
  118.                     mouse.move(200,180,10,40);
  119.                 }
  120.                 else
  121.                 {
  122.                     mouse.move(280,280,10,10);
  123.                 }
  124.             }
  125.             else
  126.             {
  127.                 mouse.click(250,250,15,15,false);
  128.             }
  129.             menu.doAction("Enchant 10");
  130.             if(menu.isOpen()==true) //failsafe, if misclicked
  131.             {
  132.                 menu.doAction("Enchant 10");
  133.             }
  134.             antiban();
  135.             game.openTab(Game.TAB_MAGIC);
  136.             mouse.move(600,250,100,50);
  137.             }
  138.             else
  139.             {
  140.                 sleep(200);
  141.             }
  142.         return 0;
  143.         }
  144.  
  145.    
  146.     public void antiban()
  147.     {
  148.         log("initiated antiban");
  149.         int r=random(1,44);
  150.         if(r==1)
  151.         {
  152.             sleep(1000,2000);
  153.             mouse.moveOffScreen();
  154.             sleep(280,1337);
  155.             mouse.move(380,260,300,200);
  156.             sleep(333,942);
  157.             mouse.moveSlightly();
  158.             sleep(77,177);
  159.             camera.setNorth();
  160.         }
  161.         else if(r==2)
  162.         {
  163.             mouse.moveSlightly();
  164.             sleep(480,555);
  165.             mouse.moveSlightly();
  166.             sleep(1111,1333);
  167.             camera.setNorth();
  168.         }
  169.         else if(r==3)
  170.         {
  171.             sleep(333,2667);
  172.             camera.setNorth();
  173.         }
  174.         else if(r==4)
  175.         {
  176.             mouse.move(730,190,30,56);
  177.             sleep(444,666);
  178.             mouse.moveSlightly();
  179.         }
  180.         else if(r==5)
  181.         {
  182.             camera.setNorth();
  183.             sleep(11,77);
  184.             mouse.move(380,260,300,200);
  185.             mouse.moveOffScreen();
  186.             sleep(1111,2323);
  187.         }
  188.         else if(r==6)
  189.         {
  190.             mouse.moveSlightly();
  191.             sleep(77,177);
  192.             camera.setAngle(random(10,25));
  193.             sleep(1111,2222);
  194.             camera.setNorth();
  195.         }
  196.         else if(r==7)
  197.         {
  198.             sleep(666,1667);
  199.             camera.setNorth();
  200.             sleep(1080,1234);
  201.             mouse.moveOffScreen();
  202.         }
  203.         else if(r==8)
  204.         {
  205.             sleep(666,1667);
  206.             mouse.setSpeed(random(2,6));
  207.             mouse.move(380,260,300,200);
  208.             sleep(111,177);
  209.             camera.setAngle(random(0,360));
  210.             sleep(166,199);
  211.             camera.setAngle(random(0,4));
  212.             camera.setNorth();
  213.             mouse.move(380,260,300,200);
  214.         }
  215.         else if(r==9)
  216.         {
  217.             sleep(666,1667);
  218.             mouse.move(380,260,300,200);
  219.             sleep(111,177);
  220.             mouse.move(380,260,300,200);
  221.             camera.setNorth();
  222.         }
  223.         else if(r>=11)
  224.         {
  225.             sleep(666,1667);
  226.             mouse.setSpeed(random(7,8));
  227.             mouse.move(380,260,300,200);
  228.             mouse.moveSlightly();
  229.             sleep(88,124);
  230.             mouse.moveSlightly();
  231.         }
  232.         else
  233.         {
  234.             sleep(4444,5555);
  235.             mouse.moveSlightly();
  236.             sleep(6666,7777);
  237.         }
  238.         log("done with semi-good antiban");
  239.     }
  240. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement