public void showPreview(Client c) { client = c; this.Show(); int i = DwmRegisterThumbnail(this.Handle, client.Process.MainWindowHandle, out thumb); UpdateThumb(); }
public HookProxy(Client client) { this.client = client; serverRecvMsg = new NetworkMessage(client); serverSendMsg = new NetworkMessage(client); clientRecvMsg = new NetworkMessage(client); clientSendMsg = new NetworkMessage(client); if (client.Dll.Pipe == null) { client.Dll.InitializePipe(); client.Dll.PipeIsReady.WaitOne(); } client.Dll.Pipe.OnSocketRecv += new Pipe.PipeListener(Pipe_OnSocketRecv); client.Dll.Pipe.OnSocketSend += new Pipe.PipeListener(Pipe_OnSocketSend); if (client.LoggedIn) { protocol = Protocol.World; } else { protocol = Protocol.None; } }
public Hotkey(Client client, byte number) { if (number < 0 || number > Addresses.Hotkey.MaxHotkeys) throw new ArgumentOutOfRangeException("number", "Hotkey number must be between 0 and Addresses.Hotkey.MaxHotkeys."); this.client = client; this.number = number; }
/// <summary> /// Creates a Pipe to interact with an injected DLL or another program. /// </summary> public Pipe(Client client, string name) { this.client = client; this.name = name; pipe = new NamedPipeServerStream(name, PipeDirection.InOut, -1, PipeTransmissionMode.Message, PipeOptions.Asynchronous); pipe.BeginWaitForConnection(new AsyncCallback(BeginWaitForConnection), null); }
public CamLoader(Client client, ProxyBase proxy, Action<string> logMethod) { this.client = client; this.proxy = proxy; this.logMethod = logMethod; InitializeComponent(); }
private void frmMain_Load(object sender, EventArgs e) { _client = Tibia.Util.ClientChooser.ShowBox(); if (_client != null) { if (!_client.LoggedIn) { _client.Exited += new EventHandler(_client_Exited); _client.IO.StartProxy(); //autoloot _client.IO.Proxy.ReceivedTextMessageIncomingPacket += new Proxy.IncomingPacketListener(Proxy_ReceivedTextMessageIncomingPacket); _client.IO.Proxy.ReceivedContainerUpdateItemIncomingPacket += new Proxy.IncomingPacketListener(Proxy_ReceivedContainerUpdateItemIncomingPacket); _client.IO.Proxy.ReceivedContainerRemoveItemIncomingPacket += new Proxy.IncomingPacketListener(Proxy_ReceivedContainerRemoveItemIncomingPacket); _client.IO.Proxy.ReceivedContainerAddItemIncomingPacket += new Proxy.IncomingPacketListener(Proxy_ReceivedContainerAddItemIncomingPacket); _client.IO.Proxy.ReceivedTileAddThingIncomingPacket += new Proxy.IncomingPacketListener(_proxy_ReceivedTileAddThingIncomingPacket); _client.IO.Proxy.ReceivedContainerOpenIncomingPacket += new Proxy.IncomingPacketListener(Proxy_ReceivedContainerOpenIncomingPacket); } else MessageBox.Show("Please start this program before login."); } else Application.Exit(); }
private void MainForm_Load(object sender, EventArgs e) { do { client = ClientChooser.ShowBox(); } while (client == null && MessageBox.Show("Please select a Tibia client", "Notification", MessageBoxButtons.RetryCancel, MessageBoxIcon.Asterisk) == DialogResult.Retry); if (client == null) { Application.Exit(); return; } else { screen = client.Screen; client.ContextMenu.AddContextMenu(1000, "Add as Ally", ContextMenuType.CopyNameContextMenu, true); client.ContextMenu.AddContextMenu(1001, "Add as Enemy", ContextMenuType.CopyNameContextMenu, true); client.ContextMenu.AddContextMenu(1002, "Show Item Id", ContextMenuType.LookContextMenu, true); client.ContextMenu.Click += new Tibia.Objects.ContextMenu.ContextMenuEvent(ContextMenu_Click); client.Icon.AddIcon(1, 20, 30, 64, 1841, 0, ClientFont.NormalBorder, Color.White); client.Screen.DrawScreenText("ally",new Location(20,84,0),Color.LightBlue, ClientFont.NormalBorder, "Display/Hide Allies"); client.Icon.AddIcon(2, 20, 110, 64, 9438, 0, ClientFont.NormalBorder, Color.White); client.Screen.DrawScreenText("enemy", new Location(20, 164, 0), Color.Red, ClientFont.NormalBorder, "Display/Hide Enemies"); client.Icon.Click+=new Tibia.Objects.Icon.IconEvent(Icon_Click); } }
private void MainForm_Load(object sender, EventArgs e) { ItemInfo.LoadItemsOtb(); mapTiles = new Dictionary<Location, OtMapTile>(); mapCreatures = new Dictionary<Location, PacketCreature>(); packetQueue = new Queue<SplitPacket>(); Reset(); client = ClientChooser.ShowBox(); if (client != null) { if (!useHookProxy && client.LoggedIn) { MessageBox.Show("Using the proxy requires that the client is not logged in."); Application.Exit(); } else if (!useHookProxy) { client.Exited += new EventHandler(Client_Exited); client.IO.StartProxy(); } Start(); } else { MessageBox.Show("MapTracker requires at least one running client."); Application.Exit(); } camLoader = new CamLoader(client, proxy, Log); minimap = new MiniMap(); }
public override void Enable() { Host.DefaultProfile.Set(this, "test", "hello world"); client = this.Host.Client; proxy = this.Host.Proxy; proxy.ReceivedSelfAppearIncomingPacket += new ProxyBase.IncomingPacketListener(ReceivedSelfAppearIncomingPacket); proxy.ReceivedPlayerSpeechOutgoingPacket += new ProxyBase.OutgoingPacketListener(ReceivedPlayerSpeechOutgoingPacket); }
public ClientChooserWPF() { InitializeComponent(); ShowInTaskbar = true; uxUseOT.IsExpanded = false; uxLoginServerLabel.Content = LoginServerDisabled; uxLoginServerLabel.Foreground = Brushes.PaleVioletRed; client = null; }
//packet tile constructors internal Tile(Client client, uint groundId, Location location) { this.type = ObjectType.Packet; this.client = client; this.location = location; this.items = new List<Item>(); if (groundId > 0) this.ground = new Item(client, groundId); }
private void MainForm_Load(object sender, EventArgs e) { client = ClientChooser.ShowBox(); if (client != null) if (client.LoggedIn) { player = client.GetPlayer(); uxMap.Markers.Add(new MapViewer.MapMarker(player)); } }
internal Tile(Client client, uint address, uint squareNumber) { this.type = ObjectType.Memory; this.client = client; this.squareNumber = squareNumber; this.address = address; this.memoryLocation = squareNumber.ToMemoryLocation(); this.objectCount = client.Memory.ReadInt32(address + Tibia.Addresses.Map.DistanceTileObjectCount) - 1; this.ground = new Item(client, client.Memory.ReadUInt32(address + Tibia.Addresses.Map.DistanceTileObjects + Tibia.Addresses.Map.DistanceObjectId)); }
public Core(string clientChooserTitle, string mutexName, bool proxy, bool useWPF) { KeyboardHook.Enable(); do { ClientChooserOptions clientChooserOptions = new ClientChooserOptions(); clientChooserOptions.Title = clientChooserTitle; clientChooserOptions.ShowOTOption = true; clientChooserOptions.OfflineOnly = proxy; if (useWPF) { Client = ClientChooserWPF.ShowBox(clientChooserOptions); } else { Client = ClientChooser.ShowBox(clientChooserOptions); } if (Client != null) { kedrahMutex = new Mutex(true, "Kedrah_" + mutexName + Client.Process.Id.ToString()); if (!kedrahMutex.WaitOne(0, false)) { Client = null; continue; } System.Diagnostics.Process.GetCurrentProcess().PriorityClass = System.Diagnostics.ProcessPriorityClass.AboveNormal; Client.Process.Exited += new EventHandler(ClientClosed); if (proxy) { Client.IO.StartProxy(); Proxy = Client.IO.Proxy; Proxy.PlayerLogin += new EventHandler(OnLogin); Proxy.PlayerLogout += new EventHandler(OnLogout); } else { loginChecker.Execute += new Tibia.Util.Timer.TimerExecution(loginChecker_Execute); loginChecker.Start(); } Modules = new HModules(this); Kedrah.Extensions.Core = this; } } while (Client == null); }
private void frmMain_Load(object sender, EventArgs e) { Client = ClientChooser.ShowBox(); if (Client == null || !Client.LoggedIn) { MessageBox.Show("You must have at least one client open and logged in."); Application.Exit(); } else { Player = Client.GetPlayer(); } }
private void MainForm_Load(object sender, EventArgs e) { client = ClientChooser.ShowBox(); if (client == null || !client.LoggedIn) { MessageBox.Show("You must have at least one client open and logged in to start this program."); Application.Exit(); } else { rune = RuneChooser.ShowBox(); notifyIcon.Icon = new System.Drawing.Icon(GetType(), "icon.ico"); start(); } }
private void MainForm_Load(object sender, EventArgs e) { client = Client.Open(); client.IO.StartProxy(); proxy = client.IO.Proxy; hookProxy = new HookProxy(client); proxy.ReceivedSelfAppearIncomingPacket += new ProxyBase.IncomingPacketListener( delegate(IncomingPacket p) { Success(uxProxyStatus); return true; }); hookProxy.ReceivedSelfAppearIncomingPacket += new ProxyBase.IncomingPacketListener( delegate(IncomingPacket p) { Success(uxHookProxyStatus); return true; }); }
private void uxForm_Load(object sender, EventArgs e) { client = Tibia.Util.ClientChooser.ShowBox(); if (client == null) { MessageBox.Show("No active client."); Application.Exit(); } else { InitializeProxy(); } foreach (byte t in Enum.GetValues(typeof(IncomingPacketType))) { incomingPacketTypeNames.Add(t, Enum.GetName(typeof(IncomingPacketType), t)); } foreach (byte t in Enum.GetValues(typeof(OutgoingPacketType))) { outgoingPacketTypeNames.Add(t, Enum.GetName(typeof(OutgoingPacketType), t)); } uxTypes.Items.Add("(Any)"); uxTypes.SelectedIndex = 0; foreach (KeyValuePair<byte, string> kvp in incomingPacketTypeNames) { uxTypes.Items.Add(new PacketType(kvp.Key, kvp.Value, true)); } foreach (KeyValuePair<byte, string> kvp in outgoingPacketTypeNames) { uxTypes.Items.Add(new PacketType(kvp.Key, kvp.Value, false)); } }
/// <summary> /// Default constructor, same as Objects.Creature. /// </summary> /// <param name="client">The client.</param> /// <param name="address">The address.</param> public Player(Client client, uint address) : base(client, address) { }
public RemoveTextPacket(Client client) : base(client) { Type = PipePacketType.RemoveText; }
internal LoginHelper(Client client) { this.client = client; }
public AddContextMenuPacket(Client client) : base(client) { Type = PipePacketType.AddContextMenu; }
public HookSendToServerPacket(Client client) : base(client) { Type = PipePacketType.HookSendToServer; }
internal Vip(Client client, uint address) { this.client = client; this.address = address; }
internal DllHelper(Client client) { this.client = client; pipeIsReady = new AutoResetEvent(false); }
/// <summary> /// Create a new inventory object with the specified client. /// </summary> /// <param name="c"></param> public Console(Client client) { this.client = client; }
public UpdateIconPacket(Client client) : base(client) { Type = PipePacketType.UpdateIcon; }
internal WindowHelper(Client client) { this.client = client; }
internal Icon(Client client) { this.client = client; iconIds=new List<uint>(); }
/// <summary> /// Create a new inventory object with the specified client. /// </summary> /// <param name="client">The client.</param> public Inventory(Client client) { this.client = client; }