|
المشاركات 236 |
+التقييم 0.12 |
تاريخ التسجيل Jul 2019 |
الاقامة |
نظام التشغيل |
رقم العضوية 412 |
public static void LuckyBox(uint npcID, Client.GameState client, bool Jade = false)
public static void LuckyBox(uint npcID, Client.GameState client, bool Jade = false)
{
if (client.Entity.ConquerPoints >= 0 || Jade)
{
if (Jade || client.Inventory.Contains(711504, 3))
{
if (!Jade)
{
client.LotteryEntries++;
}
else
{
client.Entity.LotteryJadeAdd++;
}
if ((npcID != 0) && !Jade)
{
_String packet = new _String(true);
packet.UID = npcID;
packet.TextsCount = 1;
packet.Type = _String.Effect;
packet.Texts.Add("lottery");
client.Send(packet);
if (client.Entity.LotteryItemID > 0)
{
}
}
tryagain:
int rand = Kernel.Random.Next(Database.LotteryTable.LotteryItems.Count);
var item = Database.LotteryTable.LotteryItems[rand];
var Itemd = Database.ConquerItemInformation.BaseInformations[item.ID];
if (Itemd == null)
goto tryagain;
if (Kernel.Rate(item.Rank, item.Chance) && Kernel.Rate(item.Rank, 35 - item.Rank))
{
ConquerItem Item = new ConquerItem(true);
Item.ID = item.ID;
client.Entity.LotteryItemID = item.ID;
client.Entity.LotteryItemPlus = item.Plus;
client.Entity.LotteryItemColor = (byte)Game.Enums.Color.Blue;
Item.Plus = item.Plus;
Item.Color = Game.Enums.Color.Blue;
if (item.Sockets > 0)
{
Item.SocketOne = Game.Enums.Gem.EmptySocket;
client.Entity.LotteryItemSoc1 = 255;
}
if (item.Sockets > 1)
{
Item.SocketTwo = Game.Enums.Gem.EmptySocket;
client.Entity.LotteryItemSoc2 = 255;
}
Item.Durability = Item.MaximDurability = Itemd.Durability;
if ((Item != null))
{
if (!Jade)
{
if (client.Inventory.Contains(711504, 3))
{
client.Inventory.Remove(711504, 3);
}
else
{
return;
}
}
else if (client.Inventory.Contains(711504, 1))
{
client.Inventory.Remove(711504, 1);
}
else
{
return;
}
client.Entity.LotteryPrize = Item;
Rayzo.Network.GamePackets.Lottery rider = new Rayzo.Network.GamePackets.Lottery
{
Color = (Enums.Color)1,
Plus = Item.Plus,
Prize = Item.ID,
SocketOne = 0,
SocketTwo = 0,
AddJadeChances = 2,
Type = (Network.GamePackets.Lottery.LotteryTypes)259
};
rider.Send(client);
}
else
{
}
}
else
{
goto tryagain;
}
}
else
{
string msg = string.Format("You need 3 Small Lottery Tickets to try at the lottery!", client.Entity.Name, client.Entity.Name);
client.Send(new Message(msg, System.Drawing.Color.White, Message.Talk));
}
}
else
{
string msg = string.Format("You have used up all your lottery attempts today! But if you have a LotteryTicket you can exchange it for another try from Lady Luck!", client.Entity.Name, client.Entity.Name);
client.Send(new Message(msg, System.Drawing.Color.White, Message.Talk));
}
}
public static void LuckyBox(uint npcID, Client.GameState client, bool Jade = false)
public static void LuckyBox(uint npcID, Client.GameState client, bool Jade = false)
{
if (client.Entity.ConquerPoints >= 0 || Jade)
{
if (Jade || client.Inventory.Contains(711504, 3))
{
if (!Jade)
{
client.LotteryEntries++;
}
else
{
client.Entity.LotteryJadeAdd++;
}
if ((npcID != 0) && !Jade)
{
_String packet = new _String(true);
packet.UID = npcID;
packet.TextsCount = 1;
packet.Type = _String.Effect;
packet.Texts.Add("lottery");
client.Send(packet);
if (client.Entity.LotteryItemID > 0)
{
}
}
tryagain:
int rand = Kernel.Random.Next(Database.LotteryTable.LotteryItems.Count);
var item = Database.LotteryTable.LotteryItems[rand];
var Itemd = Database.ConquerItemInformation.BaseInformations[item.ID];
if (Itemd == null)
goto tryagain;
if (Kernel.Rate(item.Rank, item.Chance) && Kernel.Rate(item.Rank, 35 - item.Rank))
{
ConquerItem Item = new ConquerItem(true);
Item.ID = item.ID;
client.Entity.LotteryItemID = item.ID;
client.Entity.LotteryItemPlus = item.Plus;
client.Entity.LotteryItemColor = (byte)Game.Enums.Color.Blue;
Item.Plus = item.Plus;
Item.Color = Game.Enums.Color.Blue;
if (item.Sockets > 0)
{
Item.SocketOne = Game.Enums.Gem.EmptySocket;
client.Entity.LotteryItemSoc1 = 255;
}
if (item.Sockets > 1)
{
Item.SocketTwo = Game.Enums.Gem.EmptySocket;
client.Entity.LotteryItemSoc2 = 255;
}
Item.Durability = Item.MaximDurability = Itemd.Durability;
if ((Item != null))
{
if (!Jade)
{
if (client.Inventory.Contains(711504, 3))
{
client.Inventory.Remove(711504, 3);
}
else
{
return;
}
}
else if (client.Inventory.Contains(711504, 1))
{
client.Inventory.Remove(711504, 1);
}
else
{
return;
}
client.Entity.LotteryPrize = Item;
Rayzo.Network.GamePackets.Lottery rider = new Rayzo.Network.GamePackets.Lottery
{
Color = (Enums.Color)1,
Plus = Item.Plus,
Prize = Item.ID,
SocketOne = 0,
SocketTwo = 0,
AddJadeChances = 2,
Type = (Network.GamePackets.Lottery.LotteryTypes)259
};
rider.Send(client);
}
else
{
}
}
else
{
goto tryagain;
}
}
else
{
string msg = string.Format("You need 3 Small Lottery Tickets to try at the lottery!", client.Entity.Name, client.Entity.Name);
client.Send(new Message(msg, System.Drawing.Color.White, Message.Talk));
}
}
else
{
string msg = string.Format("You have used up all your lottery attempts today! But if you have a LotteryTicket you can exchange it for another try from Lady Luck!", client.Entity.Name, client.Entity.Name);
client.Send(new Message(msg, System.Drawing.Color.White, Message.Talk));
}
}
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
مشكله تبع سورس خالد محمد اخر اصدار | koko1 | مشكلات السيرفيرات كونكر الشخصيه | 2 | 2020-05-13 02:16 AM |
مشكله في سورس رايزو v3 | AliNasser | مشكلات السيرفيرات كونكر الشخصيه | 2 | 2020-01-30 05:30 PM |
مشكله ف سورس رايزو v3 | mohamedomar | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2020-01-24 08:29 PM |
مشكله في سورس رايزو اصدار 3 | neno2052 | مشكلات السيرفيرات كونكر الشخصيه | 11 | 2019-12-20 07:13 PM |
مشكله في اللوتري عندي ممكن الافاده | zezonever | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2019-11-30 09:26 PM |