|
المشاركات 1,993 |
+التقييم 1.00 |
تاريخ التسجيل Jun 2019 |
الاقامة |
نظام التشغيل |
رقم العضوية 279 |
#region GuildDirector
case 10003:
#region GuildDirector
case 10003:
{
dialog.Avatar(7);
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("Greetings! I am the guild director, in charge of administrating and managing guilds. What business do you have with me?");
dialog.Text("Guild leaders can post up a guild recruitment ad to recruit new blood for their guilds! Soldiers without a guild can get the latest guild recruitment information from me, and then find a good guild to join!");
dialog.Option("Create~a~guild", 1);
dialog.Option("Disband~my~guild", 6);
dialog.Option("Inquire~about~a~guild", 4);
dialog.Option("Guild~Recruitment", 3);
dialog.Option("Change~my~Guild`s~name.", 8);
dialog.Option("Union~Operation.", 51);
dialog.Option("Change~my~Union`s~name.", 67);
dialog.Option("Close.", 255);
dialog.Send();
break;
}
case 51:
{
if (client.Union == null && client.Guild != null && client.AsMember.Rank == Enums.GuildMemberRank.GuildLeader && client.Guild.Level >= 1 && client.Entity.ConquerPoints >= 3000)
{
dialog.Text("A great war which involves millions of heroes is about to fire. If you have a Level 9+ Guild ranking Top 8 in Capture the Flag of your server,");
dialog.Text("~you can pay me 3000 CPs to create a Union. It`s time to gather the elites and picture a new world in your hands.");
dialog.Option("Create~a~Union.", 66);
dialog.Option("It`s~time~to~strike!", 0);
dialog.Avatar(7);
dialog.Send();
}
else
{
dialog.Text("Sorry, you don`t have 3,000 CPs or Guild Level 1 or Have Union to create a Union.");
dialog.Option("Hard~times...", 255);
dialog.Avatar(7);
dialog.Send();
}
break;
}
case 67:
{
if (client.Guild != null && client.Union != null && client.Union.LeaderUID == client.Entity.UID && client.AsMember.Rank == Enums.GuildMemberRank.GuildLeader && client.Entity.ConquerPoints >= 3000)
{
client.Entity.ConquerPoints -= 3000;
client.Union.SengGui(client, 6);
}
else
{
dialog.Text("Sorry, you don`t have 3,000 CPs to Change Name Of a Union.");
dialog.Option("Hard~times...", 255);
dialog.Avatar(7);
dialog.Send();
}
break;
}
case 66:
{
client.Entity.ConquerPoints -= 3000;
client.Send(new Data(true) { UID = client.Entity.UID, ID = Data.OpenWindow, dwParam = 693, wParam1 = client.Entity.X, wParam2 = client.Entity.Y });
break;
}
case 1:
{
if (client.Entity.Level < 90)
{
dialog.Text("Sorry,~you~cannot~create~a~guild~before~you~reach~level~90.~Please~train~harder.");
dialog.Option("I~see.", 255);
dialog.Send();
}
else if (client.Entity.Money < 1000000)
{
dialog.Text("To~create~a~guild,~1,000,000~silver~will~be~charged.~You~do~not~have~the~required~money.");
dialog.Option("I~see.", 255);
dialog.Send();
}
else
{
dialog.Text("What~would~you~like~to~name~your~guild?~A~good~name~is~better~than~great~riches.");
dialog.Input("I name my guild...", 2, 16);
dialog.Option("Let~me~think~it~over.", 255);
dialog.Send();
}
break;
}
case 2:
{
if (client.Guild != null) return;
if (client.Guild == null && client.Entity.Level >= 90 && client.Entity.Money >= 1000000)
{
if (npcRequest.Input != "" && npcRequest.Input.Length > 3 && 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 Game.ConquerStructures.Society.Guild.Member(guild.ID)
{
ID = client.Entity.UID,
Level = client.Entity.Level,
Name = client.Entity.Name,
Rank = ElSaher.Game.Enums.GuildMemberRank.GuildLeader,
};
Database.EntityTable.SaveGuildID(client, guild.ID);
Database.EntityTable.SaveGuildR(client, 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)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);
client.Screen.FullWipe();
client.Screen.Reload(null);
new Database.MySqlCommand(Database.MySqlCommandType.UPDATE).Update("configuration").Set("GuildID", Game.ConquerStructures.Society.Guild.GuildCounter.Now).Where("Server", Constants.ServerName).Execute();
}
else
{
client.Send(new Message("This Guild name cannot be used.", System.Drawing.Color.Red, Message.System));
}
}
}
break;
}
case 3:
{
Data data = new Data(true);
data.UID = client.Entity.UID;
data.ID = Data.OpenCustom;
data.dwParam = Data.CustomCommands.Advertise;
client.Send(data);
break;
}
case 4:
{
dialog.Text("Which~guild~would~you~like~to~inquire~about?");
dialog.Input("I wnat to inquire about -", 5, 16);
dialog.Option("Let~me~think~it~over.", 255);
dialog.Send();
break;
}
case 5:
{
if (!Guild.CheckNameExist(npcRequest.Input))
{
dialog.Text("This~guild~does~not~exist.");
dialog.Option("Thanks.", 255);
dialog.Send();
}
else
{
var selectedguild = Kernel.Guilds.Values.Where(p => p.Name == npcRequest.Input).FirstOrDefault();
if (selectedguild != null)
{
dialog.Text(" Guild~Name: " + selectedguild.Name + ";");
dialog.Text(" Guild~Leader: " + selectedguild.LeaderName + ";");
dialog.Text(" Guild~Members: " + selectedguild.MemberCount + ";");
dialog.Text(" Guild~Fund: " + selectedguild.SilverFund + ";");
dialog.Option("I see.", 255);
dialog.Send();
}
}
break;
}
case 6:
{
dialog.Text("Disbanding your guild is a decision not to be taken lightly. When armies fall apart, a period of chaos ensues?");
dialog.Option("I~decide~to~disband..", 7);
dialog.Option("I~changed~my~mind.", 255);
dialog.Send();
break;
}
case 7:
{
if (client.Guild != null && client.AsMember.Rank == Game.Enums.GuildMemberRank.GuildLeader)
{
client.Guild.Disband();
}
else if (client.Guild == null)
{
client.MessageBox("You haven't joined any guild now.", null, null, 0);
}
break;
}
case 8:
{
dialog.Text("Only the Guild Leader can change the Guild`s name, which will take effect after the server maintenance on the second day. It`ll cost you 1075 CPs. Deal?");
dialog.Option("Deal!", 9);
dialog.Option("Wait~a~minute.", 255);
break;
}
case 9:
{
dialog.Text("Please enter a new name for your Guild.");
dialog.Input("Name:", 10, 16);
dialog.Option("Cancel.", 255);
break;
}
case 10:
{
if (client.Guild == null || client.AsMember.Rank != Enums.GuildMemberRank.GuildLeader)
{
dialog.Text("Sorry, you`re not the Guild Leader.");
dialog.Option("My~bad.", 255);
}
else if (client.Entity.ConquerPoints < 1075)
{
dialog.Text("Sorry, you don`t have enough CPs.");
dialog.Option("My~bad.", 255);
}
else if (client.Guild != null && client.AsMember.Rank == Enums.GuildMemberRank.GuildLeader && client.Entity.ConquerPoints >= 1075)
{
if (npcRequest.Input != "" && npcRequest.Input.Length > 3 && npcRequest.Input.Length < 16)
{
if (!Guild.CheckNameExist(npcRequest.Input))
{
Database.GuildTable.ChangeName(client, npcRequest.Input);
client.Guild.Name = npcRequest.Input;
client.Guild.SendGuild(client);
client.Guild.SendName(client);
client.Entity.ConquerPoints -= 1075;
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", 9);
dialog.Option("Ok Sorry.", 255);
dialog.Send();
}
}
else
{
dialog.Text("There is a Guild bad Name i'm sorry.");
dialog.Option("Try Again", 9);
dialog.Option("Ok Sorry.", 255);
dialog.Send();
}
}
break;
}
}
break;
}
#endregion
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
أدوات الموضوع | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
حل مشكلة الوحوش مش بيندرب فيها وا بيجيلك ايرور في القنصل الحل هنا | ElSaher | تطوير سيرفرات كونكر | 20 | 2024-08-29 09:11 AM |
مشكلة رخمه واحتارت فيها ومحتاج حل | KekoCoder | تطوير سيرفرات كونكر | 0 | 2021-08-06 07:18 PM |
بعد ازن الناس المحترمه عاوز حل مشكلة سورس Venta3D | toteo3344 | مشكلات السيرفيرات كونكر الشخصيه | 3 | 2020-04-12 06:11 PM |
مشكلة في الجيلدات | ElSaher | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2020-02-02 05:56 AM |
حل مشكلة الناس الي بدخل الارينا في الكويستات | Alaa Ghanem | تطوير سيرفرات كونكر | 2 | 2019-12-11 04:52 PM |