منتدي اكواد

منتدي اكواد (https://code.vpscairo.com/index.php)
-   تطوير سيرفرات كونكر (https://code.vpscairo.com/forumdisplay.php?f=11)
-   -   كويستة vip 7 (https://code.vpscairo.com/showthread.php?t=3728)

ElSaher 2020-02-17 04:56 AM

كويستة vip 7
 

النهاردة هشرح كيفية عمل كويستة للفي اي بي 7 وفكرتها ان كل لاعب هيجي يعملها هيدخل مابة لوحده هيلاقي 10 وحوش هيقتلهم كل وحش هيوقع شنطة او توكن ده تتحكم فيه براحتك وهشرح ازاي في الاضافة وبعد ما تجمع 10 هتدوس علي اي واحدة فيهم هياخدهم منك و يطلعلك وحش بس جامد جدا هتخلصوا هتاخد جايزة انت الي تحددها براحتك بقي


دلوقتى وصلنا لاضافة الان بي سي
كود PHP:

#region CommanderVip
                
case 764733:
                    {
                        switch (
npcRequest.OptionID)
                        {
                            case 
0:
                                {
                                    
dialog.Text("Do You Want Join Commander Vip Quest ");
                                    
dialog.Option("Yes , Please"1);
                                    
dialog.Option("No Thanks"255);
                                    
dialog.Avatar(7070);
                                    
dialog.Send();
                                    break;
                                }
                            case 
1:
                                {
                                    if (
client.Entity.VIPLevel == 6)
                                    {
                                        
CommanderVIP.join(client);
                                    }
                                    else
                                    {
                                        
dialog.Text("You Need Vip Level 6");
                                        
dialog.Option("No Thanks"255);
                                        
dialog.Send();
                                    }
                                    break;
                                }
                           


                        }
                        break;
                    }
                
#endregion 


1- افتح البروجيكت وادخل على Npc.cs وضيف دا جوا
كود PHP:

using ResidentEvil.Client;
using ResidentEvil.Game;
using ResidentEvil.Network.GamePackets;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 
ResidentEvil
{
    class 
CommanderVIP
    
{
   

        public static 
Map dynamicMap;
        static 
ushort tempXtempY 0;
        public static 
void join(GameState client)
        {
            
#region join and generatemap
            
dynamicMap Kernel.Maps[(ushort)2068].MakeDynamicMap();
            
client.Entity.Teleport(2068dynamicMap.ID, (ushort)Kernel.Random.Next(3570), (ushort)Kernel.Random.Next(3570));
            
#endregion
            #region CommanderVip [Monster]      
                
ushort MapID dynamicMap.ID;
                
uint id 41720;

                for (
int i 010i++)
                {
                    if (
Kernel.Maps.ContainsKey(MapID))
                    {
                        
ushort x = (ushort)Kernel.Random.Next(3570), = (ushort)Kernel.Random.Next(3570);
                        var 
Map Kernel.Maps[MapID];
                        if (
Database.MonsterInformation.MonsterInformations.ContainsKey(id))
                        {
                            
Database.MonsterInformation mt Database.MonsterInformation.MonsterInformations[id];
                            
mt.BoundX x;

                            
mt.BoundY y;
                            
Entity entity = new Entity(EntityFlag.Monsterfalse);
                            
entity.MapObjType MapObjectType.Monster;
                            
entity.MonsterInfo mt.Copy();
                            
entity.MonsterInfo.Owner entity;
                            
entity.Name mt.Name;
                            
entity.MinAttack mt.MinAttack;
                            
entity.MaxAttack entity.MagicAttack mt.MaxAttack;
                            
entity.Hitpoints entity.MaxHitpoints mt.Hitpoints;
                            
entity.Defence mt.Defence;
                            
entity.Body mt.Mesh;
                            
entity.Level mt.Level;
                            
entity.UID Map.EntityUIDCounter.Next;
                            
entity.MapID MapID;
                            
entity.x;
                            
entity.Boss 1;
                            
entity.y;
                            if (
== || == 0)
                            {
                                var 
cord Map.RandomCoordinates();
                                
entity.cord.Item1;
                                
entity.cord.Item2;
                                do
                                {
                                    
cord Map.RandomCoordinates();
                                    
entity.cord.Item1;
                                    
entity.cord.Item2;
                                }
                                while (!
Map.Floor[entity.Xentity.YMapObjectType.Monster]);
                            }
                            
Map.AddEntity(entity);
                            
Network.GamePackets._String stringPacket =
                            new 
Network.GamePackets._String(true);
                            
stringPacket.UID entity.UID;
                            
stringPacket.Type Network.GamePackets._String.Effect;
                            
stringPacket.Texts.Add("MBStandard");
                            
Data data = new Data(true);
                            
data.UID entity.UID;
                            
data.ID Network.GamePackets.Data.AddEntity;
                            
data.wParam1 entity.X;
                            
data.wParam2 entity.Y;
                            foreach (var 
client23 in Kernel.GamePool.Values)
                            {
                                if (
client23.Map.ID == entity.MapID)
                                {
                                    if (
Kernel.GetDistance(client23.Entity.Xclient23.Entity.Yentity.Xentity.Y) < Constants.nScreenDistance)
                                    {
                                        
entity.SendSpawn(clientfalse);
                                        
client23.Send(stringPacket);
                                        
client23.Send(data);
                                        if (
entity.MaxHitpoints 65535)
                                        {
                                            
Update upd = new Update(true) { UID entity.UID };
                                            
upd.Append(Update.MaxHitpointsentity.MaxHitpoints);
                                            
upd.Append(Update.Hitpointsentity.Hitpoints);
                                            
client23.Send(upd);
                                        }

                                    }
                                }

                            }
                        }
                    }

                }
           
            
#endregion
        
}
        public static 
void BigMonster(GameState client)
        {
            
#region CommanderVip [Monster]
            
ushort MapID client.Entity.MapID;
            
uint id 41721;
            if (
Kernel.Maps.ContainsKey(MapID))
            {
                
ushort x client.Entity.Xclient.Entity.Y;
                var 
Map Kernel.Maps[MapID];
                if (
Database.MonsterInformation.MonsterInformations.ContainsKey(id))
                {
                    
Database.MonsterInformation mt Database.MonsterInformation.MonsterInformations[id];
                    
mt.BoundX x;

                    
mt.BoundY y;
                    
Entity entity = new Entity(EntityFlag.Monsterfalse);
                    
entity.MapObjType MapObjectType.Monster;
                    
entity.MonsterInfo mt.Copy();
                    
entity.MonsterInfo.Owner entity;
                    
entity.Name mt.Name;
                    
entity.MinAttack mt.MinAttack;
                    
entity.MaxAttack entity.MagicAttack mt.MaxAttack;
                    
entity.Hitpoints entity.MaxHitpoints mt.Hitpoints;
                    
entity.Defence mt.Defence;
                    
entity.Body mt.Mesh;
                    
entity.Level mt.Level;
                    
entity.UID Map.EntityUIDCounter.Next;
                    
entity.MapID MapID;
                    
entity.x;
                    
entity.Boss 1;
                    
entity.y;
                    if (
== || == 0)
                    {
                        var 
cord Map.RandomCoordinates();
                        
entity.cord.Item1;
                        
entity.cord.Item2;
                        do
                        {
                            
cord Map.RandomCoordinates();
                            
entity.cord.Item1;
                            
entity.cord.Item2;
                        }
                        while (!
Map.Floor[entity.Xentity.YMapObjectType.Monster]);
                    }
                    
Map.AddEntity(entity);
                    
Network.GamePackets._String stringPacket =
                    new 
Network.GamePackets._String(true);
                    
stringPacket.UID entity.UID;
                    
stringPacket.Type Network.GamePackets._String.Effect;
                    
stringPacket.Texts.Add("MBStandard");
                    
Data data = new Data(true);
                    
data.UID entity.UID;
                    
data.ID Network.GamePackets.Data.AddEntity;
                    
data.wParam1 entity.X;
                    
data.wParam2 entity.Y;
                    foreach (var 
client23 in Kernel.GamePool.Values)
                    {
                        if (
client23.Map.ID == entity.MapID)
                        {
                            if (
Kernel.GetDistance(client23.Entity.Xclient23.Entity.Yentity.Xentity.Y) < Constants.nScreenDistance)
                            {
                                
entity.SendSpawn(clientfalse);
                                
client23.Send(stringPacket);
                                
client23.Send(data);
                                if (
entity.MaxHitpoints 65535)
                                {
                                    
Update upd = new Update(true) { UID entity.UID };
                                    
upd.Append(Update.MaxHitpointsentity.MaxHitpoints);
                                    
upd.Append(Update.Hitpointsentity.Hitpoints);
                                    
client23.Send(upd);
                                }

                            }
                        }

                    }
                }


            }

            
#endregion
        
}
    }



3- بعد كدا هنروح نضيف اكواد الدروب فوق دروب اي وحش كبير زي مثلا هتبحث عن
كود PHP:

 #region SnowBanshee 


حط فوقيه دول
كود PHP:

#region CommanderVIP
            
if (Name == "CommanderVip")
            {
                
killer.Owner.Inventory.Add(330432501);
             
                return;
            }
            
#endregion
            #region CommanderBigBoss
            #region SnowBanshee
            
if (Name == "CommanderBig")
            {


                
uint ItemID 0;
                
byte type1 25;
                for (
int i 011i++)
                {
                    
type1 = (byte)Kernel.Random.Next(111);
                    switch (
type1)
                    {
                        
#region IDs
                        
case 1:
                            
ItemID 3004188;//SavageBone
                            
break;
                        case 
2:
                            
ItemID 3004188;////SavageBone
                            
break;
                        case 
3:
                            
ItemID 3009003;//Pro
                            
break;
                        case 
4:
                            
ItemID 3009003;//Pro
                            
break;
                        case 
5:
                            
ItemID 3009002;//Pro
                            
break;
                        case 
6:
                            
ItemID 3009002;//Pro
                            
break;
                        case 
7:
                            
ItemID 3009002;//Pro
                            
break;
                        case 
8:
                            
ItemID 3009002;//Pro
                            
break;
                        case 
9:
                            
ItemID 3009002;//Pro
                            
break;
                        case 
10:
                            
ItemID 723717;////5 mi
                            
break;
                        case 
11:
                            
ItemID 723717;////5 mi
                            
break;
                        
#endregion

                    
}
                    var 
infos Database.ConquerItemInformation.BaseInformations[ItemID];
                    
ushort X Owner.XOwner.Y;
                    
Game.Map Map Kernel.Maps[Owner.MapID];
                    if (
Map.SelectCoordonates(ref Xref Y))
                    {
                        
Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true);
                        
floorItem.Item = new Network.GamePackets.ConquerItem(true);
                        
floorItem.Item.Color = (ResidentEvil.Game.Enums.Color)Kernel.Random.Next(110);
                        
floorItem.Item.ID ItemID;
                        
floorItem.Item.Plus floorItem.Item.Plus;
                        
floorItem.Item.MaximDurability infos.Durability;
                        
floorItem.Item.Durability infos.Durability;
                        
floorItem.Item.MobDropped true;
                        
floorItem.ValueType Network.GamePackets.FloorItem.FloorValueType.Item;
                        
floorItem.ItemID ItemID;
                        
floorItem.MapID Owner.MapID;
                        
floorItem.MapObjType Game.MapObjectType.Item;
                        
floorItem.= (ushort)Kernel.Random.Next(killer.0killer.15);
                        
floorItem.= (ushort)Kernel.Random.Next(killer.0killer.15);
                        
floorItem.Type Network.GamePackets.FloorItem.Drop;
                        
floorItem.OnFloor Time32.Now;
                        
floorItem.ItemColor floorItem.Item.Color;
                        
floorItem.UID Network.GamePackets.FloorItem.FloorUID.Next;
                        while (
Map.Npcs.ContainsKey(floorItem.UID))

                            
floorItem.UID Network.GamePackets.FloorItem.FloorUID.Next;

                        
Map.AddFloorItem(floorItem);

                        
SendScreenSpawn(floorItem);
                    }
                }
                
killer.ConquerPoints += 2000000;
                
ResidentEvil.Kernel.SendWorldMessage(new ResidentEvil.Network.GamePackets.Message("Congratulations! " killer.Name " has killed CommanderBigboss and Droped SavageBone To Get Random Soul Pack && 2,000,000 Cps "Message.Center));
             
                return;
            }
            
#endregion            
            #endregion 


4- بعد كدا روح لكلاس packethandler ابحث عن
كود PHP:

static void useitem 


أنزل وضيف ده تحت اي ايتم
كود PHP:

#region Commander-Bag
                
case 3304325:
                    {
                        if (
client.Inventory.Contains(330432510))
                        {
                            
client.Inventory.Remove(330432510);
                            
CommanderVIP.BigMonster(client);
                        }
                        else
                        {
                            
client.MessageBox("You Don't Have 10 Bag");
                        }
                        break;
                    }
                
#endregion 


5- بعد كدا في القاعده ضيف دول بقي ضيفهم يدوي عادي في MonsterInfo
كود PHP:

41720    CommanderVip    0    1    951    60000000    0    100    100    100    19    86    0    0    0    0    14    15    0    200    100    1    3    100000    0    0    3451130116    100    0    0    0    0    0    0    0    0    0    0    0    100    0    10000    0    0    0    0    0    0
41721    CommanderBig    0    1    1004    600000000    0    5000    5000    30000    19    86    0    0    0    0    14    15    0    400    100    1    3    100000    0    0    3451130116    100    0    0    0    0    0    0    0    0    0    0    0    100    0    10000    0    0    0    0    0    0 

السلام عليكم

محمد ياسر 2020-02-17 09:04 AM

رد: كويستة vip 7
 
عاش


الساعة الآن 12:03 AM

مرحبا بكم في منتدي اكواد لتطوير الالعاب