using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using DuckEmulator.HabboHotel.Outside.Clients; namespace DuckEmulator.GUI.Actions.Broadcast { public partial class Badges : Form { public Badges() { InitializeComponent(); if (!DuckEnvironment.Started) { button1.Enabled = false; } } private void button1_Click(object sender, EventArgs e) { if (Online.Checked) { DuckEnvironment.SocketListener.GetFactory().GenerateClients.ForEach(UpdateBadges); } else { /*using (IQueryAdapter Adapter = DuckEnvironment.GetAdapter()) { Adapter.runFastQuery("UPDATE users SET credits = credits + " + int.Parse(textBox1.Text) + ""); }*/ } MessageBox.Show("Send succesfully badges!"); } internal void UpdateBadges(Client Client) { if (Client == null) return; if (Client.GetHabbo() == null) return; Client.GetHabbo().GetBadgeTable().GiveBadge(textBox1.Text); } } }