public bool TeleportWait(int x, int y)
{
this.SelectSkill(SkillHand.Right, SkillType.Teleport);
this.CastRightSkill(x, y);
if (!WaitForPacket(GameServerPacket.PlayerReassign, 5000))
return false;
// If we landed somewhere other than where we wanted to teleport, tele randomly
if (this.Hero.X != x || this.Hero.Y != y)
{
Random rand = new Random();
TeleportWait(rand.Next((int)this.Hero.X - 5, (int)this.Hero.X + 5), rand.Next((int)this.Hero.Y - 5, (int)this.Hero.Y + 5));
}
// Delay so we don't keep teleporting
System.Threading.Thread.Sleep(200);
return true;
}