private void Window_DoubleClick(object sender, System.EventArgs e) { // Events em Jogo if (Tools.CurrentWindow == Tools.Windows.Jogo) { // Use item byte Slot = Tools.Inventory_Overlapping(); if (Slot > 0) { if (Player.Inventory[Slot].Item_Num > 0) { Sending.Inventory_Use(Slot); } } // Use o que estiver na hotbar Slot = Tools.Hotbar_Overlapping(); if (Slot > 0) { if (Player.Hotbar[Slot].Slot > 0) { Sending.Hotbar_Use(Slot); } } } }
private void Window_KeyDown(object sender, KeyEventArgs e) { // Define se um Button está sendo HoldKey switch (e.KeyCode) { case Keys.Up: Jogo.HoldKey_Above = true; break; case Keys.Down: Jogo.HoldKey_Below = true; break; case Keys.Left: Jogo.HoldKey_Left = true; break; case Keys.Right: Jogo.HoldKey_Right = true; break; case Keys.ShiftKey: Jogo.HoldKey_Shift = true; break; case Keys.ControlKey: Jogo.HoldKey_Control = true; break; case Keys.Enter: Scanners.Chat_Digitar(); break; } // Em Jogo if (Tools.CurrentWindow == Tools.Windows.Jogo) { if (!Panels.Locate("Chat").Geral.Visible) { switch (e.KeyCode) { case Keys.Space: Player.CollectItem(); break; case Keys.D1: Sending.Hotbar_Use(1); break; case Keys.D2: Sending.Hotbar_Use(2); break; case Keys.D3: Sending.Hotbar_Use(3); break; case Keys.D4: Sending.Hotbar_Use(4); break; case Keys.D5: Sending.Hotbar_Use(5); break; case Keys.D6: Sending.Hotbar_Use(6); break; case Keys.D7: Sending.Hotbar_Use(7); break; case Keys.D8: Sending.Hotbar_Use(8); break; case Keys.D9: Sending.Hotbar_Use(9); break; case Keys.D0: Sending.Hotbar_Use(0); break; } } } }