public void PrepereClient() { m_formhelper = new FormHelper(this); m_inventory = new Inventory(this); m_windowhelper = new WindowHelper(this); m_input = new InputHelper(this); m_datreader = new DatReader(this); m_minimap = new MiniMap(this); m_floorChange = new FloorChanger(this); // m_hookproxy = new Packets.HookProxy(this); Parser = new Packets.Parser(this); HookProxy = new Packets.HookProxy(this); m_map = new Map(this); m_pathfinder = new Util.AStarPathFinder(this); m_settnings = new Bot.Settnings(); // m_map.FullLightOn(); IsPreperd = true; }
/// <summary> /// Main constructor /// </summary> /// <param name="p">the client's process object</param> public Client(Process p) { process = p; process.Exited += new EventHandler(process_Exited); process.EnableRaisingEvents = true; // Wait until we can really access the process process.WaitForInputIdle(); while (process.MainWindowHandle == IntPtr.Zero) { process.Refresh(); System.Threading.Thread.Sleep(5); } // Save a copy of the handle so the process doesn't have to be opened // every read/write operation processHandle = Util.WinApi.OpenProcess(Util.WinApi.PROCESS_ALL_ACCESS, 0, (uint)process.Id); pathFinder = new Tibia.Util.AStarPathFinder(this); contextMenu = new ContextMenu(this); memory = new MemoryHelper(this); window = new WindowHelper(this); io = new IOHelper(this); login = new LoginHelper(this); dll = new DllHelper(this); input = new InputHelper(this); player = new PlayerHelper(this); icon = new Icon(this); skin = new Skin(this); // Save the start time (it isn't changing) startTime = Memory.ReadInt32(Addresses.Client.StartTime); }