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

الردود
7

المشاهدات
27395
 
Mr.DeMo

Mr.DeMo is on a distinguished road

    غير متواجد

المشاركات
41

+التقييم
0.01

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

الاقامة

نظام التشغيل

رقم العضوية
2786
12-11-2015, 12:13 AM
المشاركة 1 
#1  
افتراضي شرح اضافة npc لأي سورس
اضافة, سورس

الاول : بسم الله الرحمن الرحيم

ثانيا انا معرفش اذا كان الموضوع مكرر ولا لا بس في واحد طلب مني الشرح ده

نبدأ بإذن الله

اولا مثلا احنا عايزيين نضيف انبي سي الكاس هنعمل ايه

اول حاجه هنفتح Npcs.cs

وعند اخر انبي سي متضاف اخر انبي سي تحته علطول هنضيف الكود ده


كود:
 #region Conauer9 Seller/ Gold Cup

                            
case 226431:
                                {
                                    switch (
npcRequest.OptionID)
                                    {
                                        case 
0:
                                            {
                                                
dialog.Text("Hi im  Akachab Conquer9.blogspot.com Coder I can sell you some Cups you know it  can make your diffence mutch higher so witch one you well need? ");
                                                
dialog.Option("Buy Gold Prize - 50 M Cps "1);
                                                
dialog.Option("Buy Silver Prize - 40 M CPS "2);
                                                
dialog.Option("Buy Bronze Prize - 30 M CPS "3);
                                                
dialog.Option("Buy Power Exp Ball - 10000 CPS "4);
                                                
dialog.Option("Buy Life Fruit Basket - 10000 CPS "5);
                                                
dialog.Option("Just passing by."255);
                                                
dialog.Avatar(80);
                                                
dialog.Send();
                                                break;
                                            }
                                        case 
1:
                                            {
                                                if (
client.Entity.ConquerPoints >= 50000000)
                                                {
                                                    
client.Entity.ConquerPoints -= 50000000;
                                                    
client.Inventory.Add(210007501);
                                                }
                                                else
                                                {
                                                    
dialog.Text("Tu no tienes 50 M Cps.");
                                                    
dialog.Option("No los tengo"255);
                                                    
dialog.Avatar(80);
                                                    
dialog.Send();
                                                }
                                                break;
                                            }
                                        case 
2:
                                            {
                                                if (
client.Entity.ConquerPoints >= 40000000)
                                                {
                                                    
client.Entity.ConquerPoints -= 40000000;
                                                    
client.Inventory.Add(210006501);
                                                }
                                                else
                                                {
                                                    
dialog.Text("Tu no tienes 40 M ConquerPoints.");
                                                    
dialog.Option("No los tengo"255);
                                                    
dialog.Avatar(80);
                                                    
dialog.Send();
                                                }
                                                break;
                                            }
                                        case 
5:
                                            {
                                                if (
client.Entity.ConquerPoints >= 100000)
                                                {
                                                    
client.Entity.ConquerPoints -= 100000;
                                                    
client.Inventory.Add(72372501);
                                                }
                                                else
                                                {
                                                    
dialog.Text("You don't have 100000 ConquerPoints.");
                                                    
dialog.Option("Ah, my bad"255);
                                                    
dialog.Avatar(80);
                                                    
dialog.Send();
                                                }
                                                break;
                                            }
                                        case 
3:
                                            {
                                                if (
client.Entity.ConquerPoints >= 30000000)
                                                {
                                                    
client.Entity.ConquerPoints -= 5000000;
                                                    
client.Inventory.Add(210005501);
                                                }
                                                else
                                                {
                                                    
dialog.Text("Tu no tienes 30 M ConquerPoints.");
                                                    
dialog.Option("Soy Pobre"255);
                                                    
dialog.Avatar(80);
                                                    
dialog.Send();
                                                }
                                                break;
                                            }
                                        case 
4:
                                            {
                                                if (
client.Entity.ConquerPoints >= 10000)
                                                {
                                                    
client.Entity.ConquerPoints -= 10000;
                                                    
client.Inventory.Add(72374401);
                                                }
                                                else
                                                {
                                                    
dialog.Text("You don't have 10000 ConquerPoints.");
                                                    
dialog.Option("Ah, my bad"255);
                                                    
dialog.Avatar(80);
                                                    
dialog.Send();
                                                }
                                                break;
                                            }

                                    }
                                    break;
                                }

                            
#endregion <br> 

كده خلصنا شغل السي شارب

دلوقتي النافي كات

هنفتح النافي كات بعد كده هندور على تيبل اسمها NPC هنفتحها

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

بعد ما فتحت معانا نضيف الاكواد بقى

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

رقم -1 : ده هنحط الكود ده
كود:
226431 

رقم -2
كود:
اسم  الانبي سي اللي انت عايز تعمله 

رقم -3 هنحط الرقم ده
كود:


رقم -4 هنحط الكود ده
كود:
50190 

رقم -5 ده المدينه اللي هتحط فيها الانبي سي مثلا التاون
كود:
1002 

رقم - 6 هنحط الكود ده
كود:
298 

رقم -7 هنحط الكود ده
كود:
261 

كده احنا ضفنا الانبي سي ووربنا معاكم



مش عـــــــــايز منكم غير دعوه حـــــــلــــووهاضافة سورس regular_smile.png



avp hqhtm npc gHd s,vs