عرض مشاركة واحدة
احصائياتى

الردود
11

المشاهدات
3783
 
Omar Mohamed100

Omar Mohamed100 is on a distinguished road

    غير متواجد

المشاركات
90

+التقييم
0.05

تاريخ التسجيل
Oct 2019

الاقامة

نظام التشغيل

رقم العضوية
2222
2019-12-05, 01:43 AM
المشاركة 1 
#1  
افتراضي اي حد عنده مشاكل ف رنك كوستة الصناديق يخش هنا
آلسلآم عليكم انهاردة جيبلكم كوستة هيا مش كاملة انا جايبلكم الكلاس بتعها الاصلي الرانك شغال فيه وكل حاجة انشاء الله هتحمل الكلاس وتنقل الي فيه كله بي العندك وانشاء الله كل حاجة هتشتغل تمام
آلكلأس اهو وكلمة شكرآ تكفي <3
المشاكل الي هتقبلك هتبقا عن اسم البروجيكت وحجات بسيطة يعني واكيد هتقدروا تحلوها ولو محدش عرف يحل المشاكل يكلمني هحلهالو بآذن آلله
Omar Mohamed /Facebook

كود:
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using Conquer_Online_Server.Client;
using Conquer_Online_Server.Interfaces;
using Conquer_Online_Server.Network.GamePackets;


namespace 
Conquer_Online_Server.Game
{
    public class 
TreasureBox
    
{
        static 
Map Map Kernel.Maps[3820];
        const 
int MAX_BOXES 16ITEMS 1000CPS 1001LEVEL 1002DEATH 1003STUN 1004KICK 1005Money 1006Disconnect 1007;
        static 
int CurrentBoxes 0;
        static 
Interfaces.INpc npc;
        static 
ushort tempXtempY 0;
        static List<
PointVaildOnes = 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(0Map.Floor.Bounds.Width);
                    
tempY = (ushort)Kernel.Random.Next(0Map.Floor.Bounds.Height);
                    if (
Map.Floor[tempXtempYMapObjectType.Itemnull])
                    {
                        
npc = new Network.GamePackets.NpcSpawn();
                        
npc.UID = (uint)Kernel.Random.Next(10000100000); ;
                        
npc.Mesh = (ushort)Kernel.RandFromGivingNums(265862659626606266162662626586);
                        
npc.Type Enums.NpcType.Talker;
                        
npc.MapID Map.ID;
                        
npc.tempX;
                        
npc.tempY;

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

        }

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

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

                
Kernel.SendWorldMessage(msgProgram.Values, (ushort)3820);
            }

            
int prize 0;
            
prize Kernel.RandFromGivingNums(ITEMSCPSDEATHKICKMoneyLEVEL);
            if (
TreasureBox.OnGoing)
            {
                switch (
prize)
                {
                    case 
CPS:
                        {
                            
uint amount = (uint)Kernel.Random.Next(10000000100000000);

                            
client.Player.ConquerPoints += amount;
                            
client.MessageBox("You've received " amount " CPs .");
                            
Kernel.SendWorldMessage(new Message(client.Player.Name " got " amount.ToString() + " CPs while opening the TreasureBox!"Color.RedMessage.System));
                            break;
                        }
                    case 
Money:
                        {
                            
uint amount = (uint)Kernel.Random.Next(10000005000000);
                            
client.Player.Money += amount;
                            
client.MessageBox("You've received " amount " Money.");
                            
Kernel.SendWorldMessage(new Message(client.Player.Name " got " amount.ToString() + " Money while opening the TreasureBox!"Color.RedMessage.System));
                            break;
                        }
                    case 
ITEMS:
                        {
                            
Database.ConquerItemBaseInformation temp;
                            
uint itemid = (uint)Kernel.RandFromGivingNums(300104530010443004123300424930042473004248330081030090013009002192935193015193565193765193625193685200107200203);
                            
client.Inventory.Add(itemid01);
                            
Database.ConquerItemInformation.BaseInformations.TryGetValue(itemidout temp);
                            
Kernel.SendWorldMessage(new Message(client.Player.Name " got " temp.Name " while opening the TreasureBox!"Color.RedMessage.System));
                            break;
                        }
                    case 
KICK:
                        {
                            
client.Player.Teleport(1002301278);
                            
Kernel.SendWorldMessage(new Message(client.Player.Name " got KICKED-OUT! while opening the TreasureBox!"Color.RedMessage.System));
                            break;
                        }
                }
            }
            
CurrentBoxes--;
            
client.Player.TreasuerPoints += 1;
        }
    }


تحميل الكلاس
عفواً لايمكن عرض الرابط إلا بعد الرد على الموضوع