قديم 2019-07-12, 06:14 PM
المشاركة 13
saeed
.:: عضو جديد ::.
  • غير متواجد
افتراضي رد: Quest TreasureBox
عفواً لايمكن عرض الرابط إلا بعد الرد على الموضوع
عدل على الرقم دا باللى انت عاوزه

كود:
 client.player.conquerpoints += 100000
وعلى فكرة اللى قاله حازم صح بس دا تكملة للى قاله حازم مش أكتر ...
وياريت ترد تقولنا المشكلة اتحلت ولا لا

قديم 2019-07-12, 06:16 PM
المشاركة 14
Rider
.:: عضو خبير ::.
  • غير متواجد
افتراضي رد: Quest TreasureBox
عفواً لايمكن عرض الرابط إلا بعد الرد على الموضوع
طيب لما بفتح الصنديق كلها بتدينى سبس عالى انا عاوز السبس يكون صعب علشان السرفر انا عملو صعب يريت يكون من 100 سبس الى 2000 سبس الى يجيى فى الصنديق كلها اعمل اية علشان يحصل كدة ؟
ف تريجر بوكس حط الكود ده بدل الي عندك و متنساش تعدل علي الريورد
كود بلغة HTML:
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using Mr_Panda.Client;
using Mr_Panda.Interfaces;
using Mr_Panda.Network.GamePackets;


namespace Mr_Panda.Game
{
    public class TreasureBox
    {
        static Map Map = Kernel.Maps[3820];
        const int MAX_BOXES = 20, ITEMS = 1000, CPSMoney = 1001, LEVEL = 1002, DEATH = 1003, STUN = 1004, KICK = 1005;
        static int CurrentBoxes = 0;
        static Mr_Panda.Interfaces.INpc npc;
        static ushort tempX, tempY = 0;
        static uint BaseId = 101002;
        static List<Point> VaildOnes = new List<Point>();
        public static bool OnGoing;

        public static void Generate()
        {
            try
            {
                if (CurrentBoxes < MAX_BOXES)
                {
                    if (Map == null)
                    {
                        Map = Kernel.Maps[3820];
                        return;
                    }
                    tempX = (ushort)Kernel.Random.Next(0, Map.Floor.Bounds.Width);
                    tempY = (ushort)Kernel.Random.Next(0, Map.Floor.Bounds.Height);
                    if (Map.Floor[tempX, tempY, MapObjectType.Item, null])
                    {
                        npc = new Network.GamePackets.NpcSpawn();
                        npc.UID = BaseId++;
                        npc.Mesh = (ushort)Kernel.RandFromGivingNums(9307, 9277, 9267, 9287, 9287, 9287 ,9257, 9257, 9257, 9257, 9257, 9257, 9307, 9307, 9307, 9307, 9307, 9277, 9267, 9267, 9267, 9277, 9277, 9277, 9277, 9277);
                        npc.Type = Enums.NpcType.Talker;
                        npc.MapID = Map.ID;
                        npc.X = tempX;
                        npc.Y = tempY;

                        Map.AddNpc(npc);
                        CurrentBoxes++;
                        Kernel.SendWorldMessage(new Message("A new treasure box appeared!", Color.Red, 2012));
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
            }

        }

        public static void Reward(GameState client)
        {
            client.Player.CurrentTreasureBoxes++;
            var orders = Kernel.GamePool.Values.OrderByDescending(x => x.Player.CurrentTreasureBoxes).ToArray();
            for (int i = 0; i < orders.Length + 1; i++)
            {
                if (i == 11) break;
                Message msg;

                if (i == 0)
                {
                    msg = new Message("", System.Drawing.Color.Red, Message.FirstRightCorner);
                }
                else
                {
                    if (orders[i - 1].Player.CurrentTreasureBoxes == 0) continue;
                    msg = new Message("No " + i.ToString() + "- " + orders[i - 1].Player.Name + " Opened " + orders[i - 1].Player.CurrentTreasureBoxes.ToString() + " Boxes!", System.Drawing.Color.Red, Message.ContinueRightCorner);
                }

                Kernel.SendWorldMessage(msg, Program.GamePool, (ushort)3820);
            }

            int prize = 0;

            if (client.Player.Level <= 135)
                prize = Kernel.RandFromGivingNums(ITEMS, CPSMoney, KICK, ITEMS, CPSMoney, ITEMS, CPSMoney, DEATH);
            else prize = Kernel.RandFromGivingNums(ITEMS, CPSMoney, KICK, ITEMS, CPSMoney, ITEMS, CPSMoney, DEATH);
            //#warning TREASURE BOX PRIZE
            switch (prize)
            {
                case CPSMoney:
                    {
                        uint amount = (uint)Kernel.Random.Next(100,2000);
                        if (amount <= 2000)
                        {
                            client.Player.ConquerPoints += amount;
                            Kernel.SendWorldMessage(new Message(client.Player.Name + " got " + amount.ToString() + " CPs while opening the TreasureBox!", Color.White, Message.Talk));
                        }
                        break;
                    }
                case ITEMS:
                    {
                        Database.ConquerItemBaseInformation temp;
                        uint itemid = (uint)Kernel.RandFromGivingNums(188755, 192935, 192775, 187405, 188105, 188705, 188945, 188515, 192825, 200220, 187855, 200475, 187405, 187415, 187425, 3004124, 183325, 183495, 184305, 184315, 184375, 187305, 187315, 181395, 184405, 184365);
                        client.Inventory.Add(itemid, 0, 1);
                        Database.ConquerItemInformation.BaseInformations.TryGetValue(itemid, out temp);
                        Kernel.SendWorldMessage(new Message(client.Player.Name + " got " + temp.Name + " while opening the TreasureBox!", Color.White, Message.Talk));
                        break;
                    }
                case KICK:
                    {
                        client.Player.Teleport(1002, 338, 345);
                        Kernel.SendWorldMessage(new Message(client.Player.Name + " got KICKED-OUT! while opening the TreasureBox!", Color.White, Message.Talk));
                        break;
                    }
                case DEATH:
                    {
                        client.Player.Die(client.Player);
                        Kernel.SendWorldMessage(new Message(client.Player.Name + " got Death! while opening the TreasureBox!", Color.White, Message.Talk));
                        break;
                    }
            }

            CurrentBoxes--;
        
            //client.Entity.TreasuerPoints += 1;
        }
    }
}

قديم 2019-07-12, 06:41 PM
المشاركة 15
osama
.:: عضو مميز ::.
  • غير متواجد
افتراضي رد: Quest TreasureBox
عفواً لايمكن عرض الرابط إلا بعد الرد على الموضوع
ف تريجر بوكس حط الكود ده بدل الي عندك و متنساش تعدل علي الريورد
كود بلغة HTML:
using system;
using system.collections.generic;
using system.drawing;
using system.linq;
using system.text;
using system.threading;
using mr_panda.client;
using mr_panda.interfaces;
using mr_panda.network.gamepackets;


namespace mr_panda.game
{
    public class treasurebox
    {
        static map map = kernel.maps[3820];
        const int max_boxes = 20, items = 1000, cpsmoney = 1001, level = 1002, death = 1003, stun = 1004, kick = 1005;
        static int currentboxes = 0;
        static mr_panda.interfaces.inpc npc;
        static ushort tempx, tempy = 0;
        static uint baseid = 101002;
        static list<point> vaildones = new list<point>();
        public static bool ongoing;

        public static void generate()
        {
            try
            {
                if (currentboxes < max_boxes)
                {
                    if (map == null)
                    {
                        map = kernel.maps[3820];
                        return;
                    }
                    tempx = (ushort)kernel.random.next(0, map.floor.bounds.width);
                    tempy = (ushort)kernel.random.next(0, map.floor.bounds.height);
                    if (map.floor[tempx, tempy, mapobjecttype.item, null])
                    {
                        npc = new network.gamepackets.npcspawn();
                        npc.uid = baseid++;
                        npc.mesh = (ushort)kernel.randfromgivingnums(9307, 9277, 9267, 9287, 9287, 9287 ,9257, 9257, 9257, 9257, 9257, 9257, 9307, 9307, 9307, 9307, 9307, 9277, 9267, 9267, 9267, 9277, 9277, 9277, 9277, 9277);
                        npc.type = enums.npctype.talker;
                        npc.mapid = map.id;
                        npc.x = tempx;
                        npc.y = tempy;

                        map.addnpc(npc);
                        currentboxes++;
                        kernel.sendworldmessage(new message("a new treasure box appeared!", color.red, 2012));
                    }
                }
            }
            catch (exception e)
            {
                console.writeline(e.tostring());
            }

        }

        public static void reward(gamestate client)
        {
            client.player.currenttreasureboxes++;
            var orders = kernel.gamepool.values.orderbydescending(x => x.player.currenttreasureboxes).toarray();
            for (int i = 0; i < orders.length + 1; i++)
            {
                if (i == 11) break;
                message msg;

                if (i == 0)
                {
                    msg = new message("", system.drawing.color.red, message.firstrightcorner);
                }
                else
                {
                    if (orders[i - 1].player.currenttreasureboxes == 0) continue;
                    msg = new message("no " + i.tostring() + "- " + orders[i - 1].player.name + " opened " + orders[i - 1].player.currenttreasureboxes.tostring() + " boxes!", system.drawing.color.red, message.continuerightcorner);
                }

                kernel.sendworldmessage(msg, program.gamepool, (ushort)3820);
            }

            int prize = 0;

            if (client.player.level <= 135)
                prize = kernel.randfromgivingnums(items, cpsmoney, kick, items, cpsmoney, items, cpsmoney, death);
            else prize = kernel.randfromgivingnums(items, cpsmoney, kick, items, cpsmoney, items, cpsmoney, death);
            //#warning treasure box prize
            switch (prize)
            {
                case cpsmoney:
                    {
                        uint amount = (uint)kernel.random.next(100,2000);
                        if (amount <= 2000)
                        {
                            client.player.conquerpoints += amount;
                            kernel.sendworldmessage(new message(client.player.name + " got " + amount.tostring() + " cps while opening the treasurebox!", color.white, message.talk));
                        }
                        break;
                    }
                case items:
                    {
                        database.conqueritembaseinformation temp;
                        uint itemid = (uint)kernel.randfromgivingnums(188755, 192935, 192775, 187405, 188105, 188705, 188945, 188515, 192825, 200220, 187855, 200475, 187405, 187415, 187425, 3004124, 183325, 183495, 184305, 184315, 184375, 187305, 187315, 181395, 184405, 184365);
                        client.inventory.add(itemid, 0, 1);
                        database.conqueriteminformation.baseinformations.trygetvalue(itemid, out temp);
                        kernel.sendworldmessage(new message(client.player.name + " got " + temp.name + " while opening the treasurebox!", color.white, message.talk));
                        break;
                    }
                case kick:
                    {
                        client.player.teleport(1002, 338, 345);
                        kernel.sendworldmessage(new message(client.player.name + " got kicked-out! While opening the treasurebox!", color.white, message.talk));
                        break;
                    }
                case death:
                    {
                        client.player.die(client.player);
                        kernel.sendworldmessage(new message(client.player.name + " got death! While opening the treasurebox!", color.white, message.talk));
                        break;
                    }
            }

            currentboxes--;
        
            //client.entity.treasuerpoints += 1;
        }
    }
}

تم حل المشكلة شكرا جدا على مجهودكو

قديم 2019-07-12, 08:19 PM
المشاركة 16
youssefabdelmanam
.:: عضو نشيط ::.
  • غير متواجد
افتراضي رد: Quest TreasureBox
عفواً لايمكن عرض الرابط إلا بعد الرد على الموضوع
الله ينور جهز موضوعاتك عشان قربنا
وياريت تشارك المنتدى مع الناس للافاده
انا شغال بنشر المنتدي بين جميع الناس عشان كلو يستفاد
وانشاء الله المنتدي دا يكون من افضل المنتديات الي اتعملت
سؤال هو هيتم اعلان بداء المسابقة لما عدد الاعضاء يوصل 400

قديم 2019-07-12, 08:33 PM
المشاركة 17
محمد ياسر
.::صاحب المنتدي قرر الاستغناء عنه::.
  • غير متواجد
افتراضي رد: Quest TreasureBox
ايو المسابقه اتبداء لما يوصل عدد الاعضاء ل400
واتستمر 15 يوم

قديم 2019-07-12, 11:16 PM
المشاركة 18
MHMOUDr6
.:: عضو جديد ::.
  • غير متواجد
افتراضي رد: Quest TreasureBox
جممميل عاش ي غالي


العلامات المرجعية



الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1)
 

الانتقال السريع

المواضيع المتشابهه للموضوع: Quest TreasureBox
الموضوع كاتب الموضوع المنتدى مشاركات آخر مشاركة
Vip Quest محمد ياسر تطوير سيرفرات كونكر 2 2023-07-25 04:42 AM
Creazy War Quest karem010 تطوير سيرفرات كونكر 4 2020-05-12 04:18 PM
طلب خاص مطلوب توب TreasureBox ahmedfathy مشكلات السيرفيرات كونكر الشخصيه 1 2019-11-06 11:54 AM
مشكله بخصوص TreasureBox سمير مشكلات السيرفيرات كونكر الشخصيه 1 2019-10-22 07:16 PM
مشكلة في TreasureBox Avengers-Co مشكلات السيرفيرات كونكر الشخصيه 2 2019-09-03 06:49 PM


الساعة الآن 11:02 PM

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.