Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.*;
- public class Shop extends Thread{
- public boolean run = false;
- public long startTime = 0;
- public long currentTime = 1;
- public int shopIndex = -1;
- public Shop(){
- run = true;
- }
- /**
- 615 - herquin general shop
- 623 - domnik gems at edge
- 54 - dzone shop
- */
- public boolean fullInv(){
- int[] inv = Class9.aClass9Array210[3214].anIntArray253;
- for(int i = 0; i < inv.length; i++){
- if(inv[i] == 0)
- return false;
- }
- return true;
- }
- public void tradeNPC(int i){
- /*
- //first option
- Bot.bot.mouseClick(1);
- Bot.bot.aClass30_Sub2_Sub2_1192.method397((byte)6, 155);
- Bot.bot.aClass30_Sub2_Sub2_1192.method431(true, i);
- */
- //second option
- Bot.bot.mouseClick(1);
- Bot.bot.aClass30_Sub2_Sub2_1192.method397((byte)6, 17);
- Bot.bot.aClass30_Sub2_Sub2_1192.method433(0, i);
- }
- public void bankEverything(){
- int[] inv = Class9.aClass9Array210[3214].anIntArray253;
- for(int i = 0; i < inv.length; i++){
- if(inv[i]-1 != 995 && inv[i] != 0){
- Bot.bot.mouseClick(1);
- Bot.bot.bankAllItem(inv[i]-1, i);
- try{Thread.sleep(700);}catch(InterruptedException e){}
- }
- }
- }
- public void buy(){
- int[] shop = Class9.aClass9Array210[3900].anIntArray253;
- Bot.bot.mouseClick(1);
- // Bot.bot.buy10(shop[shopIndex]-1, shopIndex);
- Bot.bot.buyX(shop[shopIndex]-1, shopIndex, 250);
- }
- public void sell(){
- int[] inv = Class9.aClass9Array210[3214].anIntArray253;
- Bot.bot.mouseClick(1);
- Bot.bot.sell10(inv[0]-1, 0);
- }
- public void run() {
- String loop = javax.swing.JOptionPane.showInputDialog(null, "Enter a Number", "Whats the slot on shop?", 1);
- if (loop != null && !loop.equals(""))
- {
- shopIndex = Integer.parseInt(loop);
- }
- startTime = System.currentTimeMillis();
- do{
- if(Bot.bot.isLoggedIn()) {
- if(fullInv()){
- if(Bot.bot.getInterfaceOpen() != 5292){
- Bot.bot.openBank();
- try{ Thread.sleep(2000); }catch(InterruptedException e){ }
- }else{
- bankEverything();
- Bot.bot.mouseClick(1);
- Bot.bot.clearTopInterfaces();
- }
- } else {
- //tradeNPC(54);
- //try{ Thread.sleep(1000); }catch(InterruptedException e){ }
- buy();
- //sell();
- }
- } else {
- Bot.bot.login();
- try{ Thread.sleep(15000); }catch(InterruptedException e){ }
- }
- currentTime = System.currentTimeMillis() - startTime;
- try{
- Thread.sleep(500);
- }catch(InterruptedException e){
- }
- }while(run);
- }
- public void draw(Graphics g){
- g.setColor(Color.white);
- g.setFont(new Font("sansserif", Font.BOLD, 16));
- g.drawString("Shopping :D",45,40);
- }
- public void sendMessage(String paramString) {
- Bot.bot.method77(paramString, 2, "@cr1@Shopping with a fucking Bot!", false);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement