Hello & Welcome to our community. Is this your first visit? Register
Follow us on
Follow us on Facebook

User Tag List

Likes Likes:  0
Results 1 to 2 of 2
  1. #1
    Graphics Guru

    Join Date
    Feb 2009
    Posts
    1,141
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    14
    Reputation
    329

    OnLogin Welcome Announcer


    Register to remove this ad
    Quote Originally Posted by Sylica
    Today I like to share a small script I made, while being bored programming class.

    Its a simple function that welcomes new players on login to the world, then greets existing players on return to the world.
    Code:
    /*
     *  @script made by Sylica
     *  @project name: Project Firestorm
     */
    
    #include "ScriptMgr.h"
    #include "Player.h"
    #include "Chat.h"
    
    class welcome_player_message : public PlayerScript
    {
    public:
        welcome_player_message() : PlayerScript("welcome_player_message") { }
    
        void OnLogin(Player* player, bool firstLogin) override
        {
            std::ostringstream message;
            if (firstLogin)
            {
                message << "|cff3ADF00Please welcome " << player->GetName() << " to our server!|r";
                sWorld->SendGlobalText(message.str().c_str(), nullptr);
            }
            else 
            {
                message << "|cff3ADF00Glade to see you back " << player->GetName() << "!|r";
                ChatHandler(player->GetSession()).PSendSysMessage(message.str().c_str());
            }
        }
    };
    
    void AddSC_onlogin_announcer()
    {
        new welcome_player_message();
    }

    Credits : Sylica




    › See More: OnLogin Welcome Announcer



  2. Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread

  3. #2
    Beginner

    Join Date
    Sep 2015
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    3
    Reputation
    1

    Thumbs up Rep


    Register to remove this ad
    ThankYou Dear My Friend

 

 

Visitors found this page by searching for:

Nobody landed on this page from a search engine, yet!
SEO Blog

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -5. The time now is 08:42 PM.
Powered by vBulletin® Copyright ©2000-2017, Jelsoft Enterprises Ltd.
See More links by ForumSetup.net. User Alert System provided by Advanced User Tagging v3.3.0 (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
vBulletin Licensed to: MMOPro.org