Skip to content

Instantly share code, notes, and snippets.

@irancore
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save irancore/11248607 to your computer and use it in GitHub Desktop.
Save irancore/11248607 to your computer and use it in GitHub Desktop.
Reward LevelUper TrinityCore
// 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