Guest User

Untitled

a guest
Oct 20th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.98 KB | None | 0 0
  1.     public static void output(String text)
  2.     {
  3.         System.out.println(text);
  4.     }
  5.  
  6.     public static void BotAppletInit()
  7.     {
  8.         isApplet = true;
  9.         setLoadingText("Bot is starting up...");
  10.         runBot();
  11.     }
  12.  
  13.     public static void setLoadingText(String text)
  14.     {
  15.         if(isApplet)
  16.             BotApplet.statusText.setText(text);
  17.     }
  18.  
  19.     public static void appletStop()
  20.     {
  21.         if(Active)
  22.             StopBot();
  23.     }
  24.  
  25.     public static void main(String args[])
  26.     {
  27.         for(int i = 0; i < args.length; i++)
  28.         {
  29.             String arg = args[i];
  30.         }
  31.  
  32.         runBot();
  33.     }
  34.  
  35.     public static void runBot()
  36.     {
  37.         NewBotGUI.createAndShowGUI();
  38.         botGUI = new BotGUI();
  39.         BotGUI _tmp = botGUI;
  40.         BotGUI.displayGUI();
  41.         do
  42.             try
  43.             {
  44.                 if(Active)
  45.                 {
  46.                     ClientHandler _tmp2 = clientHandler;
  47.                     ClientHandler.Process();
  48.                 }
  49.                 Thread.sleep(500L);
  50.             }
  51.             catch(InterruptedException ex) { }
  52.         while(true);
  53.     }
  54.  
  55.     public static void processCommand(String Command)
  56.     {
  57.         String CommandL = Command.toLowerCase();
  58.         if(CommandL.startsWith("say "))
  59.         {
  60.             String textToSay = Command.substring(4);
  61.             ClientHandler.allClientsSay(textToSay);
  62.         }
  63.         if(CommandL.startsWith("yell "))
  64.         {
  65.             String textToSay = Command.substring(5);
  66.             ClientHandler.allClientsYell(textToSay);
  67.         }
  68.         if(CommandL.startsWith("command "))
  69.         {
  70.             String theCommand = Command.substring(8);
  71.             ClientHandler.allClientsCommand(theCommand);
  72.         }
  73.         if(CommandL.startsWith("ab "))
  74.         {
  75.             String abID = Command.substring(3);
  76.             ClientHandler.actionButton(abID);
  77.         }
  78.         if(CommandL.startsWith("bb "))
  79.         {
  80.             String boneID = Command.substring(3, 7);
  81.             String boneSlot = Command.substring(8);
  82.             ClientHandler.buryBones(boneID, boneSlot);
  83.         }
  84.         if(CommandL.startsWith("click"))
  85.         {
  86.             ClientHandler.sendMouseClick();
  87.         }
  88.         if(CommandL.startsWith("atobject "))
  89.         {
  90.             String objectID = Command.substring(9, 13);
  91.             String objectY = Command.substring(14, 18);
  92.             String objectX = Command.substring(19);
  93.             System.out.println(objectID + " " + objectY + " " + objectX);
  94.             ClientHandler.atObject(objectID, objectY, objectX);
  95.         }
  96.         if(CommandL.startsWith("atobject2 "))
  97.         {
  98.             String objectID = Command.substring(10, 14);
  99.             String objectY = Command.substring(15, 19);
  100.             String objectX = Command.substring(20);
  101.             System.out.println(objectID + " " + objectY + " " + objectX);
  102.             ClientHandler.atObject2(objectID, objectY, objectX);
  103.         }
  104.         if(CommandL.startsWith("depositall "))
  105.         {
  106.             String itemSlot = Command.substring(16);
  107.             String itemID = Command.substring(11, 15);
  108.             ClientHandler.depositAll(itemSlot, itemID);
  109.         }
  110.         if(CommandL.startsWith("withdrawall "))
  111.         {
  112.             String itemSlot = Command.substring(17);
  113.             String itemID = Command.substring(12, 16);
  114.             ClientHandler.withdrawAll(itemSlot, itemID);
  115.         }
  116.         if(CommandL.startsWith("drop "))
  117.         {
  118.             String dropID = Command.substring(5, 9);
  119.             String dropSlot = Command.substring(10);
  120.             System.out.println("Drop: " + dropID + " Slot: " + dropSlot);
  121.             ClientHandler.dropItem(dropSlot, dropID);
  122.         }
  123.     }
Add Comment
Please, Sign In to add comment