Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ScriptMgr.h"
- //Written by yvoms
- //Updated by carcar21
- class custom_TelePlayerOnLevel : public PlayerScript
- {
- public:
- custom_TelePlayerOnLevel() : PlayerScript("custom_TelePlayerOnLevel") { }
- void OnLevelChanged(Player* player, uint8 newLevel)
- {
- if(newLevel == 254)
- {
- if (player->IsInFlight())
- {
- player->GetMotionMaster()->MovementExpired();
- player->CleanupAfterTaxiFlight();
- }
- //Order = (Map Id, X, Y, Z, Orientation)
- player->TeleportTo(571, 1295.12, -5108.54, 174.19, 2.02308);
- player->GetSession()->SendNotification("Congratulations, you have reached level 255. You have been teleported to our mall!");
- }
- }
- };
- void AddSC_custom_TelePlayerOnLevel()
- {
- new custom_TelePlayerOnLevel();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement