I am looking for a command that will produce the same effect when you try to use the portal to blasted lands and are not level 58. On the top center of the screen in red it says "You must reach level 58 to use this portal"
I am using this in a portal script and limiting the portal to only level 80 characters if you are in Shatt. The portal works like it should but I would like to know how to tell the player they need to be level 80 in red text just like the blasted lands portal.
Code:
#include "ScriptPCH.h"
class tp_dalaran : public GameObjectScript
{
public:
tp_dalaran()
: GameObjectScript("tp_dalaran") {}
bool OnGossipHello(Player* player, GameObject* gobject)
{
if ((player->getLevel() <= 79) && (gobject-> GetMapId() == 530))
{
player->GetSession()->SendNotification("You must be level 80 to use this portal.");
return false;
}
else
{
player->TeleportTo(571, 5820.606f, 544.037f, 651.932f, 1.858341f);
return false;
}
}
};
void AddSC_tp_dalaran()
{
new tp_dalaran();
}
If I use this...
Code:
player->GetSession()->SendNotification("You must be level 80 to use this portal.");
...I get the text I want but it also pops up a gossip menu.
What am I doing wrong?