Last active
August 29, 2015 14:00
-
-
Save irancore/11248607 to your computer and use it in GitHub Desktop.
Reward LevelUper TrinityCore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// coded by amir_cinderella -- skype : amir.cinderella | |
#include "Config.h" | |
class levelrewardonlevel : public PlayerScript | |
{ | |
public: | |
levelrewardonlevel() : PlayerScript("levelrewardonlevel") { } | |
void OnLevelChanged(Player* player, uint8 oldLevel) | |
{ | |
if (oldLevel == 29 && player->getLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) // CHANGE 29 to your LEVEL requirement | |
{ | |
player->SetLevel(sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)); | |
player->ModifyMoney(50000000); // CHANGE MONEY VALUE HERE | |
player->TeleportTo(1, -3709.901123f, 1084.681641f, 131.969360f, 5.293728f); // MapId, X, Y, Z, O shop mall | |
ChatHandler(player->GetSession()).SendSysMessage("Your character has leveled so fast that you have earned MaxLevel!"); | |
} | |
} | |
}; | |
void AddSC_levelrewardonlevel() | |
{ | |
new levelrewardonlevel(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment