Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.76 KB | None | 0 0
  1. import java.awt.*;
  2.  
  3. public class Shop extends Thread{
  4.    
  5.     public boolean run = false;
  6.     public long startTime = 0;
  7.     public long currentTime = 1;
  8.     public int shopIndex = -1;
  9.    
  10.     public Shop(){
  11.         run = true;
  12.     }
  13.    
  14.     /**
  15.         615 - herquin general shop
  16.         623 - domnik gems at edge
  17.         54 - dzone shop
  18.     */
  19.    
  20.     public boolean fullInv(){
  21.         int[] inv = Class9.aClass9Array210[3214].anIntArray253;
  22.         for(int i = 0; i < inv.length; i++){
  23.             if(inv[i] == 0)
  24.                 return false;
  25.         }
  26.         return true;
  27.     }
  28.    
  29.     public void tradeNPC(int i){
  30.     /* 
  31.         //first option
  32.         Bot.bot.mouseClick(1);
  33.         Bot.bot.aClass30_Sub2_Sub2_1192.method397((byte)6, 155);
  34.         Bot.bot.aClass30_Sub2_Sub2_1192.method431(true, i);
  35.     */
  36.         //second option
  37.         Bot.bot.mouseClick(1);
  38.         Bot.bot.aClass30_Sub2_Sub2_1192.method397((byte)6, 17);
  39.         Bot.bot.aClass30_Sub2_Sub2_1192.method433(0, i);
  40.    
  41.     }
  42.    
  43.     public void bankEverything(){
  44.         int[] inv = Class9.aClass9Array210[3214].anIntArray253;
  45.         for(int i = 0; i < inv.length; i++){
  46.             if(inv[i]-1 != 995 && inv[i] != 0){
  47.                 Bot.bot.mouseClick(1);
  48.                 Bot.bot.bankAllItem(inv[i]-1, i);
  49.                 try{Thread.sleep(700);}catch(InterruptedException e){}
  50.             }
  51.         }
  52.     }
  53.    
  54.     public void buy(){
  55.         int[] shop = Class9.aClass9Array210[3900].anIntArray253;
  56.         Bot.bot.mouseClick(1);
  57.     //  Bot.bot.buy10(shop[shopIndex]-1, shopIndex);
  58.         Bot.bot.buyX(shop[shopIndex]-1, shopIndex, 250);
  59.     }
  60.    
  61.     public void sell(){
  62.         int[] inv = Class9.aClass9Array210[3214].anIntArray253;
  63.         Bot.bot.mouseClick(1);
  64.         Bot.bot.sell10(inv[0]-1, 0);
  65.     }
  66.    
  67.     public void run() {
  68.         String loop = javax.swing.JOptionPane.showInputDialog(null, "Enter a Number", "Whats the slot on shop?", 1);
  69.         if (loop != null && !loop.equals(""))
  70.         {
  71.             shopIndex = Integer.parseInt(loop);
  72.         }
  73.         startTime = System.currentTimeMillis();
  74.         do{
  75.             if(Bot.bot.isLoggedIn()) {
  76.                 if(fullInv()){
  77.                     if(Bot.bot.getInterfaceOpen() != 5292){
  78.                         Bot.bot.openBank();
  79.                         try{ Thread.sleep(2000); }catch(InterruptedException e){ }
  80.                     }else{
  81.                         bankEverything();
  82.                         Bot.bot.mouseClick(1);
  83.                         Bot.bot.clearTopInterfaces();
  84.                     }
  85.                 } else {
  86.                     //tradeNPC(54);
  87.                     //try{ Thread.sleep(1000); }catch(InterruptedException e){ }
  88.                     buy();
  89.                     //sell();
  90.                 }
  91.             } else {
  92.                 Bot.bot.login();
  93.                 try{ Thread.sleep(15000); }catch(InterruptedException e){ }
  94.             }
  95.             currentTime = System.currentTimeMillis() - startTime;
  96.             try{
  97.                 Thread.sleep(500);
  98.             }catch(InterruptedException e){
  99.             }
  100.         }while(run);
  101.     }
  102.    
  103.     public void draw(Graphics g){
  104.         g.setColor(Color.white);
  105.         g.setFont(new Font("sansserif", Font.BOLD, 16));
  106.         g.drawString("Shopping :D",45,40);
  107.     }
  108.    
  109.     public void sendMessage(String paramString) {
  110.         Bot.bot.method77(paramString, 2, "@cr1@Shopping with a fucking Bot!", false);
  111.     }
  112.    
  113.    
  114. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement