public bool TownPortal()
{
BotGameData.Me.PortalId = 0;
SwitchSkill(0xDC);
CastOnSelf();
int timeoutStep = 100;
for (int npc_timeout = 2000; npc_timeout > 0 && BotGameData.Me.PortalId == 0; npc_timeout -= timeoutStep)
Thread.Sleep(timeoutStep);
if (BotGameData.Me.PortalId == 0)
{
Console.WriteLine("{0}: [D2GS] Failed to take town portal.", Account);
return false;
}
byte[] temp = {0x02,0x00,0x00,0x00};
SendPacket(0x13, temp, BitConverter.GetBytes(BotGameData.Me.PortalId));
Thread.Sleep(400);
Status = ClientStatus.STATUS_IN_TOWN;
return true;
}