package org.revilosoft.revoli.bot; import java.io.*; import java.net.*; import java.applet.Applet; import org.revilosoft.revoli.hooks.*; import org.revilosoft.revoli.script.Script; public class Bot extends java.awt.Frame { private static Applet app; public static Client Client; public static BotControls controls; public static java.util.HashMap jcHash = new java.util.HashMap(); private static DataOutputStream contrOut = null; public Bot(int world) { super("Revoli"); try { RevStub rstub = new RevStub(world, true); RevClassLoader rcl = new RevClassLoader(rstub.getCodeBase().toString() + rstub.getParameter("archive")); app = (Applet)(rcl.loadClass("loader").newInstance()); app.setStub(rstub); add(app); setSize(765, 533); setBackground(java.awt.Color.BLACK); setResizable(false); setVisible(true); app.start(); app.init(); java.awt.Component ldr = app.getComponentAt(1, 1); do { Thread.sleep(1L); } while(ldr == getClientComponent()); while((Client)(((Loader)app).getClient()) == null) Thread.sleep(100L); this.Client = (Client)(((Loader)app).getClient()); System.out.println("Client Revision #"+Client.getClientRevision()+" Obtained!\nClient = " + Client); controls = new BotControls(); Script.loadScripts(); for (int i = 0; i < 2048; i++) { org.revilosoft.revoli.methods.Methods.CURVE_SIN[i] = (int) (65536.0 * Math.sin((double) i * 0.0030679615)); org.revilosoft.revoli.methods.Methods.CURVE_COS[i] = (int) (65536.0 * Math.cos((double) i * 0.0030679615)); } java.awt.EventQueue eventQueue = app.getToolkit().getSystemEventQueue(); if (!(eventQueue instanceof org.revilosoft.revoli.event.myEventQueue)) eventQueue.push(new org.revilosoft.revoli.event.myEventQueue()); new org.revilosoft.revoli.methods.MouseManager().start(); org.revilosoft.revoli.event.myEventQueue.firstFocus = false; } catch(Exception e) { System.out.println(e.getMessage()); } } public static void main(String[] args) { new org.revilosoft.revoli.transforms.Transforms(); new Bot(Integer.parseInt(args[0])); } public static java.awt.Component getClientComponent() { return app.getComponentAt(1, 1); } }