[Help] Prevent low levels from accessing high level zones

Hi All,

I was wondering if anyone has an idea what I could edit/add to the source or database which will prevent players from accessing certain zones based on their level. For example: I would like to prevent a situation where a player has two accounts and uses their level 80 on the one account to power level their low level on the other account in Northrend.

I’ve done a test on a clean trinitycore and the transports allow low level character to enter northrend.

hrmmm… couldn’t you lock access to certain accounts until a certain level? Like certain expansions become available at level 60, 70, 80, etc.?

make a player script to teleport players that hasn’t got record in db to their previous coordination once they change to a mapid they shouldn’t access (by db record you can also do that by level)_

Would also be interested in this.

Because it’s blizzlike.

Wouldn’t you be able to use the dalaran trespassing script and modify to teleport you elsewhere?

Would something like this work?

                if (player->GetTeam() == ALLIANCE)
                    if (player->getLevel() <= 68)
                        player->TeleportTo(0, -8833.379883f, 628.627991f, 94.006599f, 0.515571f);

Thanks all for your suggestion. I am aware that it is Blizzlike … just unfortunately that one can use it to gain some extra levels.

This is what I implemented to prevent players from entering Northrend:

diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 91d7ffb…06b0bde 100644
— a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -1564,6 +1564,28 @@ void Player::Update(uint32 p_time)
if (!IsInWorld())

  • // Teleport Player to starting zone for entering Northrend under 68
  •   if (GetMapId() == 571 && getLevel() < 68)
  •    {
  •   	PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(), getClass());
  •   	if (info)
                              m_session->SendNotification("You may only enter Northrend once you are level 68");
  •   		TeleportTo(info->mapId, info->positionX, info->positionY, info->positionZ, info->orientation);
  •   }
  • // undelivered mail
    if (m_nextMailDelivereTime && m_nextMailDelivereTime <= time(NULL))

Credit goes to [B]LilleCarl[/B] for the assistance on this one /emoticons/default_smile.png