Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 15:33

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



How to fix GuildDirector

Discussion on How to fix GuildDirector within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2008
Posts: 12
Received Thanks: 0
How to fix GuildDirector

I have two problems a Guild Leader can make xxx Deputy Leader's and the next one to make a guild cost 1kk CPs I want to change 1kk Silver..

Code:
#region GuildDirector
                            case 10003:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Hello there. Do you want to create a new guild? You need level 90 and 1,000,000 ConquerPoints and you have to not belong to any guild. If you are a guild leader, then you can name 5 deputy leaders.");
                                                dialog.Option("Create guild.", 1);
                                                dialog.Option("Name deputy leader.", 3);
                                                //dialog.Option("Weird  Named Deputy leader.", 16);
                                                dialog.Option("Move leadership.", 6);
                                                dialog.Option("Disband guild.", 9);
                                                //dialog.Option("Remove ins From my items.", 15);
                                                dialog.Option("I don't have that.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        default:
                                            {
                                                var member = client.Guild.Members.Values.Where(x => x.Name.StartsWith("~")).OrderBy(z => z.ID).ToArray()[npcRequest.OptionID - 100];
                                                if (member.Rank != Conquer_Online_Server.Game.Enums.GuildMemberRank.Member)
                                                {
                                                    dialog.Text("You cannot promote this member anymore.");
                                                    dialog.Option("Ah, nevermind.", 255);
                                                    dialog.Send();
                                                    return;
                                                }
                                                else
                                                {
                                                    member.Rank = Conquer_Online_Server.Game.Enums.GuildMemberRank.DeputyLeader;
                                                    if (member.IsOnline)
                                                    {
                                                        client.Guild.SendGuild(member.Client);
                                                        member.Client.Entity.GuildRank = (ushort)member.Rank;
                                                        member.Client.Screen.FullWipe();
                                                        member.Client.Screen.Reload(null);
                                                    }
                                                    dialog.Text("You have prometed " + member.Name + "to be a DeputyLeader");
                                                    dialog.Option("cool!", 255);
                                                    dialog.Send();
                                                    client.Guild.DeputyLeaderCount++;
                                                    Database.EntityTable.UpdateGuildRank(member.ID, member.Rank);
                                                }
                                                break;
                                            }
                                        case 16:
                                            {
                                                if (client.Guild != null && client.AsMember.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                                {
                                                    var invchar = client.Guild.Members.Values.Where(x => x.Name.StartsWith("~")).OrderBy(z => z.ID).ToArray();
                                                    if (invchar.Length == 0)
                                                    {
                                                        dialog.Text("You don't have any members that start with weird char!.");
                                                        dialog.Option("Ahh.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("choose one!.");
                                                        for (int i = 0; i < invchar.Length; i++)
                                                        {
                                                            dialog.Option(invchar[i].Name, (byte)(100 + i));
                                                        }
                                                        dialog.Send();
                                                    }

                                                }
                                                else
                                                {
                                                    dialog.Text("You don't meet the requierments.");
                                                    dialog.Option("Ahh.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 15:
                                            {
                                                if (client.Guild != null)
                                                {
                                                    dialog.Text("Sorry you Already in guild i cant help you, need to Quit so i can help You.");
                                                    dialog.Option("Ahh.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    //Conquer_Online_Server.Database.ConquerItemTable.deleteallguildins(client);
                                                    dialog.Text("Congratulations, all your items is back to normal status again, Now you need to Relog!");
                                                    dialog.Option("Thanks, i'll relog.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 9:
                                            {
                                                if (client.Guild != null && client.AsMember.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                                {
                                                    dialog.Text("Are you sure you want to disband your guild?");
                                                    dialog.Option("Yes.", 10);
                                                    dialog.Option("Ah, nevermind.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't meet the requierments.");
                                                    dialog.Option("Ahh.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 10:
                                            {
                                                if (client.Guild != null && client.AsMember.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                                {
                                                    client.Guild.Disband();
                                                }
                                                break;
                                            }
                                        case 6:
                                            {
                                                if (client.Guild != null && client.AsMember.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                                {
                                                    dialog.Text("Input here the member name you want to promote as guild leader.");
                                                    dialog.Input("Here:", 7, 16);
                                                    dialog.Option("Ah, nevermind.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't meet the requierments.");
                                                    dialog.Option("Ahh.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 7:
                                            {
                                                if (client.Guild != null && client.AsMember.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                                {
                                                    if (npcRequest.Input != "")
                                                    {
                                                        string lookingFor = npcRequest.Input.Replace(" ", "").Replace("~", "");
                                                        var member = client.Guild.Members.Values.FirstOrDefault((p) => p.Name.Replace(" ", "").Replace("~", "") == lookingFor);

                                                        if (member == null)
                                                        {
                                                            dialog.Text("There is no such member in your guild.");
                                                            dialog.Option("Ah, nevermind.", 255);
                                                            dialog.Send();
                                                            return;
                                                        }
                                                        else
                                                        {
                                                            if (member.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                                            {
                                                                dialog.Text("You cannot promote this member anymore.");
                                                                dialog.Option("Ah, nevermind.", 255);
                                                                dialog.Send();
                                                                return;
                                                            }
                                                            else
                                                            {
                                                                client.Entity.GuildBattlePower = 0;
                                                                client.AsMember.Rank = member.Rank;
                                                                EntityTable.UpdateGuildRank(client.Entity.UID, member.Rank);
                                                                member.Rank = Game.Enums.GuildMemberRank.GuildLeader;
                                                                EntityTable.UpdateGuildRank(member.ID, member.Rank);
                                                                if (member.IsOnline)
                                                                {
                                                                    var memberClient = member.Client;
                                                                    member.Client.Entity.GuildBattlePower = 0;
                                                                    memberClient.Entity.GuildRank = (ushort)member.Rank;
                                                                    memberClient.Screen.FullWipe();
                                                                    memberClient.Screen.Reload(null);
                                                                    memberClient.Guild.SendGuild(memberClient);
                                                                }
                                                                client.Entity.GuildRank = (ushort)client.AsMember.Rank;
                                                                client.Screen.FullWipe();
                                                                client.Screen.Reload(null);
                                                                client.Guild.SendGuild(client);
                                                                client.Guild.GetMaxSharedBattlepower(true);
                                                            }
                                                        }
                                                    }
                                                }
                                                break;
                                            }
                                        case 3:
                                            {
                                                if (client.Guild != null && client.AsMember.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                                {
                                                    dialog.Text("You have now " + client.Guild.DeputyLeaderCount + " named deupty leaders.");
                                                    if (client.Guild.DeputyLeaderCount == 8)
                                                    {
                                                        dialog.Text("You cannot name any other deupty leader.");
                                                        dialog.Option("Ah, nevermind.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("Input here the member name you want to promote as deputy leader.");
                                                        dialog.Input("Here:", 4, 16);
                                                        dialog.Option("Ah, nevermind.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't meet the requierments.");
                                                    dialog.Option("Ahh.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 4:
                                            {
                                                if (client.Guild != null && client.AsMember.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                                {
                                                    if (npcRequest.Input != "")
                                                    {
                                                        string lookingFor = npcRequest.Input.Replace(" ", "~");
                                                        var member = client.Guild.Members.Values.FirstOrDefault((p) => p.Name == lookingFor);

                                                        if (member == null)
                                                        {
                                                            dialog.Text("There is no such member in your guild.");
                                                            dialog.Option("Ah, nevermind.", 255);
                                                            dialog.Send();
                                                            return;
                                                        }
                                                        else
                                                        {
                                                            if (member.Rank != Conquer_Online_Server.Game.Enums.GuildMemberRank.Member)
                                                            {
                                                                dialog.Text("You cannot promote this member anymore.");
                                                                dialog.Option("Ah, nevermind.", 255);
                                                                dialog.Send();
                                                                return;
                                                            }
                                                            else
                                                            {
                                                                member.Rank = Conquer_Online_Server.Game.Enums.GuildMemberRank.DeputyLeader;
                                                                if (member.IsOnline)
                                                                {
                                                                    client.Guild.SendGuild(member.Client);
                                                                    member.Client.Entity.GuildRank = (ushort)member.Rank;
                                                                    member.Client.Screen.FullWipe();
                                                                    member.Client.Screen.Reload(null);
                                                                    member.Client.Entity.GuildBattlePower = member.Guild.GetSharedBattlepower(member.Rank);
                                                                }
                                                                client.Guild.DeputyLeaderCount++;
                                                            }
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("Please input the name of the person you want to Deputilize.");
                                                        dialog.Option("Ah, Ok.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You are not the guild leader of the current guild you are in.");
                                                    dialog.Option("Ah, Ok.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.Guild == null && client.Entity.Level >= 90 && client.Entity.Money >= 500000)
                                                {
                                                    dialog.Text("Name your guild. The name must have less than 16 characters of any type.");
                                                    dialog.Input("Here:", 2, 16);
                                                    dialog.Option("Ah, nevermind.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't meet the requierments.");
                                                    dialog.Option("Ahh.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.Guild == null && client.Entity.Level >= 90 && client.Entity.ConquerPoints >= 1000000)
                                                {
                                                    if (npcRequest.Input != "" && npcRequest.Input.Length > 3 && npcRequest.Input.Length < 16)
                                                    {
                                                        if (!Guild.CheckNameExist(npcRequest.Input))
                                                        {
                                                            
                                                            client.Entity.ConquerPoints -= 1000000;
                                                            Guild guild = new Guild(client.Entity.Name);
                                                            guild.ID = Guild.GuildCounter.Next;
                                                            guild.SilverFund = 1000000;
                                                            client.AsMember = new Conquer_Online_Server.Game.ConquerStructures.Society.Guild.Member(guild.ID)
                                                            {
                                                                SilverDonation = 1000000,
                                                                ID = client.Entity.UID,
                                                                Level = client.Entity.Level,
                                                                Name = client.Entity.Name,
                                                                Rank = Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader,
                                                            };
                                                            if (client.NobilityInformation != null)
                                                            {
                                                                client.AsMember.Gender = client.NobilityInformation.Gender;
                                                                client.AsMember.NobilityRank = client.NobilityInformation.Rank;
                                                            }

                                                            client.Entity.GuildID = (ushort)guild.ID;
                                                            client.Entity.GuildRank = (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader;
                                                            guild.Leader = client.AsMember;
                                                            client.Guild = guild;
                                                            guild.Create(npcRequest.Input);
                                                            guild.Name = npcRequest.Input;
                                                            guild.MemberCount++;
                                                            guild.SendGuild(client);
                                                            guild.SendName(client);
                                                            Database.GuildArsenalTable.Insert(guild.ID);
                                                            client.Screen.FullWipe();
                                                            client.Screen.Reload(null);
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("There is a Guild Already with this Name i'm sorry.");
                                                            dialog.Option("Choose another Name", 1);
                                                            dialog.Option("Ok Sorry.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion
blablabla148 is offline  
Old 01/08/2014, 22:58   #2
 
elite*gold: 0
Join Date: Mar 2007
Posts: 155
Received Thanks: 31
To change the CPs to Money, replace your 'case2' with the code below

PHP Code:
                       case 2:
                                            {
                                                if (
client.Guild == null && client.Entity.Level >= 90 && client.Entity.Money >= 1000000)
                                                {
                                                    if (
npcRequest.Input != "" && npcRequest.Input.Length && npcRequest.Input.Length 16)
                                                    {
                                                        if (!
Guild.CheckNameExist(npcRequest.Input))
                                                        {
                                                            
                                                            
client.Entity.Money -= 1000000;
                                                            
Guild guild = new Guild(client.Entity.Name);
                                                            
guild.ID Guild.GuildCounter.Next;
                                                            
guild.SilverFund 1000000;
                                                            
client.AsMember = new Conquer_Online_Server.Game.ConquerStructures.Society.Guild.Member(guild.ID)
                                                            {
                                                                
SilverDonation 1000000,
                                                                
ID client.Entity.UID,
                                                                
Level client.Entity.Level,
                                                                
Name client.Entity.Name,
                                                                
Rank Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader,
                                                            };
                                                            if (
client.NobilityInformation != null)
                                                            {
                                                                
client.AsMember.Gender client.NobilityInformation.Gender;
                                                                
client.AsMember.NobilityRank client.NobilityInformation.Rank;
                                                            }

                                                            
client.Entity.GuildID = (ushort)guild.ID;
                                                            
client.Entity.GuildRank = (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader;
                                                            
guild.Leader client.AsMember;
                                                            
client.Guild guild;
                                                            
guild.Create(npcRequest.Input);
                                                            
guild.Name npcRequest.Input;
                                                            
guild.MemberCount++;
                                                            
guild.SendGuild(client);
                                                            
guild.SendName(client);
                                                            
Database.GuildArsenalTable.Insert(guild.ID);
                                                            
client.Screen.FullWipe();
                                                            
client.Screen.Reload(null);
                                                        }
                                                        else
                                                        {
                                                            
dialog.Text("There is a Guild Already with this Name i'm sorry.");
                                                            
dialog.Option("Choose another Name"1);
                                                            
dialog.Option("Ok Sorry."255);
                                                            
dialog.Send();
                                                        }
                                                    }
                                                }
                                                break;
                                            } 
And your DeputyCount:
Look for this in your code:
PHP Code:
if (client.Guild.DeputyLeaderCount == 8
and change the '8' to the number of Deputyleaders you want as maximum
bashondegek is offline  
Thanks
1 User
Old 01/08/2014, 23:09   #3
 
elite*gold: 0
Join Date: May 2008
Posts: 12
Received Thanks: 0
Thanks :-)))
blablabla148 is offline  
Old 01/08/2014, 23:12   #4
 
elite*gold: 0
Join Date: Mar 2007
Posts: 155
Received Thanks: 31
You are welcome.
bashondegek is offline  
Reply


Similar Threads Similar Threads
[Help] CoEmu v2 GuildDirector
10/11/2009 - CO2 Private Server - 6 Replies
Well, I've looked all over... I tried to make this NPC on my own but I'm still a novice at C#. This is as far as I got on my own. I'm trying to make the Create Guild function... #region GuildDirector case 10003: { if (LinkBack == 0) { Text("Greetings! I am the guild director, in charge of administrating and managing guilds. What business do you have with me?", CSocket);
[npc help]GuildDirector code and Guild war ??help
08/06/2009 - CO2 Private Server - 2 Replies
GuildDirector code and Guild war ??help :confused:
[Help]Can't get GuildDirector to work
09/22/2008 - CO2 Private Server - 5 Replies
Source Base: LOTF Source Version: TCWNN v1.0 First off let me start by saying I have tried to the best of my (very noobish) abilities to get the GD to work. I have fixed the values in the dialogues so that they are directing to the proper replies of the choices. At first I was under the impression that I was able to edit the source using solely Notepad, which seemed to be able to read the .cs files fine. I was even convinced that my change to the DB Drop Rates was working. But I was then...
[REQUEST]GuildDirector NPC
07/25/2008 - Conquer Online 2 - 0 Replies
Can someone help me get the box to pop up on the GuildDirector Can someone help me out? xD



All times are GMT +1. The time now is 15:33.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.