عرض مشاركة واحدة
قديم 2020-01-27, 04:41 AM
المشاركة 4
Hassan Emprator
.:: مشرف قسم المشاكل ::.
  • غير متواجد
افتراضي رد: مشكلة في اللوتري
جرب بدل ااانبي سي بتاع اللاكي بي دا


كود:
#region Lottery_By_HassanEmprator
                            #region LuckyBox
                            
case 925:
                            case 
926:
                            case 
928:
                            case 
929:
                            case 
930:
                            case 
931:
                            case 
932:
                            case 
933:
                            case 
934:
                            case 
935:
                            case 
936:
                            case 
937:
                            case 
938:
                            case 
939:
                            case 
940:
                            case 
942:
                            case 
943:
                            case 
944:
                            case 
945:
                            case 
946:
                                {
                                    switch (
npcRequest.OptionID)
                                    {
                                        case 
0:
                                            {
                                                if (
client.Inventory.Contains(711504, 3))
                                                {
                                                    if (
client.LotteryEntries < 500)
                                                    {
                                                        
client.Inventory.Remove(711504, 3);
                                                        
int rand = Kernel.Random.Next(MrHassan.Database.LotteryTable.LotteryItems.Count);
                                                        var 
item = MrHassan.Database.LotteryTable.LotteryItems[rand];
                                                        var 
tobesent = new newLottery(true);
                                                        
tobesent.boxid = 3;//npcRequest.NpcID;// 0x10103;  
                                                        
tobesent.ItemID = item.ID;
                                                        
client.Entity.LOTOITEM = item;
                                                        if (
item.Sockets > 0)
                                                            
tobesent.SocketGem1 = 255;
                                                        if (
item.Sockets > 1)
                                                            
tobesent.SocketGem2 = 255;
                                                        
client.Entity.AddJade = 0;
                                                        
tobesent.JadesAdded = client.Entity.AddJade;
                                                        
tobesent.plus = item.Plus;
                                                        
client.LotteryEntries += 1;

                                                        
client.Send(tobesent);
                                                        
MrHassan.Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " won " + item.Name + " in lottery.", System.Drawing.Color.Black, Message.Talk), MrHassan.Program.Values);
                                                    }
                                                    else
                                                    {
                                                        
dialog.Text("Sorry, your LotteryEntries has finished come tomorrow.");
                                                        
dialog.Option("Okay", 255);
                                                    }
                                                }
                                                else
                                                {
                                                    
dialog.Text("You need to SmallLottryTickets to draw from the lottery in the lottery Center.");
                                                    
dialog.Option("Okay", 255);
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            
#endregion
                            #endregion