Advertisement
carcar21

Untitled

Aug 1st, 2015
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. #include "ScriptMgr.h"
  2. //Written by yvoms
  3. //Updated by carcar21
  4. class custom_TelePlayerOnLevel : public PlayerScript
  5. {
  6. public:
  7. custom_TelePlayerOnLevel() : PlayerScript("custom_TelePlayerOnLevel") { }
  8.  
  9. void OnLevelChanged(Player* player, uint8 newLevel)
  10. {
  11. if(newLevel == 254)
  12. {
  13. if (player->IsInFlight())
  14. {
  15. player->GetMotionMaster()->MovementExpired();
  16. player->CleanupAfterTaxiFlight();
  17. }
  18. //Order = (Map Id, X, Y, Z, Orientation)
  19. player->TeleportTo(571, 1295.12, -5108.54, 174.19, 2.02308);
  20. player->GetSession()->SendNotification("Congratulations, you have reached level 255. You have been teleported to our mall!");
  21. }
  22. }
  23. };
  24.  
  25. void AddSC_custom_TelePlayerOnLevel()
  26. {
  27. new custom_TelePlayerOnLevel();
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement