Results 1 to 2 of 2
-
14-08-20, 10:14 AM #1Graphics Guru



- Join Date
- Feb 2009
- Posts
- 1,377
- Rep Power
- 24
- Reputation
- 382
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.
-
10-01-23, 08:07 AM #2Beginner

- Join Date
- Jan 2023
- Posts
- 2
- Rep Power
- 4
- Reputation
- 1
Register to remove this adIs there a way to have multiple entries, 1 for each faction?



Wise
Reply With Quote






