-
-
Save Rochet2/8812233 to your computer and use it in GitHub Desktop.
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
//script made by SymbolixDEV | |
#include "ScriptPCH.h" | |
class login_script : public PlayerScript | |
{ | |
public: | |
login_script() : PlayerScript("login_script") { } | |
void OnLogin(Player* player) | |
{ | |
std::string msg; | |
if (player->GetSession()->GetSecurity() != SEC_PLAYER) | |
msg = "[GM]:"; | |
else | |
msg = "[PLAYER]:"; | |
msg += player->GetName()+" has logged in!"; | |
sWorld->SendGlobalText(msg.c_str(), NULL); | |
player->SetPower(POWER_MANA, player->GetMaxPower(POWER_MANA)); // set max mana | |
player->SetPower(POWER_ENERGY, player->GetMaxPower(POWER_ENERGY)); //set max rogue/druid enery go on login! | |
player->SetPower(POWER_RAGE, player->GetMaxPower(POWER_RAGE)); //set max warrior rage on login! | |
player->SetPower(POWER_RUNIC_POWER, player->GetMaxPower(POWER_RUNIC_POWER)); //set max runic power on Death Knight on login! | |
player->SetFullHealth(); // set max health on login on game ! | |
player->RemoveAllSpellCooldown(); //reset cooldowns on login! | |
} | |
}; | |
void AddSC_login_script() | |
{ | |
new login_script(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
is this still work?