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


MMOCoin

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

    Join Date
    Feb 2009
    Posts
    1,376
    Post Thanks / Like
    Rep Power
    19
    Reputation
    371

    Post Starting Guild for the new Character


    Register to remove this ad
    If activated, when some player is created, this script will add the player to a guild.
    You'll need these options in your worldserver.conf file:



    Code:
    ###################################################################################################
    # STARTING GUILD
    #
    # These settings control the Starting Guild functionality
    #
    #    StartingGuild.Enable
    #        Description: Enables or Disables the Starting Guild functionality.
    #        Default:     0 - (Disabled)
    #                     1 - (Enabled)
    
    
    StartingGuild.Enable = 0
    
    
    #
    #    StartingGuild.GuildID
    #        Description: The identifier (ID) of the Guild. It must be an integer number
    #        Default:     1
    
    
    StartingGuild.GuildID = 1
    
    
    #
    ###################################################################################################
    Code:
    /*
    Made by: Erictemponi
    */
    
    #include "ScriptMgr.h"
    #include "Config.h"
    #include "Guild.h"
    #include "GuildMgr.h"
    
    class StartingGuildScript : public PlayerScript
    {
        public:
            StartingGuildScript() : PlayerScript("StartingGuildScript") { }
    
            // called when some player is created
            void OnCreate(Player* pPlayer)
            {
                if (sConfigMgr->GetBoolDefault("StartingGuild.Enable", false))
                {
                    uint32 guildID = sConfigMgr->GetIntDefault("StartingGuild.GuildID", 1);
                    Guild* targetGuild = sGuildMgr->GetGuildById(guildID);
                    if (targetGuild)
                    {
                        ObjectGuid playerGuid = pPlayer->GetGUID();
                        // player's guild membership checked in AddMember before add
                        CharacterDatabaseTransaction trans(nullptr);
                        targetGuild->AddMember(trans, playerGuid);
                    }
                }
            }
    };
    
    void AddSC_starting_guild()
    {
        new StartingGuildScript();
    }

    Credits:


    • LordPsyan old patch
    • Erictemponi for this newest one.



    › See More: Starting Guild for the new Character



  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
    Jan 2023
    Posts
    2
    Post Thanks / Like
    Rep Power
    1
    Reputation
    1

    Register to remove this ad
    Is there a way to have multiple entries, 1 for each faction?

 

 

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 09:17 PM.
Powered by vBulletin® Copyright ©2000-2023, Jelsoft Enterprises Ltd.
See More links by ForumSetup.net. Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2023 DragonByte Technologies Ltd.
vBulletin Licensed to: MMOPro.org