Como tirar o bug do teleporte | Mercury Emulador


Tutorial um pouco digamos mediano, mas eficaz.

Tutorial:
1 ~> Abra o Projeto do Mercury Emulador com o Visual Studio.
2 ~> Dê CTRL + F e procure pela seguinte linha:

case InteractionType.teleport: {
bool flag3 = false;

3 ~> Após encontrar a Linha citada anteriormente, apaga ela e substitua a mesma por esseCódigo:

case InteractionType.teleport: {
bool flag3 = false;
bool flag4 = false;
if (this.InteractingUser > 0)
{
RoomUser roomUserByHabbo2 = this.GetRoom().GetRoomUserManager().GetRoomUserByHabbo(this.InteractingUser);
if (roomUserByHabbo2 == null)
{
this.InteractingUser = 0u;
return;
}
if (roomUserByHabbo2.Coordinate == this.Coordinate)
{
roomUserByHabbo2.AllowOverride = false;
if (TeleHandler.IsTeleLinked(this.Id, this.mRoom))
{
flag4 = true;
uint linkedTele = TeleHandler.GetLinkedTele(this.Id, this.mRoom);
uint teleRoomId = TeleHandler.GetTeleRoomId(linkedTele, this.mRoom);
if (teleRoomId == this.RoomId)
{
RoomItem item2 = this.GetRoom().GetRoomItemHandler().GetItem(linkedTele);
if (item2 == null)
{
roomUserByHabbo2.UnlockWalking();
}
else
{
roomUserByHabbo2.SetPos(item2.GetX, item2.GetY, item2.GetZ);
roomUserByHabbo2.SetRot(item2.Rot, false);
item2.ExtraData = "2";
item2.UpdateState(false, true);
item2.InteractingUser2 = this.InteractingUser;
}
}
else
{
if (!roomUserByHabbo2.IsBot && roomUserByHabbo2 != null && roomUserByHabbo2.GetClient() != null && roomUserByHabbo2.GetClient().GetHabbo() != null && roomUserByHabbo2.GetClient().GetMessageHandler() != null)
{
roomUserByHabbo2.GetClient().GetHabbo().IsTeleporting = true;
roomUserByHabbo2.GetClient().GetHabbo().TeleportingRoomID = teleRoomId;
roomUserByHabbo2.GetClient().GetHabbo().TeleporterId = linkedTele;
roomUserByHabbo2.GetClient().GetMessageHandler().PrepareRoomForUser(teleRoomId, "");
}
}
this.InteractingUser = 0u;
}
else
{
roomUserByHabbo2.UnlockWalking();
this.InteractingUser = 0u;
roomUserByHabbo2.CanWalk = false;
roomUserByHabbo2.TeleportEnabled = false;
roomUserByHabbo2.MoveTo(this.SquareInFront);
roomUserByHabbo2.CanWalk = true;
}
}
else
{
if (roomUserByHabbo2.Coordinate == this.SquareInFront)
{
roomUserByHabbo2.AllowOverride = true;
flag3 = true;
if (roomUserByHabbo2.IsWalking && (roomUserByHabbo2.GoalX != this.mX || roomUserByHabbo2.GoalY != this.mY))
{
roomUserByHabbo2.ClearMovement(true);
}
roomUserByHabbo2.SetRot(PathFinding.PathFinder.CalculateRotation(roomUserByHabbo2.X, roomUserByHabbo2.Y, this.mX, this.mY));
roomUserByHabbo2.CanWalk = false;
roomUserByHabbo2.AllowOverride = false;
roomUserByHabbo2.UnlockWalking();
roomUserByHabbo2.TeleportEnabled = true;
roomUserByHabbo2.MoveTo(this.GetX, this.GetY, true);
roomUserByHabbo2.TeleportEnabled = false;
roomUserByHabbo2.UnlockWalking();
}
else
{
this.InteractingUser = 0u;
}
}
}
if (this.InteractingUser2 > 0u)
{
RoomUser roomUserByHabbo3 = this.GetRoom().GetRoomUserManager().GetRoomUserByHabbo(this.InteractingUser2);
if (roomUserByHabbo3 != null)
{
flag3 = true;
roomUserByHabbo3.UnlockWalking();
roomUserByHabbo3.MoveTo(this.SquareInFront);
}
this.InteractingUser2 = 0u;
}
if (flag3)
{
if (this.ExtraData != "1")
{
this.ExtraData = "1";
this.UpdateState(false, true);
}
}
else
{
if (flag4)
{
if (this.ExtraData != "2")
{
this.ExtraData = "2";
this.UpdateState(false, true);
}
}
else
{
if (this.ExtraData != "0")
{
this.ExtraData = "0";
this.UpdateState(false, true);
}
}
}
this.ReqUpdate(1, false);
return;
}

4 ~> Após fazer os passos anteriores, dê debug no seu projeto e salve.

Créditos:
Ǥiσvαทy
Fazendo HP