عرض مشاركة واحدة
قديم 2019-07-14, 11:43 PM
المشاركة #9  
Tefa
  • غير متواجد
افتراضي رد: لوتري اخليه بي تيكت بدل سبس
جرب تبدل ات بي سي بتاعك ب ده

كود:
 #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
                    { 
                        switch (
npcRequest.OptionID
                        { 
                            case 
0
                                { 
                                    if (
client.Inventory.Contains(7115043)) 
                                    { 
                                        if (
client.LotteryEntries 500
                                        { 
                                           
client.Inventory.Remove(7115043)
                                            
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.BlackMessage.Talk), MrHassan.Program.Values);  
                                        } 
                                        else 
                                        { 
                                            
dialog.Text("Sorry, your LotteryEntries has finished come tomorrow."); 
                                            
dialog.Option("Okay"255); 
                                        } 
                                    } 
                                    else 
                                    { 
                                        
dialog.Text("You need to pay 50 cps to draw from the lottery in the lottery Center."); 
                                        
dialog.Option("Okay"255); 
                                    } 
                                    break; 
                                } 
                        } 
                        break; 
                    } 
                
#endregion