Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ScriptPCH.h"
- class Boss_Announcer : public PlayerScript
- {
- public:
- Boss_Announcer() : PlayerScript ("Boss_Announcer") {}
- void OnCreatureKill(Player* player, Creature* boss)
- {
- uint64 time2 = sWorld->GetGameTime(); // Getting actual game time
- {
- if (boss->isWorldBoss())
- {
- if (player->getGender() == GENDER_MALE)
- {
- if (time2 - time1 >= 02 * 59) {
- char msg[250];
- snprintf(msg, 250, "|CFF7BBEF7[World Boss Announcer]|r:|cffff0000 %s |r e seu grupo matou o World Boss |CFF18BE00[%s]|r !!!",player->GetName(),boss->GetName());
- sWorld->SendServerMessage(SERVER_MSG_STRING, msg);
- time1 = times2;
- } else { // Less than 30 minutes
- char msg2[250];
- uint32 tminute = (02*59 - (time2 - time1)) / 59;
- uint32 tsecond = (02*59 - (time2 - time1)) % 59;
- }
- else
- {
- if (time2 - time1 >= 02 * 59) {
- char msg[250];
- snprintf(msg, 250, "|CFF7BBEF7[World Boss Announcer]|r:|cffff0000 %s |r e seu grupo matou o World Boss |CFF18BE00[%s]|r !!!",player->GetName(),boss->GetName());
- sWorld->SendServerMessage(SERVER_MSG_STRING, msg);
- time1 = times2;
- } else { // Less than 30 minutes
- char msg2[250];
- uint32 tminute = (02*59 - (time2 - time1)) / 59;
- uint32 tsecond = (02*59 - (time2 - time1)) % 59;
- }
- }
- }
- };
- void AddSC_Boss_Announcer()
- {
- new Boss_Announcer;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement