Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ScriptMgr.h"
- class custom_TelePlayerOnLevel : public PlayerScript
- {
- public:
- custom_TelePlayerOnLevel() : PlayerScript("custom_TelePlayerOnLevel") { }
- void OnLevelChanged(Player* player, uint8 newLevel)
- {
- // Change 255 To the level u want to get them teleported to location.
- if(newLevel == 254)
- {
- if
- if (player->isInFlight())
- {
- player->GetMotionMaster()->MovementExpired();
- player->CleanupAfterTaxiFlight();
- }
- // (mapid, X, Y, Z, O)
- if (player->TeamForRace(ALLIANCE)
- {
- player->TeleportTo(M, Y, Y, Z, O);
- }
- if (player->TeamForRace(HORDE)
- {
- player->TeleportTo(M, Y, Y, Z, O);
- }
- }
- }
- };
- void AddSC_custom_TelePlayerOnLevel()
- {
- new custom_TelePlayerOnLevel();
- }
Advertisement
Add Comment
Please, Sign In to add comment