jackpoz / BotFarm

Application used to spawn WoW automated players compatible with 3.3.5a version only.
GNU General Public License v2.0
84 stars 68 forks source link

Thread.Sleep #4

Closed ghost closed 10 years ago

ghost commented 10 years ago

why Thread.Sleep doesn't work for OutPacket packets ?

while (true)
{
    OutPacket Packet = new OutPacket(WorldCommand.CMSG_GROUP_ACCEPT);
    Packet.Write(0);
    Game.SendPacket(Packet);

    Thread.Sleep(1000);
 }

this should send packet every second but it didn't

jackpoz commented 10 years ago

I have no idea where you put that piece of code. Keep in mind Thread.Sleep(1000) is a .NET method so I have nothing to do with it.

If you want to schedule reoccurring actions, use the ScheduleAction() method https://github.com/jackpoz/BotFarm/blob/master/Client/AutomatedGame.cs#L214