قديم 2020-03-20, 05:51 AM
المشاركة 2
Hassan Emprator
.:: عضو خبير ::.
  • غير متواجد
افتراضي رد: مشكله فى الان بى سى دا ي جدعان عاوز حلها ضرور
غير الانبي سي دا بي الي معاك وجرب هتلاقيه اشتغل انشاء الله وهتحدد لاسيبي من هنا برضو

كود:
#region Chi Npc
                
case 4444:
                    {
                        
dialog.Avatar(218);
                        switch (
npcRequest.OptionID)
                        {
                            case 
0:
                                {
                                    if (
client.ChiPowers.Count == 0)
                                    {
                                        
dialog.Text("Sorry But You Don't Have chi Yet.");
                                        
dialog.Option("I'll think about it!"255);
                                        
dialog.Send();
                                        return;
                                    }
                                    
dialog.Text("Hello I'M Chi Seller.");
                                    for (
int i 0client.ChiPowers.Counti++)
                                    {
                                        var 
stage client.ChiPowers[i];
                                        
dialog.Option(((Game.Enums.ChiPowerType)(1)).ToString(), (byte)(1));
                                    }
                                    
dialog.Option("I'll think about it!"255);
                                    
dialog.Send();
                                    break;
                                }
                            default:
                                {
                                    
int mStage npcRequest.OptionID;
                                    if (
mStage >= && mStage <= 4)
                                    {
                                        
client.Entity.SelectedStage mStage;
                                        
dialog.Text("You Choose " + ((Game.Enums.ChiPowerType)mStage).ToString() + " stage. please select Attribute you want to change ");
                                        for (
int i 04i++)
                                        {
                                            
dialog.Option("Attribute [" + (byte)(1) + "]", (byte)(4));
                                        }
                                        
dialog.Option("Back"0);
                                        
dialog.Option("I'll think about it!"255);
                                        
dialog.Send();
                                        break;
                                    }
                                    else if (
mStage >= && mStage <= 8)
                                    {
                                        try
                                        {
                                            
client.Entity.SelectedAttribute mStage 4;
                                            var 
mychiattribute = new List<Enums.ChiAttribute>();
                                            var 
powers client.ChiPowers[(int)client.Entity.SelectedStage 1];
                                            for (
int i 0powers.Attributes.Lengthi++)
                                            {
                                                if (
client.Entity.ConquerPoints >= 1)
                                                {
                                                    
client.Entity.ConquerPoints -= 1;//

                                                    
var Attribute powers.Attributes[i];
                                                    
mychiattribute.Add(Attribute.Type);
                                                }
                                                else
                                                {
                                                    
dialog.Text("Anta Yasta msh Ma3ak 1 cps ");
                                                }
                                            }
                                            
dialog.Text("You Choose Attribute [" client.Entity.SelectedAttribute "] please select AttributeType you want to change ");
                                            for (
int i 0< (int)Enums.ChiAttribute.MagicDamageDecreasei++)
                                            {
                                                var 
type = ((Enums.ChiAttribute)(1));
                                                if (!
mychiattribute.Contains(type))
                                                    
dialog.Option(type.ToString(), (byte)(((1) * 10)));
                                            }
                                            
dialog.Option("Back", (byte)client.Entity.SelectedStage);
                                            
dialog.Option("I'll think about it!"255);
                                            
dialog.Send();
                                        }
                                        catch
                                        {
                                        }
                                        break;
                                    }
                                    else
                                    {

                                        var 
typex mStage 10;

                                        var 
Mode client.Entity.SelectedStage;
                                        var 
pos client.Entity.SelectedAttribute 1;
                                        var 
powers client.ChiPowers[Mode 1];
                                        var 
attributes powers.Attributes;
                                        foreach (var 
attr in attributes)
                                        {

                                            if (
attr.Type == (Enums.ChiAttribute)typex)
                                            {
                                                
client.MessageBox("Sorry you can't muliplay stats"nullnull);
                                                return;
                                            }
                                        }
                                        
attributes[pos].Type = (Enums.ChiAttribute)typex;
                                        
attributes[pos].Value = (ushort)Game.Enums.ChiMaxValues(attributes[pos].Type);
                                        
powers.CalculatePoints();
                                        
Database.ChiTable.Sort((Enums.ChiPowerType)Mode);
                                        
powers.Power = (Enums.ChiPowerType)Mode;
                                        
client.Send(new ChiPowers(true).Query(client));
                                        
#region Update ranking
                                        
Database.ChiTable.ChiData[] array = null;
                                        switch ((
Enums.ChiPowerType)Mode)
                                        {
                                            case 
Game.Enums.ChiPowerType.Dragon:
                                                array = 
Database.ChiTable.Dragon;
                                                break;

                                            case 
Game.Enums.ChiPowerType.Phoenix:
                                                array = 
Database.ChiTable.Phoenix;
                                                break;

                                            case 
Game.Enums.ChiPowerType.Tiger:
                                                array = 
Database.ChiTable.Tiger;
                                                break;

                                            case 
Game.Enums.ChiPowerType.Turtle:
                                                array = 
Database.ChiTable.Turtle;
                                                break;
                                        }
                                        foreach (var 
chiData in array)
                                        {
                                            if (
Kernel.GamePool.ContainsKey(chiData.UID))
                                            {
                                                var 
pClient Kernel.GamePool[chiData.UID];
                                                if (
pClient == null) continue;
                                                if (
pClient.ChiData == null) continue;
                                                
// make it public instead of private 
                                                
PacketHandler.SendRankingQuery(new GenericRanking(true) { Mode GenericRanking.QueryCount }, pClientGenericRanking.Chi + (uint)ModepClient.ChiData.SelectRank((Enums.ChiPowerType)Mode), pClient.ChiData.SelectPoints((Enums.ChiPowerType)Mode));
                                                if (
pClient.Entity.UID == client.Entity.UID || pClient.ChiData.SelectRank((Enums.ChiPowerType)Mode) < 50)
                                                    
pClient.LoadItemStats();
                                            }
                                        }
                                        
#endregion
                                        
Database.ChiTable.Save(client);
                                    }
                                    break;
                                }
                        }
                        break;
                    }
                
#endregion 


قديم 2020-03-20, 01:22 PM
المشاركة 3
bosha1
.:: عضو نشيط ::.
  • غير متواجد
افتراضي رد: مشكله فى الان بى سى دا ي جدعان عاوز حلها ضرور
جارى التجربه وتسلم مقدما ي زوق

قديم 2020-03-20, 01:45 PM
المشاركة 4
bosha1
.:: عضو نشيط ::.
  • غير متواجد
افتراضي رد: مشكله فى الان بى سى دا ي جدعان عاوز حلها ضرور
غير الانبي سي دا بي الي معاك وجرب هتلاقيه اشتغل انشاء الله وهتحدد لاسيبي من هنا برضو

كود:
#region chi npc
                
case 4444:
                    {
                        
dialog.avatar(218);
                        switch (
npcrequest.optionid)
                        {
                            case 
0:
                                {
                                    if (
client.chipowers.count == 0)
                                    {
                                        
dialog.text("sorry but you don't have chi yet.");
                                        
dialog.option("i'll think about it!"255);
                                        
dialog.send();
                                        return;
                                    }
                                    
dialog.text("hello i'm chi seller.");
                                    for (
int i 0client.chipowers.counti++)
                                    {
                                        var 
stage client.chipowers[i];
                                        
dialog.option(((game.enums.chipowertype)(1)).tostring(), (byte)(1));
                                    }
                                    
dialog.option("i'll think about it!"255);
                                    
dialog.send();
                                    break;
                                }
                            default:
                                {
                                    
int mstage npcrequest.optionid;
                                    if (
mstage >= && mstage <= 4)
                                    {
                                        
client.entity.selectedstage mstage;
                                        
dialog.text("you choose " + ((game.enums.chipowertype)mstage).tostring() + " stage. Please select attribute you want to change ");
                                        for (
int i 04i++)
                                        {
                                            
dialog.option("attribute [" + (byte)(1) + "]", (byte)(4));
                                        }
                                        
dialog.option("back"0);
                                        
dialog.option("i'll think about it!"255);
                                        
dialog.send();
                                        break;
                                    }
                                    else if (
mstage >= && mstage <= 8)
                                    {
                                        try
                                        {
                                            
client.entity.selectedattribute mstage 4;
                                            var 
mychiattribute = new list<enums.chiattribute>();
                                            var 
powers client.chipowers[(int)client.entity.selectedstage 1];
                                            for (
int i 0powers.attributes.lengthi++)
                                            {
                                                if (
client.entity.conquerpoints >= 1)
                                                {
                                                    
client.entity.conquerpoints -= 1;//

                                                    
var attribute powers.attributes[i];
                                                    
mychiattribute.add(attribute.type);
                                                }
                                                else
                                                {
                                                    
dialog.text("anta yasta msh ma3ak 1 cps ");
                                                }
                                            }
                                            
dialog.text("you choose attribute [" client.entity.selectedattribute "] please select attributetype you want to change ");
                                            for (
int i 0< (int)enums.chiattribute.magicdamagedecreasei++)
                                            {
                                                var 
type = ((enums.chiattribute)(1));
                                                if (!
mychiattribute.contains(type))
                                                    
dialog.option(type.tostring(), (byte)(((1) * 10)));
                                            }
                                            
dialog.option("back", (byte)client.entity.selectedstage);
                                            
dialog.option("i'll think about it!"255);
                                            
dialog.send();
                                        }
                                        catch
                                        {
                                        }
                                        break;
                                    }
                                    else
                                    {

                                        var 
typex mstage 10;

                                        var 
mode client.entity.selectedstage;
                                        var 
pos client.entity.selectedattribute 1;
                                        var 
powers client.chipowers[mode 1];
                                        var 
attributes powers.attributes;
                                        foreach (var 
attr in attributes)
                                        {

                                            if (
attr.type == (enums.chiattribute)typex)
                                            {
                                                
client.messagebox("sorry you can't muliplay stats"nullnull);
                                                return;
                                            }
                                        }
                                        
attributes[pos].type = (enums.chiattribute)typex;
                                        
attributes[pos].value = (ushort)game.enums.chimaxvalues(attributes[pos].type);
                                        
powers.calculatepoints();
                                        
database.chitable.sort((enums.chipowertype)mode);
                                        
powers.power = (enums.chipowertype)mode;
                                        
client.send(new chipowers(true).query(client));
                                        
#region update ranking
                                        
database.chitable.chidata[] array = null;
                                        switch ((
enums.chipowertype)mode)
                                        {
                                            case 
game.enums.chipowertype.dragon:
                                                Array = 
database.chitable.dragon;
                                                break;

                                            case 
game.enums.chipowertype.phoenix:
                                                Array = 
database.chitable.phoenix;
                                                break;

                                            case 
game.enums.chipowertype.tiger:
                                                Array = 
database.chitable.tiger;
                                                break;

                                            case 
game.enums.chipowertype.turtle:
                                                Array = 
database.chitable.turtle;
                                                break;
                                        }
                                        foreach (var 
chidata in array)
                                        {
                                            if (
kernel.gamepool.containskey(chidata.uid))
                                            {
                                                var 
pclient kernel.gamepool[chidata.uid];
                                                if (
pclient == null) continue;
                                                if (
pclient.chidata == null) continue;
                                                
// make it public instead of private 
                                                
packethandler.sendrankingquery(new genericranking(true) { mode genericranking.querycount }, pclientgenericranking.chi + (uint)modepclient.chidata.selectrank((enums.chipowertype)mode), pclient.chidata.selectpoints((enums.chipowertype)mode));
                                                if (
pclient.entity.uid == client.entity.uid || pclient.chidata.selectrank((enums.chipowertype)mode) < 50)
                                                    
pclient.loaditemstats();
                                            }
                                        }
                                        
#endregion
                                        
database.chitable.save(client);
                                    }
                                    break;
                                }
                        }
                        break;
                    }
                
#endregion 
دا الان بى سى دلوقتى بقا يعملو ببلاش

متحلتش المشكله

قديم 2020-03-20, 01:50 PM
المشاركة 5
bosha1
.:: عضو نشيط ::.
  • غير متواجد
افتراضي رد: مشكله فى الان بى سى دا ي جدعان عاوز حلها ضرور
انا عدلتو عملت الواحده ب 2 مليون لاقتو بقا يعملو ببلاش ومابيخدش اى كبس

قديم 2020-03-20, 02:12 PM
المشاركة 6
bosha1
.:: عضو نشيط ::.
  • غير متواجد
افتراضي رد: مشكله فى الان بى سى دا ي جدعان عاوز حلها ضرور
تم الحل ي زوق تشكر


العلامات المرجعية



الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1)
 

الانتقال السريع

المواضيع المتشابهه للموضوع: مشكله فى الان بى سى دا ي جدعان عاوز حلها ضرور
الموضوع كاتب الموضوع المنتدى مشاركات آخر مشاركة
مشكله حلها ضروري سمير مشكلات السيرفيرات كونكر الشخصيه 3 2020-05-04 05:57 PM
محتاج الان بى سى دة من سورس يكون شغال فيه تمام Zayn Muhammed مشكلات السيرفيرات كونكر الشخصيه 2 2020-02-25 08:11 AM
مشكله محتاج حلها abuhaneen مشكلات السيرفيرات كونكر الشخصيه 1 2019-12-21 01:23 AM
مشكله ممكن حلها سمير مشكلات السيرفيرات كونكر الشخصيه 8 2019-11-22 02:58 PM
مشكله حلها بسرعه لو سمحتوا سمير مشكلات السيرفيرات كونكر الشخصيه 4 2019-10-05 12:04 AM


الساعة الآن 01:23 AM

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.