Advertisement
Guest User

Untitled

a guest
Mar 18th, 2016
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.86 KB | None | 0 0
  1.    public Point ContainerWindowPosition()
  2.         {
  3.             int x, y;
  4.             int num = Core.client.Memory.ReadInt32(Adresses.Client.GuiAddress);
  5.             x = Core.client.Memory.ReadInt32(num + 0x14);
  6.             y = Core.client.Memory.ReadInt32(num + 0x18);
  7.             num = Core.client.Memory.ReadInt32(num + 0x38);// points to containerwindow
  8.             x += Core.client.Memory.ReadInt32(num + 0x14);
  9.             y += Core.client.Memory.ReadInt32(num + 0x18);
  10.             num = Core.client.Memory.ReadInt32(num + 0x24);// points to first child
  11.             x += Core.client.Memory.ReadInt32(num + 0x14);
  12.             y += Core.client.Memory.ReadInt32(num + 0x18);
  13.             return new Point(x, y);
  14.  
  15.         }
  16.         private int GetContainerGuiAdr(int number)
  17.         {
  18.             int num = Core.client.Memory.ReadInt32(Adresses.Client.GuiAddress);
  19.             num = Core.client.Memory.ReadInt32(num + 0x38);
  20.             num = Core.client.Memory.ReadInt32(num + 0x24);
  21.             for (int i = 0; i < 20; i++)
  22.             {
  23.                 int num1 = Core.client.Memory.ReadInt32(num + 0x2c);
  24.                 int ContIndex = num1 - 0x40;
  25.                 if (ContIndex == number)
  26.                 {
  27.                     return num;
  28.                 }
  29.                 num = Core.client.Memory.ReadInt32(num + 0x10);
  30.             }
  31.             return 0;
  32.         }
  33.         private void label1_Click(object sender, EventArgs e)
  34.         {
  35.             int x, y;
  36.             int containerIndex = 0;
  37.             Point ContainerWindow = ContainerWindowPosition();
  38.             int ContainerAdr = GetContainerGuiAdr(containerIndex);
  39.             x = Core.client.Memory.ReadInt32(ContainerAdr + 0x14);
  40.             y = Core.client.Memory.ReadInt32(ContainerAdr + 0x18);
  41.             Cursor.Position = new Point(ContainerWindow.X + x, ContainerWindow.Y + y);
  42.  
  43.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement