منتدي اكواد

منتدي اكواد (https://code.vpscairo.com/index.php)
-   تطوير سيرفرات كونكر (https://code.vpscairo.com/forumdisplay.php?f=11)
-   -   Npc الريبورن و السكند بالشخصية الجديدة واضافتها ف الـتكرار (https://code.vpscairo.com/showthread.php?t=3950)

megokarika 2020-03-10 01:17 AM

Npc الريبورن و السكند بالشخصية الجديدة واضافتها ف الـتكرار
 
بسم الله الرحمن الرحيم


الان بي سي دا مضاف فية الشخصية الجديدة بعد السكند انشاء الله


إتجة لــ Npc.cs


ضيف الكود


كود PHP:

#region RebirthMaster
                
case 59558:
                    {
                        
dialog.Avatar(67);
                        switch (
npcRequest.OptionID)
                        {
                            case 
0:
                                {
                                    
dialog.Text("I devote all my life to the research of eternity. And finally I know the secret of rebirth! Well, anything I can help you with?");
                                    
dialog.Option("1st~Rebirth."1);
                                    
dialog.Option("2nd~Rebirth."4);
                                    
dialog.Option("Reincarnation."5);
                                    
dialog.Option("Reallot~my~Attribute~Points."8);
                                    
dialog.Option("Buy~Oblivion~Dew~100~k~CPs)"10);
                                    
dialog.Option("Just~passing~by."255);
                                    
dialog.Send();
                                    break;
                                }
                            case 
1:
                                {
                                    if (
client.Entity.Reborn == && (client.Entity.Level >= 110 && client.Entity.Class == 135 || client.Entity.Level >= 120 client.Entity.Class % 10 == 5))
                                    {
                                        if (
client.Inventory.Contains(7212591) || client.Inventory.Contains(7212591))
                                        {
                                            
dialog.Text("There are two kinds of reborns. One is the normal one and the second one is blessed.");
                                            
dialog.Text("The normal reborn will give you the chance to get a Super Gem and the blessed reborn will set a -1 into one of your equipment that you wear during the reborn. What do you chose?");
                                            
dialog.Option("Normal reborn."2);
                                            
dialog.Option("Blessed reborn."3);
                                            
dialog.Option("I`ll~think~about~it."255);
                                            
dialog.Avatar(67);
                                            
dialog.Send();
                                        }
                                        else
                                        {
                                            
dialog.Text("Sorry, you don't have CelestialStone.");
                                            
dialog.Option("I~see."255);
                                            
dialog.Avatar(67);
                                            
dialog.Send();
                                        }
                                    }
                                    else
                                    {
                                        
dialog.Text("You~haven`t~reached~the~highest~rank~yet.~Please~work~harder. You cannot reborn if your level is not 110+ for water saints and 120+ for other masters.");
                                        
dialog.Option("I~see."255);
                                        
dialog.Avatar(67);
                                        
dialog.Send();
                                    }
                                    break;
                                }
                            case 
2:
                                {
                                    
dialog.Text("Select the super gem you desire.");
                                    
dialog.Option("SuperPhoenixGem."203);
                                    
dialog.Option("SuperDragonGem."213);
                                    
dialog.Option("SuperFuryGem."223);
                                    
dialog.Option("SuperRainbowGem."233);
                                    
dialog.Option("SuperVioletGem."253);
                                    
dialog.Option("SuperMoonGem."254);
                                    
dialog.Option("SuperKylinGem"243);
                                    
dialog.Option("I`ll~think~about~it."255);
                                    
dialog.Avatar(67);
                                    
dialog.Send();
                                    break;
                                }
                            case 
203:
                            case 
213:
                            case 
223:
                            case 
233:
                            case 
253:
                            case 
254:
                            case 
243:
                                {
                                    if (
client.Entity.Reborn == 0)
                                    {
                                        
client.RebornGem = (uint)(npcRequest.OptionID 100);
                                        if (
client.RebornGem == 254)
                                            
client.RebornGem 263;
                                    }
                                    
dialog.Text("Select the class you want to reborn in.");
                                    
dialog.Option("Trojan."11);
                                    
dialog.Option("Warrior."21);
                                    
dialog.Option("Archer."41);
                                    
dialog.Option("WaterTaoist."132);
                                    
dialog.Option("FireTaoist."142);
                                    
dialog.Option("Ninja."51);
                                    
dialog.Option("Monk"61);
                                    
dialog.Option("Pirate"71);
                                    
dialog.Option("Dragon~Warrior"81);
                                    
dialog.Option("WindWalker"161);
                                    
dialog.Option("Thunder T.striker"91);
                                    
dialog.Option("I`ll~think~about~it."255);
                                    
dialog.Avatar(67);
                                    
dialog.Send();
                                    break;
                                }
                            case 
3:
                                {
                                    
dialog.Text("Select the class you want to reborn in.");
                                    
dialog.Option("Trojan."11);
                                    
dialog.Option("Warrior."21);
                                    
dialog.Option("Archer."41);
                                    
dialog.Option("WaterTaoist."132);
                                    
dialog.Option("FireTaoist."142);
                                    
dialog.Option("Ninja."51);
                                    
dialog.Option("Monk"61);
                                    
dialog.Option("Pirate"71);
                                    
dialog.Option("Dragon~Warrior"81);
                                    
dialog.Option("WindWalker"161);
                                    
dialog.Option("Thunder T.striker"91);
                                    
dialog.Option("I`ll~think~about~it."255);
                                    
dialog.Avatar(67);
                                    
dialog.Send();
                                    break;
                                }
                            case 
11:
                            case 
21:
                            case 
41:
                            case 
132:
                            case 
142:
                            case 
51:
                            case 
161:
                            case 
61:
                            case 
81:
                            case 
71:
                            case 
91:
                                {

                                    if (!
client.Inventory.HaveSpace(4))
                                    {
                                        
dialog.Text("Sorry, but you need atleast 4 free spaces in your inventory.");
                                        
dialog.Option("I~see."255);
                                        
dialog.Avatar(67);
                                        
dialog.Send();
                                        break;
                                    }
                                    if (
client.Entity.Reborn == && (client.Entity.Level >= 110 && client.Entity.Class == 135 || client.Entity.Level >= 120 client.Entity.Class % 10 == 5))
                                    {
                                        if (
client.Inventory.Contains(7212591))
                                        {
                                            
client.Inventory.Remove(7212591);
                                            if (
client.RebornGem != 0)
                                            {
                                                
client.Inventory.Add((uint)(700000 client.RebornGem), 01);
                                                
client.RebornGem 0;
                                                
ConquerItem hand client.Equipment.TryGetItem(5);
                                                if (
hand != null)
                                                {
                                                    
client.Equipment.Remove(5);
                                                    
client.CalculateHitPoint();
                                                    
client.CalculateMana();
                                                    
client.LoadItemStats();
                                                    
client.SendScreen(client.Entity.PlayerProto(client.Entity), false);
                                                }
                                                
hand client.Equipment.TryGetItem(4);
                                                if (
hand != null)
                                                {
                                                    
client.Equipment.Remove(4);
                                                    
client.CalculateHitPoint();
                                                    
client.CalculateMana();
                                                    
client.LoadItemStats();
                                                    
client.SendScreen(client.Entity.PlayerProto(client.Entity), false);
                                                }
                                            }
                                            else
                                            {
                                                foreach (var 
item in client.Equipment.Objects)
                                                {
                                                    if (
item != null)
                                                    {
                                                        if (
item.Position != ConquerItem.Steed || item.Position != ConquerItem.Wing)
                                                        {
                                                            if (
item.Bless == 0)
                                                            {
                                                                
item.Bless 1;
                                                                
item.Mode Enums.ItemMode.Update;
                                                                
item.Send(client);
                                                                break;
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                            switch (
npcRequest.OptionID)
                                            {
                                                case 
161:
                                                case 
11:
                                                case 
21:
                                                case 
51:
                                                case 
61:
                                                case 
71:
                                                case 
81:
                                                case 
91:
                                                    {
                                                        
client.Inventory.Add(410077Enums.ItemEffect.Poison);
                                                        break;
                                                    }
                                                case 
41:
                                                    {
                                                        
client.Inventory.Add(410077Enums.ItemEffect.Poison);
                                                        break;
                                                    }
                                                case 
132:
                                                case 
142:
                                                    {
                                                        
client.Inventory.Add(421077Enums.ItemEffect.MP);
                                                        break;
                                                    }
                                            }
                                            
using (var rec = new ServerSockets.RecycledPacket())
                                            {
                                                var 
stream rec.GetStream();
                                                
Program.RebornInfo.Reborn(client.EntitynpcRequest.OptionIDstream);
                                            }
                                        }
                                        else
                                        {
                                            
dialog.Text("Sorry, you don't have CelatialStone.");
                                            
dialog.Option("I~see."255);
                                            
dialog.Avatar(67);
                                            
dialog.Send();
                                        }
                                    }
                                    else if (
client.Entity.Reborn == && (client.Entity.Level >= 110 && client.Entity.Class == 135 || client.Entity.Level >= 120 client.Entity.Class % 10 == 5))
                                    {
                                        if (
client.Inventory.Contains(7237011))
                                        {
                                            
client.Inventory.Remove(7237011);

                                            
using (var rec = new ServerSockets.RecycledPacket())
                                            {
                                                var 
stream rec.GetStream();
                                                
Program.RebornInfo.Reborn(client.EntitynpcRequest.OptionIDstream);
                                            }
                                        }
                                        else
                                        {
                                            
dialog.Text("Sorry, you don't have ExemptionToken.");
                                            
dialog.Option("I~see."255);
                                            
dialog.Avatar(67);
                                            
dialog.Send();
                                        }
                                    }
                                    break;
                                }
                            case 
4:
                                {
                                    if (
client.Entity.Reborn == && (client.Entity.Level >= 110 && client.Entity.Class == 135 || client.Entity.Level >= 120 client.Entity.Class % 10 == 5))
                                    {
                                        if (
client.Inventory.Contains(7237011))
                                        {
                                            
dialog.Text("You don't worry, it's not gonna hurt you a bit when getting the third life. You just need an exemption token and it's all going to be fine.");
                                            
dialog.Option("Here is the ExemptionToken."3);
                                            
dialog.Option("I`ll~think~about~it."255);
                                            
dialog.Avatar(67);
                                            
dialog.Send();
                                        }
                                        else
                                        {
                                            
dialog.Text("Sorry, you don't have ExemptionToken.");
                                            
dialog.Option("I~see."255);
                                            
dialog.Avatar(67);
                                            
dialog.Send();
                                        }
                                    }
                                    else
                                    {
                                        
dialog.Text("Sorry,~you~are~ineligible~for~second~rebirth.~Please~wait~until~you~are~a~level~120~reborn~person.");
                                        
dialog.Option("I~see."255);
                                        
dialog.Avatar(67);
                                        
dialog.Send();
                                    }
                                    break;
                                }
                            case 
5:
                                {
                                    
dialog.Text("From now on, have total control of your life! If you've been Reborn twice and are at least Level 110, just bring me some Oblivion Dew and I'll help you become Reincarnated! After the Reincarnation, your class skills will revert to level 0,");
                                    
dialog.Text("~but they`ll return to their previous levels when you reach Level 110, again. If your classes have been the same for all three lives, including your current one, you can learn the Pure Skills from your class trainer,");
                                    
dialog.Text("~in the job center.");
                                    
dialog.Option("I~want~to~get~Reincarnated~ThunderStrike"7);
                                    
dialog.Option("I~want~to~get~Reincarnated other Chars."6);
                                    
dialog.Avatar(67);
                                    
dialog.Send();
                                    break;
                                }
                            case 
6:
                                {
                                    if (
client.Entity.Reborn == && client.Inventory.Contains(7110831))
                                    {
                                        
MsgActionProto Action = new MsgActionProto();
                                        
Action.ID MsgAction_TATA.OpenWindow;
                                        
Action.UID client.Entity.UID;
                                        
Action.dwParam = (uint)MsgAction_TATA.WindowCommands.Reincarnation;
                                        
Action.TimeStamp = (uint)Time32.Now.GetHashCode();
                                        
Action.wParam1 client.Entity.X;
                                        
Action.wParam2 client.Entity.Y;
                                        
client.Send(MsgAction_TATA.SendPacket(Action));


                                    }
                                    else
                                    {
                                        
dialog.Text("You have not been Reborn twice. I`m afraid you will not withstand the power of the Oblivion Dew. Come to me when you get stronger.");
                                        
dialog.Option("Got~it!~Thanks!"255);
                                        
dialog.Avatar(67);
                                        
dialog.Send();
                                    }
                                    break;
                                }
                            case 
7:
                                {
                                    if (
client.Entity.Reborn == && client.Inventory.Contains(7110831) && client.Entity.Level >= 120)
                                    {
                                        
client.Inventory.Remove(7110831);
                                        
using (var rec = new ServerSockets.RecycledPacket())
                                        {
                                            var 
stream rec.GetStream();
                                            
Program.RebornInfo.Reborn(client.Entity91stream);
                                        }


                                    }
                                    else
                                    {
                                        
dialog.Text("You must be 2rb and have ObliveDue and more than lev 120.");
                                        
dialog.Option("Got~it!~Thanks!"255);
                                        
dialog.Avatar(67);
                                        
dialog.Send();
                                    }
                                    break;
                                }
                            case 
8:
                                {
                                    
dialog.Text("Reborn~level~70+~players~can~redistribute~their~attribute~points~at~the~cost~of~a~dragonball.");
                                    
dialog.Option("I~will~reallot~my~points."9);
                                    
dialog.Option("Let~me~think~it~over."255);
                                    
dialog.Avatar(67);
                                    
dialog.Send();
                                    break;
                                }
                            case 
9:
                                {
                                    if (
client.Entity.Level >= 70)
                                    {
                                        if (
client.Inventory.Contains(10880001))
                                        {
                                            
client.Inventory.Remove(10880001);

                                            
client.Entity.Agility 0;
                                            
client.Entity.Strength 0;
                                            
client.Entity.Vitality 1;
                                            
client.Entity.Spirit 0;

                                            
client.MessageBox("You have successfully reloaded your attribute points.");
                                            if (
client.Entity.Reborn == 0)
                                            {
                                                
client.Entity.Atributes 0;
                                                
Kernel.AtributeStatus.ResetStatsNonReborn(client.Entity);
                                                if (
Database.AtributesStatus.IsWater(client.Entity.Class))
                                                {
                                                    if (
client.Entity.Level 110)
                                                        
client.Entity.Atributes = (ushort)((client.Entity.Level 110) * client.Entity.ExtraAtributes client.Entity.MysteryFruit);
                                                }
                                                else
                                                {
                                                    if (
client.Entity.Level 120)
                                                        
client.Entity.Atributes = (ushort)((client.Entity.Level 120) * client.Entity.ExtraAtributes client.Entity.MysteryFruit);
                                                }
                                            }
                                            else if (
client.Entity.Reborn == 1)
                                            {
                                                
client.Entity.Atributes = (ushort)(Program.RebornInfo.ExtraAtributePoints(client.Entity.FirstRebornLevelclient.Entity.FirstRebornClass)
                                                    + 
52 * (client.Entity.Level 15) + client.Entity.ExtraAtributes client.Entity.MysteryFruit);
                                            }
                                            else
                                            {
                                                if (
client.Entity.SecondRebornLevel == 0)
                                                    
client.Entity.SecondRebornLevel 130;
                                                
client.Entity.Atributes = (ushort)(Program.RebornInfo.ExtraAtributePoints(client.Entity.FirstRebornLevelclient.Entity.FirstRebornClass) +
                                                    
Program.RebornInfo.ExtraAtributePoints(client.Entity.SecondRebornLevelclient.Entity.SecondRebornClass) + 52 * (client.Entity.Level 15) + client.Entity.ExtraAtributes client.Entity.MysteryFruit);
                                            }
                                            
using (var rec = new ServerSockets.RecycledPacket())
                                            {
                                                var 
stream rec.GetStream();
                                                
client.Entity.SendUpdate(streamclient.Entity.StrengthGame.MsgServer.MsgUpdate.DataType.Strength);
                                                
client.Entity.SendUpdate(streamclient.Entity.AgilityGame.MsgServer.MsgUpdate.DataType.Agility);
                                                
client.Entity.SendUpdate(streamclient.Entity.SpiritGame.MsgServer.MsgUpdate.DataType.Spirit);
                                                
client.Entity.SendUpdate(streamclient.Entity.VitalityGame.MsgServer.MsgUpdate.DataType.Vitality);
                                                
client.Entity.SendUpdate(streamclient.Entity.AtributesGame.MsgServer.MsgUpdate.DataType.Atributes);
                                            }
                                        }
                                        else
                                        {
                                            
dialog.Text("Sorry, you don't have one DragonBall.");
                                            
dialog.Option("I~see."255);
                                            
dialog.Avatar(67);
                                            
dialog.Send();
                                        }
                                    }
                                    else
                                    {
                                        
dialog.Text("You~cannot~reallot~your~ability~points~unless~you~are~reborn~and~above~level~70.");
                                        
dialog.Option("I~see"255);
                                        
dialog.Avatar(67);
                                        
dialog.Send();
                                    }
                                    break;
                                }
                            case 
10:
                                {
                                    if (
client.Entity.ConquerPoints >= 100000)
                                    {
                                        
client.Entity.ConquerPoints -= 100000;
                                        
client.Inventory.Add(71108301);
                                    }
                                    else
                                    {
                                        
dialog.Text("You~need~100~k~Cps");
                                        
dialog.Send();
                                    }
                                    break;
                                }
                        }
                        break;
                    }
                  
#endregion 



الساعة الآن 06:05 AM

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