pioncz
New Member
- Joined
- Dec 3, 2008
- Messages
- 149
- Reaction score
- 1
Hi,
I was searching but couldnt find solution for my problem. I want to make small application on ot which can do something when client receives some messages in Server Log channel. I heared something about Proxy, but samples doesn't work for me. Is there any other solution or could you fix my code?
Every other part of code works fine. Just one which should add something to listBox1 from chat doesn't.
I was searching but couldnt find solution for my problem. I want to make small application on ot which can do something when client receives some messages in Server Log channel. I heared something about Proxy, but samples doesn't work for me. Is there any other solution or could you fix my code?
Every other part of code works fine. Just one which should add something to listBox1 from chat doesn't.
Code:
private void Form1_Load(object sender, EventArgs e)
{
client = null;
List<Tibia.Objects.Client> clients = null;
clients = Tibia.Objects.Client.GetClients("8.70");
Tibia.Version.SetVersion870();
listBox1.Items.Clear();
if (clients.Count() == 0 || !clients[0].LoggedIn)
{
MessageBox.Show("Najpierw zaloguj się korzystając z klienta 8.7","Błąd");
Application.Exit();
}
else
{
client = clients[0];
player = client.GetPlayer();
blist = new BattleList(client);
party = new List<Creature>();
console = new Tibia.Objects.Console(client);
listBox1.Items.Add(player.Name + "[" + player.Level + "]");
console.Say("Bot nie dziala");
this.Text = "Bot dziala";
timer1.Enabled = true;
//czity
player.Light = 100;
client.IO.StartProxy(true);
client.IO.Proxy.SplitPacketFromServer += delegate(byte type, byte[] data)
{
listBox1.Items.Add("paczka");
///listBox1.Items.Add("SERVER: " + data.ToHexString());
};
client.IO.Proxy.SplitPacketFromClient += delegate(byte type, byte[] data)
{
listBox1.Items.Add("paczka");
};
}
}