[Release] Colored Auto Announce menu

Shout-Out

User Tag List

Results 1 to 6 of 6
  1. #1
    darkgabou15's Avatar Banned
    Reputation
    54
    Join Date
    Mar 2007
    Posts
    66
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Release] Colored Auto Announce

    This is an Auto Announcer that can announce colored messages.
    Credits for the Auto Announcer script go to the guy who made it
    Credits for adding colors go to DrakeFish(me).

    Add this to your Character Database:
    Code:
    CREATE TABLE `announcer_txt` (
      `id` int(3) NOT NULL auto_increment,
      `body` tinytext NOT NULL,
      PRIMARY KEY  (`id`)
    ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

    Setup.cpp:
    Code:
    #include "StdAfx.h"
    #include "Setup.h"
    #include <scriptSetup.h>
    
    extern "C" SCRIPT_DECL uint32 _exp_get_script_type()
    {
       return SCRIPT_TYPE_MISC;
    }
    
    extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr)
    {
        SetupAnnouncer(mgr);
    }
    
    #ifdef WIN32
    
    BOOL APIENTRY DllMain( HANDLE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved )
    {
        return TRUE;
    }
    
    #endif

    Setup.h:
    Code:
    #pragma once
    
    void SetupAnnouncer(ScriptMgr * mgr);
    void ShowMsg(char * errmsg);

    Announcer.cpp:
    Code:
    #include "StdAfx.h"
    
    //Configure these as you wish
    #define BREAKTIME 600000    //The amount of seconds * 1000 you want to wait in between messages
    #define HEADERSTR "[Staff]"     //The string to place in front of the message
    #define HEADERCOLOR MSG_COLOR_GREEN  //The color of the string in front of the message (Example: MSG_COLOR_RED)
    #define TEXTCOLOR MSG_COLOR_LIGHTBLUE    //The color of the text (Example: MSG_COLOR_LIGHTBLUE)
    class Announcement
    {
       public:
          void Run();
    };
    
    void Announcement::Run()
    {
    
        char sZprava[500];
    
           QueryResult * result = CharacterDatabase.Query("SELECT * FROM announcer_txt ORDER BY id ASC");
        if(result)
        {
            do {
                sprintf(sZprava, "%s%s %s%s", HEADERCOLOR, HEADERSTR, TEXTCOLOR, result->Fetch()[1].GetString());
                sWorld.SendWorldText(sZprava);
                
            }while(result->NextRow());
            delete result;
        }
    
    }
    
    void ShowMsg(char * errmsg)
    {
       char errstr[255];
       sprintf(errstr, "\nAnnouncer v2: %s", errmsg);
       sLog.outString(errstr);
    }
    
    void SetupAnnouncer(ScriptMgr * mgr)
    {
       Announcement Announcer;
    
       //If all is good, set up the timer event and lets roll!
       if(BREAKTIME >= 1000)
       {
          TimedEvent * te = TimedEvent::Allocate(&Announcer, new CallbackP0<Announcement>(&Announcer, &Announcement::Run), 1, BREAKTIME, 0);
          sWorld.event_AddEvent(te);
       } else {
          //Someone has their time set under 1 second.;P
          ShowMsg("Announcer has been disabled.  Please insure you have the config set right!");
       }
    
    }

    All the colors:
    MSG_COLOR_LIGHTRED
    MSG_COLOR_LIGHTBLUE
    MSG_COLOR_BLUE
    MSG_COLOR_GREEN
    MSG_COLOR_RED
    MSG_COLOR_GOLD
    MSG_COLOR_GREY
    MSG_COLOR_WHITE
    MSG_COLOR_SUBWHITE
    MSG_COLOR_MAGENTA
    MSG_COLOR_YELLOW
    MSG_COLOR_CYAN


    Have fun!

    [Release] Colored Auto Announce
  2. #2
    ApexEmu's Avatar Banned
    Reputation
    5
    Join Date
    Oct 2008
    Posts
    32
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice +Rep, but wasen't this first on the leaked Bg wowscape from WoM?

  3. #3
    sadgonewild's Avatar Member
    Reputation
    10
    Join Date
    Jun 2007
    Posts
    127
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No,this is daikenking's announcer script modified thats all, was released on ascentemu.com ages ago.

  4. #4
    Etna's Avatar Banned
    Reputation
    20
    Join Date
    Sep 2007
    Posts
    349
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very Nice mate

  5. #5
    darkgabou15's Avatar Banned
    Reputation
    54
    Join Date
    Mar 2007
    Posts
    66
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you, and don't forget to +Rep if you like it

  6. #6
    darkgabou15's Avatar Banned
    Reputation
    54
    Join Date
    Mar 2007
    Posts
    66
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm going to release something new soon too

Similar Threads

  1. [Release] Player Levelup announcer
    By Edude in forum WoW EMU General Releases
    Replies: 20
    Last Post: 01-05-2009, 07:22 PM
  2. [Release] New Character Announcer
    By Pragma in forum WoW EMU General Releases
    Replies: 32
    Last Post: 12-06-2008, 02:53 AM
  3. Replies: 4
    Last Post: 09-12-2008, 04:14 PM
  4. Auto Announce Npc That Works With Mangos and Ascent
    By Cripto in forum WoW EMU General Releases
    Replies: 9
    Last Post: 08-17-2008, 05:12 PM
  5. [Release] Ascent Auto Announcer
    By Pwntzyou in forum World of Warcraft Emulator Servers
    Replies: 14
    Last Post: 05-21-2008, 12:35 PM
All times are GMT -5. The time now is 07:17 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search