• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[SOLVED] BossAnnouncer.cpp

Status
Not open for further replies.

Minodevs

Emulation Addict
Solved:BossAnnouncer.cpp

Hello Guys i`ve using that, Script Bossannouncer.cpp but its no working i did recompiled 3x and cleaned, sulotion, didn't work yet no Announcering Boses, i triyed in group and wtihout Group

#include "ScriptMgr.h"
#include "Chat.h"
#include "Language.h"

class Boss_Announcer : public PlayerScript
{
public:
Boss_Announcer() : PlayerScript("Boss_Announcer") {}

void OnCreatureKill(Player* player, Creature* boss)
{
if (boss->isWorldBoss())
{
std::string plr = player->GetName();
std::string boss_n = boss->GetName();
std::string gender = player->getGender() == GENDER_FEMALE ? "her" : "his";
bool ingroup = player->GetGroup();
std::string tag_colour = "7bbef7";
std::string plr_colour = "ff0000";
std::string boss_colour = "18be00";
std::eek:stringstream stream;
stream << "|CFF" << tag_colour <<
"[News]|r:|cff" << plr_colour << " " << plr <<
"|I Killed |CFF" << boss_colour << "[" << boss_n << "]|r " <<
(ingroup ? "by " : "with ") << gender << (ingroup ? " group" : "self") << "!";
sWorld->SendServerMessage(SERVER_MSG_STRING, stream.str().c_str());
}
};
};

void AddSC_Boss_Announcer()
{
new Boss_Announcer;
}
 
Last edited:

Rochet2

Moderator / Eluna Dev
The script does not need any scriptname set. Its a playerscript.

Also in the second pic the NPC does not seem to have the flag I mentioned earlier. The NPC is not a world boss so its not announcing
 

Minodevs

Emulation Addict
The script does not need any scriptname set. Its a playerscript.

Also in the second pic the NPC does not seem to have the flag I mentioned earlier. The NPC is not a world boss so its not announcing

Thanks Rochet2 i solved, it :)
 
Status
Not open for further replies.
Top