الموضوع: فكره HeroesPoints
عرض مشاركة واحدة
احصائياتى

الردود
2

المشاهدات
2349
 
محمد ياسر

محمد ياسر is on a distinguished road

    غير متواجد

المشاركات
1,940

+التقييم
0.87

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

الاقامة
https://www.facebook.com/daany

نظام التشغيل

رقم العضوية
1
2019-09-14, 05:11 PM
المشاركة 1 
#1  
افتراضي فكره HeroesPoints



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

npc.cs

كود:
#region HeroesPoints
                
case 505467:
                    {
                        
//uint CpsCount = 8000000;
                        //uint CpsPrize = 360;
                        ///////////////////////////
                        
string item1Name "GoldPrize";//Item Name
                        
uint item1ID 2100075;//Item ID....
                        
uint item1Price 800000;//HeroesPoints needed to get the item.
                        ///////////////////////////
                        
string item2Name "SilverPrize";//Item Name
                        
uint item2ID 2100065;//Item ID....
                        
uint item2Price 500000;//HeroesPoints needed to get the item.
                        ///////////////////////////
                        
string item3Name "BronzePrize";//Item Name
                        
uint item3ID 2100055;//Item ID....
                        
uint item3Price 400000;//HeroesPoints needed to get the item.
                        ///////////////////////////
                        
string item4Name "VIP 6";//Item Name
                        //uint item4ID = 728956;//Item ID....
                        
uint item4Price 800000;//HeroesPoints needed to get the item.
                        ///////////////////////////
                        
switch (npcRequest.OptionID)
                        {
                            case 
0:
                                {


                                    
dialog.Text("All heroes can talk to me to learn about my new items, this items for HeroesPoints only, ");
                                    
dialog.Text("Your HeroesPoints Count is : " client.Entity.HeroesPoints " .");
                                    
dialog.Option("About Heroes Points"1);
                                    
dialog.Option("" item1Name " (" item1Price " Points)."2);
                                    
dialog.Option("" item2Name " (" item2Price " Points)."3);
                                    
dialog.Option("" item3Name " (" item3Price " Points)."4);
                                    
dialog.Option("" item4Name " (" item4Price " Points) ."5);
                                    
dialog.Option("No Thanks"255);
                                    
dialog.Send();
                                    break;
                                }
                            case 
1:
                                {
                                    
dialog.Text("This is new system , Each 1 monster you killing it , will get 1 HeroesPoints directly , you can exchange these Points to prizes");
                                    
dialog.Option("Thanks!"255);
                                    
dialog.Avatar(50);
                                    
dialog.Send();
                                    break;
                                }
                            case 
2:
                                {
                                    if (
client.Entity.HeroesPoints >= item1Price)
                                    {
                                        
client.Entity.HeroesPoints -= item1Price;
                                        
client.Inventory.Add(item1ID01);
                                        
_String str = new _String(true);
                                        
str.UID client.Entity.UID;
                                        
str.Type _String.Effect;
                                        
str.Texts.Add("accession2");
                                        
str.TextsCount 1;
                                        
client.Entity.SendScreen(str);
                                        
dialog.Text("You got " item1Name ", your Points now are : " client.Entity.HeroesPoints ".");
                                        
dialog.Option("Thanks Alot!"255);
                                        
dialog.Avatar(50);
                                        
dialog.Send();

                                    }
                                    break;
                                }
                            case 
3:
                                {
                                    if (
client.Entity.HeroesPoints >= item2Price)
                                    {
                                        
client.Entity.HeroesPoints -= item2Price;
                                        
client.Inventory.Add(item2ID01);
                                        
_String str = new _String(true);
                                        
str.UID client.Entity.UID;
                                        
str.Type _String.Effect;
                                        
str.Texts.Add("accession4");
                                        
str.TextsCount 1;
                                        
client.Entity.SendScreen(str);
                                        
dialog.Text("You got " item2Name ", your Points now are : " client.Entity.HeroesPoints ".");
                                        
dialog.Option("Thanks Alot!"255);
                                        
dialog.Avatar(50);
                                        
dialog.Send();

                                    }
                                    break;
                                }
                            case 
4:
                                {
                                    if (
client.Entity.HeroesPoints >= item3Price)
                                    {
                                        
client.Entity.HeroesPoints -= item3Price;
                                        
client.Inventory.Add(item3ID01);
                                        
_String str = new _String(true);
                                        
str.UID client.Entity.UID;
                                        
str.Type _String.Effect;
                                        
str.Texts.Add("accession5");
                                        
str.TextsCount 1;
                                        
client.Entity.SendScreen(str);
                                        
dialog.Text("You got " item3Name ", your Points now are : " client.Entity.HeroesPoints ".");
                                        
dialog.Option("Thanks Alot!"255);
                                        
dialog.Avatar(50);
                                        
dialog.Send();

                                    }
                                    break;
                                }
                            case 
5:
                                {
                                    if (
client.Entity.HeroesPoints >= item4Price)
                                    {
                                        
//client.Entity.VIPLevel = 6;
                                        
VipTable.SavePlayer(client630);
                                        
client.Entity.Update(Network.GamePackets.Update.VIPLevel6false);
                                        
Network.GamePackets.VipStatus vip = new Network.GamePackets.VipStatus();
                                        
client.Send(vip.ToArray());
                                        
_String str = new _String(true);
                                        
str.UID client.Entity.UID;
                                        
str.Type _String.Effect;
                                        
str.Texts.Add("accession6");
                                        
str.TextsCount 1;
                                        
client.Entity.SendScreen(str);
                                        
dialog.Text("You got " item4Name " For 30 days, your Points now are : " client.Entity.HeroesPoints ".");
                                        
dialog.Option("Thanks Alot!"255);
                                        
dialog.Avatar(50);
                                        
dialog.Send();

                                    }

                                    break;
                                }
                        }
                        break;
                    }
                
#endregion 

افتح EntityTable.cs ابحث عن

كود:
public static bool LoadEntity 


ضيف دة

كود:
client.Entity.HeroesPoints reader.ReadUInt32("HeroesPoints"); 

في نفس الملف ابحث

كود:
public static bool SaveEntity 

ضيف دة

كود:
.Set("HeroesPoints"e.HeroesPoints

نبحث عن

كود:
public void Drop 

ضيف دة مكان الي موجود

كود:
#region HeroesPoints
            
if (Name == "TompBat")
            {
                {
                    
killer.HeroesPoints += 1;
                    
killer.Owner.Send(new Message(string.Concat(new object[] { "You Received 1 HeroesPoint , For Kill "this.Name }), System.Drawing.Color.Red0x7dc).ToArray());
                    
///  return;
                
}
            }
            if (
Name == "RedDevilL117")
            {
                {
                    
killer.HeroesPoints += 1;
                    
killer.Owner.Send(new Message(string.Concat(new object[] { "You Received 1 HeroesPoint , For Kill "this.Name }), System.Drawing.Color.Red0x7dc).ToArray());
                    
///  return;
                
}
            }
            if (
Name == "RedDevilL118")
            {
                {
                    
killer.HeroesPoints += 1;
                    
killer.Owner.Send(new Message(string.Concat(new object[] { "You Received 1 HeroesPoint , For Kill "this.Name }), System.Drawing.Color.Red0x7dc).ToArray());
                    
///  return;
                
}
            }
            if (
Name == "HawKing")
            {
                {
                    
killer.HeroesPoints += 1;
                    
killer.Owner.Send(new Message(string.Concat(new object[] { "You Received 1 HeroesPoint , For Kill "this.Name }), System.Drawing.Color.Red0x7dc).ToArray());
                    
///  return;
                
}
            }
            if (
Name == "HawkL93")
            {
                {
                    
killer.HeroesPoints += 1;
                    
killer.Owner.Send(new Message(string.Concat(new object[] { "You Received 1 HeroesPoint , For Kill "this.Name }), System.Drawing.Color.Red0x7dc).ToArray());
                    
///  return;
                
}
            }
            if (
Name == "WingedSnake")
            {
                {
                    
killer.HeroesPoints += 1;
                    
killer.Owner.Send(new Message(string.Concat(new object[] { "You Received 1 HeroesPoint , For Kill "this.Name }), System.Drawing.Color.Red0x7dc).ToArray());
                    
///  return;
                
}
            }
            if (
Name == "Pheasant")
            {
                {
                    
killer.HeroesPoints += 1;
                    
killer.Owner.Send(new Message(string.Concat(new object[] { "You Received 1 HeroesPoint , For Kill "this.Name }), System.Drawing.Color.Red0x7dc).ToArray());
                    
///  return;
                
}
            }
            if (
Name == "Birdman")
            {
                {
                    
killer.HeroesPoints += 1;
                    
killer.Owner.Send(new Message(string.Concat(new object[] { "You Received 1 HeroesPoint , For Kill "this.Name }), System.Drawing.Color.Red0x7dc).ToArray());


                    
///  return;
                
}
            }

            if (
Name == "Bandit")
            {
                {
                    
killer.HeroesPoints += 1;
                    
killer.Owner.Send(new Message(string.Concat(new object[] { "You Received 1 HeroesPoint , For Kill "this.Name }), System.Drawing.Color.Red0x7dc).ToArray());
                    
///  return;
                
}
            }

            if (
Name == "Macaque")
            {
                {
                    
killer.HeroesPoints += 1;
                    
killer.Owner.Send(new Message(string.Concat(new object[] { "You Received 1 HeroesPoint , For Kill "this.Name }), System.Drawing.Color.Red0x7dc).ToArray());
                    
///  return;
                
}
            }

            if (
Name == "TombBat")
            {
                {
                    
killer.HeroesPoints += 1;
                    
killer.Owner.Send(new Message(string.Concat(new object[] { "You Received 1 HeroesPoint , For Kill "this.Name }), System.Drawing.Color.Red0x7dc).ToArray());
                    
///  return;
                
}
            }
            
#endregion 

او عشان اسهل عليك تضيف لي اي وحش عندك الكودين دول

كود:
killer.HeroesPoints += 1
killer.Owner.Send(new Message(string.Concat(new object[] { "You Received 1 HeroesPoint , For Kill "this.Name }), System.Drawing.Color.Red0x7dc).ToArray()); 



افتح Entity ضيف دة :

كود:
public uint HeroesPoints

شغل النافي كات بقا :
نروح علي Entities دوس كليك امين بعدين DseginTable ضيف صف باسم
HeroesPoints bigint 20

بس كده حاجه سهله جدا