LevelCast
Information
LevelCast is a script that on level up the character unwillingly announces yells that they've leveled up so that way all players around will here and can congratulate him if they wish, its really just a fun thing to place on a fun server it doesn't broadcast it or anything just yells it so people near can hear it. Probably not recommended for big servers due to mass spam it could cause.
Here is the Script i hope you enjoy
Code:#include "StdAfx.h" #include "Setup.h" ///////////////////////GM Chat Commands////////////////////// static string lvlon = "#levelyell"; static bool b_lvlon = true; void LevelCommands(Player * pPlayer, uint32 Type, uint32 Lang, const char * Message, const char * Misc) { if(Message == lvlon && pPlayer->GetSession()->HasGMPermissions()) { char message[200]; if(b_lvlon = true) { b_lvlon = false; sprintf(message,"[LevelCast] GM %s has disabled LevelCast", pPlayer->GetName()); pPlayer->BroadcastMessage("You have turned off LevelCast"); } else if(b_lvlon = false) { b_lvlon = true; sprintf(message,"[LevelCast] GM %s has enabled LevelCast", pPlayer->GetName()); pPlayer->BroadcastMessage("You have turned on LevelCast"); } sWorld.SendWorldWideScreenText(message); } }; void Level(Player * pPlayer) { if(b_lvlon = true) { char * message; sprintf(message, "DING!!!, Yay i've reached level %s.", pPlayer->getLevel()); pPlayer->SendChatMessage(CHAT_MSG_YELL,LANG_UNIVERSAL, message); } } void SetupLevelUp(ScriptMgr * mgr) { mgr->register_hook(SERVER_HOOK_EVENT_ON_POST_LEVELUP, &Level); mgr->register_hook(SERVER_HOOK_EVENT_ON_CHAT, &LevelCommands); }