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

الردود
7

المشاهدات
555
 
ElSaher
.:: مشرف اقسام كونكر ::.

المشاركات
3,131

+التقييم
1.16

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

الاقامة
الزقازيق

نظام التشغيل
ويندوز 0

رقم العضوية
279
2020-09-10, 01:14 AM
المشاركة 1
2020-09-10, 01:14 AM
المشاركة 1
افتراضي ازاي تعمل توب NpHp
تعديل كونت ناسي شويت حاجات
افتح كلاسPacketHandler
ابحث عن


كود:
case 1000000:
او
#region Medicine 

ضيف

كود:

 
if (Constants.NoHp.Contains(client.Entity.MapID))
                        {
                            return;
                        } 

وانزل تحت شويا لحد متلاقي دول

كود:
case 1001000:
                case 
1001010:
                case 
1001020:
                case 
1001030:
                case 
1001040:
                case 
1002030:
                case 
1002040:
                case 
725066: 

ضيف

كود:

 
if (Constants.NoHp.Contains(client.Entity.MapID))
                        {
                            return;
                        }
                        if (
Constants.NoHp.Contains(client.Entity.MapID))
                        {
                            return;
                        } 

في نفس كلاس بكت هندلي
ابحث عن

كود:
void Revive 

انزل تحت شويا لحد متلاقي

كود:
if (Constants.revnomap.Contains(client.Entity.MapID))
او
if (Constants.NoRevHere.Contains(client.Entity.MapID)) 

ضيف

كود:

 
if (Constants.NoHp.Contains(client.Entity.MapID))
                        {
                            
client.Entity.Teleport(1002, 300, 279);
                        } 

بردو في نفس الكلاس ابحث عن

كود:
if (Constants.NoRevHere.Contains(client.Entity.MapID))
او
if (Constants.PKFreeMaps.Contains(client.Entity.MapID))
او
if (Constants.revnomap.Contains(client.Entity.MapID)) 

ضيف

كود:
 if (Constants.NoHp.Contains(client.Entity.MapID))
                    
client.Entity.Teleport(1002, 300, 279); 

npc

كود:
#region Top No Hp
                
case 11110:
                    {
                        switch (
npcRequest.OptionID)
                        {
                            case 
0:
                                {
                                    
dialog.Text("Hey there " + client.Entity.Name + " Would you like to join Top NO HP PKWar?.");
                                    
dialog.Option("Yes Please", 1);
                                    
dialog.Option("I don't care.", 255);
                                    
client.Entity.Update(_String.Effect, "ErLongTengFei", true);
                                    
dialog.Send();
                                    break;
                                }
                            case 
1:
                                {

                                    
DateTime Now64 = DateTime.Now;
                                    if (
DateTime.Now.Hour == 16 && DateTime.Now.Minute >= 31 && DateTime.Now.Minute <= 33)
                                    {
                                        
Random R = new Random();
                                        
int Nr = R.Next(1, 10);
                                        if (
Nr == 1) client.Entity.Teleport(1111, 50, 50);
                                        if (
Nr == 2) client.Entity.Teleport(1111, 56, 70);
                                        if (
Nr == 3) client.Entity.Teleport(1111, 78, 69);
                                        if (
Nr == 4) client.Entity.Teleport(1111, 67, 51);
                                        if (
Nr == 5) client.Entity.Teleport(1111, 58, 59);
                                        if (
Nr == 6) client.Entity.Teleport(1111, 53, 57);
                                        if (
Nr == 7) client.Entity.Teleport(1111, 45, 73);
                                        
client.Entity.PKMode = Game.Enums.PKMode.Team;
                                        
client.Send(new Data(true) { UID = client.Entity.UID, ID = Data.ChangePKMode, dwParam = (uint)client.Entity.PKMode });
                                    }
                                    else
                                    {
                                        
dialog.Text("Top Champion Pk War is held during xx:5 to xx:9 you have 4 min to signup ");
                                        
dialog.Option("I don't care.", 255);
                                        
dialog.Send();
                                        break;
                                    }
                                    break;
                                }
                        }
                        break;
                    }
                
#endregion 

npc winner

كود:
#region Winner OF Top NOHp
                
case 1111:
                    {
                        switch (
npcRequest.OptionID)
                        {
                            case 
0:
                                {
                                    
dialog.Text("Hey There " + client.Entity.Name + " Would you like to claim your Prize?.");
                                    
dialog.Option("Yes Please", 1);
                                    
dialog.Option("I don't care.", 255);
                                    
dialog.Send();
                                    break;
                                }
                            case 
1:
                                {
                                    
int alive = 0;
                                    foreach (
XMeGo.Client.GameState Entity in Kernel.GamePool.Values)
                                        if (
Entity.Entity.MapID == client.Entity.MapID && (!Entity.Entity.Dead))
                                            
alive++;
                                    if (
DateTime.Now.Minute >= 34 && DateTime.Now.Minute <= 45)
                                    {
                                        if (
alive == 1)
                                        {
                                            
//client.Inventory.Add(3010, 0, 1);
                                            
client.Entity.ConquerPoints += ServerRates.NOHp;


;
                                            
//client.Entity.TopArcher2 = 1;
                                            // client.Entity.AddFlag3(XMeGo.Network.GamePackets.Update.Flags3.rygh_hglx);
                                            
client.Entity.AddTopStatus(Update.Flags3.rygh_hglx, 3, DateTime.Now.AddMinutes(25));
                                            
//PacketHandler.CheckCommand10(new Message("@addflags2 22",client);
                                            
Kernel.SendWorldMessage(new Message("" + client.Entity.Name + " Claimed The Prize " + ServerRates.Tops + " CPs &  & Box Great Prizes For Win The Top NOHp Pk Every Hour.", System.Drawing.Color.Black, Message.Center), Program.Values);
                                            
client.Entity.SendSpawn(client, true);
                                            
client.Entity.Teleport(1002, 300, 279);
                                            
EntityTable.SaveEntity(client);
                                            foreach (var 
clients in Program.Values)
                                            {
                                                if (
clients.Entity.MapID == 1111)
                                                {
                                                    
clients.Entity.Teleport(1002, 300, 278);
                                                    
clients.Send(new NpcReply(NpcReply.MessageBox, "Sorry Entity Good Luck Next Time ;) "));
                                                }
                                            }
                                        }
                                        else
                                        {
                                            
dialog.Text("There are still " + alive + " Entity in the map kill it first to claim prize!");
                                            
dialog.Option("okay", 255);
                                            
dialog.Avatar(7);
                                            
dialog.Send();
                                            break;
                                        }
                                    }
                                    else
                                    {
                                        
dialog.Text("Hey there " + client.Entity.Name + "You Can only Claim The Prize When The Time on Or after in Every Hour xx:24 to xx:40");
                                        
dialog.Option("ok I Sorry", 255);
                                        
dialog.Avatar(32);
                                        
dialog.Send();
                                        break;
                                    }
                                    break;
                                }
                        }
                        break;
                    }
                
#endregion 

افتح كلاس Constants
ضيف

كود:
   public static readonly System.Collections.Generic.List<ushort> NoHp = new System.Collections.Generic.List<ushort> { 
           
1238,1858,1111
         
}; 

لو هتعمل توب جديد هتروح علي
public static readonly System.Collections.Generic.List<ushort> NoHp = new System.Collections.Generic.List<ushort> {
وتحوط الماب هناك زي كدا
28381,



التعديل الأخير تم بواسطة ElSaher ; 2020-09-10 الساعة 08:34 PM