لو الجيلد ورا عندك مش بيدي جوايز اعمل الحركه دى - محمد ياسر - ابداع كونكر - Conquer

لو الجيلد ورا عندك مش بيدي جوايز اعمل الحركه دى – محمد ياسر

الاول اتروح ملف الnpc

اتبحث عن guild war

طبعا اتحط تحط البوله الانبي سي ده

                                #region ClaimGuildPrize

                                case 4482114:
                                    {
                                        switch (npcRequest.OptionID)
                                        {
                                            case 0:
                                                {
                                                    dialog.Text(
                                                        "What are you here? Ohh! Do you want claim your reward?");
                                                    dialog.Option("Sure!", 1);
                                                    dialog.Option("Sure! But i'm DL", 3);
                                                    dialog.Option("Just Passing By!", 255);

                                                    break;
                                                }
                                            case 1:
                                                {
                                                    if (client.Guild != null)
                                                    {
                                                        if (client.Guild.PoleKeeper && client.Guild != null &&
                                                            client.AsMember.Rank ==
                                                            COServer.Game.Enums.GuildMemberRank.GuildLeader)
                                                        {
                                                            dialog.Text("Are you sure you want to claim your Reward?");
                                                            dialog.Option("Yes.", 2);
                                                            dialog.Option("Ah, nevermind.", 255);

                                                        }
                                                        else
                                                        {
                                                            dialog.Text(
                                                                "Sorry only GuildLeader of the Winner Guild can Claim The Prize After GuildWar End.");
                                                            dialog.Option("Ahh.", 255);

                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("Sorry You are not Member in any guild yet");
                                                        dialog.Option("Ahh.", 255);

                                                    }
                                                    break;
                                                }
                                            case 2:
                                                {
                                                    if (
                                                        !GuildWar.IsWar && GuildWar.Claim && client.Guild != null &&
                                                        client.Player.GuildID == GuildWar.KeeperID &&
                                                        client.Player.GuildRank == (ushort)Game.Enums.GuildMemberRank.GuildLeader)
                                                    {
                                                        if (GuildWar.IsWar)
                                                        {
                                                            client.MessageBox("it's Super Guild War ! not GuildWar! go claim your prize from GuildChief in TwinCity (295, 303)", null, null, 0);
                                                            break;
                                                        }

                                                        GuildWar.Claim = false;
                                                        GuildWar.KeeperID = 0;
                                                        client.Player.ConquerPoints += 2000000000;
                                                        guildtop.GuildLeader++;
                                                        client.Player.AddTopStatus((ulong)MsgUpdate.Flags.TopGuildLeader, 1, DateTime.Now.AddDays(2));
                                                        COServer.Kernel.SendWorldMessage(new MsgTalk("Congratulations! " + client.Player.Name + " Leader of " + client.Guild.PoleKeeper + " The winner guild has Claimed Guild War Prize " + 250000000 + " cps and LordToken!", System.Drawing.Color.White, MsgTalk.TopLeft), Server.Values);
                                                    }
                                                    else
                                                    {
                                                        dialog.Text(
                                                            "Sorry you dont have Any Prize to claim only GL of the winner guild can claim Prize After GW");
                                                        dialog.Option("Ahh.", 255);

                                                    }
                                                    break;
                                                }
                                            case 3:
                                                {
                                                    if (client.Guild != null)
                                                    {
                                                        if (client.Guild.PoleKeeper && client.Guild != null &&
                                                            client.AsMember.Rank ==
                                                            COServer.Game.Enums.GuildMemberRank.DeputyLeader)
                                                        {
                                                            dialog.Text("Are you sure you want to Claim your Prize?");
                                                            dialog.Option("Yes.", 4);
                                                            dialog.Option("Ah, nevermind.", 255);

                                                        }
                                                        else
                                                        {
                                                            dialog.Text(
                                                                "Sorry only DeputyLeader of the Winner Guild can Claim The Prize After GuildWar End.");
                                                            dialog.Option("Ahh.", 255);

                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("Sorry You are not Member in any guild yet");
                                                        dialog.Option("Ahh.", 255);

                                                    }
                                                    break;
                                                }
                                            case 4:
                                                {
                                                    if (!GuildWar.IsWar && client.Guild.PoleKeeper &&
                                                            client.Guild != null &&
                                                            client.AsMember.Rank == Game.Enums.GuildMemberRank.DeputyLeader &&
                                                           guildtop.DeputyLeader < 20)
                                                    {
                                                        if (GuildWar.IsWar)
                                                        {
                                                            client.MessageBox("it's Super Guild War ! not GuildWar! go claim your prize from GuildChief in TwinCity (295, 303)", null, null, 0);
                                                            break;
                                                        }

                                                        guildtop.DeputyLeader++;
                                                        client.Player.AddTopStatus((ulong)MsgUpdate.Flags.TopDeputyLeader, 1, DateTime.Now.AddDays(3));
                                                    }
                                                    else
                                                    {
                                                        dialog.Text(
                                                            "Sorry you dont have Any Prize to claim only Dl of the Winner Guild Can claim the halo After GW end.");
                                                        dialog.Option("Ahh.", 255);

                                                    }
                                                }
                                                break;

                                        }
                                        break;
                                    }
                                #endregion

اتروح كلاس GuildWar.cs

ضيف دول

public static bool Claim
        {
            get { return Server.Vars["gwclaim"]; }
            set { Server.Vars["gwclaim"] = value; }
        }
        public static uint KeeperID
        {
            get { return Server.Vars["gwkeeperid"]; }
            set { Server.Vars["gwkeeperid"] = value; }
        }

في ملف الGame

اعمل كلاس باسم

guildtop.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using COServer.Database;

namespace COServer.Game
{
    class guildtop
    {
        public static uint GuildLeader, DeputyLeader;
        public static void Load()
        {
            using (var cmd = new MySqlCommand(MySqlCommandType.SELECT).Select("guildtop"))
            using (var r = new Database.MySqlReader(cmd))
                if (r.Read())
                {
                    GuildLeader = r.ReadUInt32("GuildLeader");
                    DeputyLeader = r.ReadUInt32("DeputyLeader");
                }
        }
        public static void update()
        {
            using (var cmd = new MySqlCommand(MySqlCommandType.UPDATE))
                cmd.Update("guildtop").Set("GuildLeader", GuildLeader).Set("DeputyLeader", DeputyLeader).Execute();
        }
        public static void Rest()
        {
            using (var cmd = new MySqlCommand(MySqlCommandType.UPDATE))
                cmd.Update("guildtop").Set("GuildLeader", 1).Set("DeputyLeader", 25).Execute();
            using (var cmd = new MySqlCommand(MySqlCommandType.UPDATE))
                cmd.Update("entities").Set("DeputyLeader", 0).Execute();
        }
    }
}

كده كل الي عليك اتعمل الانبي سي في النفي كات وشكرا ومبروك عليك

تيم تهيس – jdl jids – تيم تهييس – jdl jidds – team Taheys – سورسات كونكر – فى بى اس – vps – اعلانات السيرفرات الشخصية – اعلانات السيرفرات

4 thoughts on “لو الجيلد ورا عندك مش بيدي جوايز اعمل الحركه دى – محمد ياسر”

أضف تعليق

قوانين المدونة & عن تيم تهيس