Likes: 0
Results 1 to 2 of 2
-
14-08-20, 10:14 AM #1
Starting Guild for the new Character
Register to remove this adIf 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
-
10-01-23, 08:07 AM #2
Register to remove this adIs there a way to have multiple entries, 1 for each faction?
Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread
Visitors found this page by searching for:
Nobody landed on this page from a search engine, yet!
SEO Blog