Advertisement
RobertoDev

Untitled

Jan 22nd, 2020
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. #include "ScriptPCH.h"
  2.  
  3. class Boss_Announcer : public PlayerScript
  4. {
  5. public:
  6. Boss_Announcer() : PlayerScript ("Boss_Announcer") {}
  7.  
  8. void OnCreatureKill(Player* player, Creature* boss)
  9. {
  10. uint64 time2 = sWorld->GetGameTime(); // Getting actual game time
  11. {
  12. if (boss->isWorldBoss())
  13. {
  14. if (player->getGender() == GENDER_MALE)
  15. {
  16. if (time2 - time1 >= 02 * 59) {
  17. char msg[250];
  18. 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());
  19. sWorld->SendServerMessage(SERVER_MSG_STRING, msg);
  20. time1 = times2;
  21. } else { // Less than 30 minutes
  22. char msg2[250];
  23. uint32 tminute = (02*59 - (time2 - time1)) / 59;
  24. uint32 tsecond = (02*59 - (time2 - time1)) % 59;
  25. }
  26. else
  27. {
  28. if (time2 - time1 >= 02 * 59) {
  29. char msg[250];
  30. 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());
  31. sWorld->SendServerMessage(SERVER_MSG_STRING, msg);
  32. time1 = times2;
  33. } else { // Less than 30 minutes
  34. char msg2[250];
  35. uint32 tminute = (02*59 - (time2 - time1)) / 59;
  36. uint32 tsecond = (02*59 - (time2 - time1)) % 59;
  37. }
  38. }
  39. }
  40. };
  41.  
  42. void AddSC_Boss_Announcer()
  43. {
  44. new Boss_Announcer;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement