|
المشاركات 258 |
+التقييم 0.13 |
تاريخ التسجيل May 2019 |
الاقامة |
نظام التشغيل |
رقم العضوية 228 |
public static void LuckyBox(
public static void LuckyBox(uint npcID, Client.GameState client, bool Jade = false)
{
if (client.Trade.InTrade)
return;
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;
MsgLottery lottery = new MsgLottery
{
Color = Item.Color,
Plus = Item.Plus,
Prize = Item.ID,
SocketOne = (byte)Item.SocketOne,
SocketTwo = (byte)Item.SocketTwo,
AddJadeChances = client.Entity.LotteryJadeAdd,
Type = Mode.ShowGUI
};
lottery.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 void DropItem(Entity Owner, params uint[] param)
{
for (int x = 0; x < param.Length; x++)
{
var infos = ConquerItemInformation.BaseInformations[param[x]];
ushort X = Owner.X, Y = Owner.Y;
Game.Map Map = Kernel.Maps[Owner.MapID];
if (Map.SelectCoordonates(ref X, ref Y))
{
FloorItem floorItem = new FloorItem(true);
floorItem.Item = new ConquerItem(true);
floorItem.Item.Color = (Enums.Color)Kernel.Random.Next(4, 8);
floorItem.Item.ID = infos.ID;
floorItem.Item.Plus = 0;
floorItem.Item.StackSize = 1;
floorItem.Item.MaxStackSize = infos.StackSize;
floorItem.Item.MaximDurability = infos.Durability;
floorItem.Item.Durability = infos.Durability;
floorItem.Item.MobDropped = true;
floorItem.ValueType = FloorItem.FloorValueType.Item;
floorItem.ItemID = infos.ID;
floorItem.MapID = Owner.MapID;
floorItem.MapObjType = Game.MapObjectType.Item;
floorItem.X = X;
floorItem.Y = Y;
floorItem.Owner = Owner.Owner;
floorItem.Type = Network.GamePackets.FloorItem.Drop;
floorItem.OnFloor = Time32.Now;
floorItem.ItemColor = floorItem.Item.Color;
floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
while (Map.Npcs.ContainsKey(floorItem.UID))
floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
Map.AddFloorItem(floorItem);
SendScreenSpawn(floorItem);
}
}
}
public static void Refinary(
if (attacker.EntityFlag == EntityFlag.Entity)
{
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
مشكلتين مهمين | salahsayed | مشكلات السيرفيرات كونكر الشخصيه | 5 | 2019-10-30 05:03 PM |
مشكلتين مهمين | salahsayed | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2019-10-30 03:36 PM |
عندى مشكلتين | bebo100 | مشكلات السيرفيرات كونكر الشخصيه | 5 | 2019-08-25 02:22 PM |
مشكلتين | bebo100 | مشكلات السيرفيرات كونكر الشخصيه | 19 | 2019-07-27 06:58 AM |
مشكلتين مش لقلها حل | abuhaneen | مشكلات السيرفيرات كونكر الشخصيه | 3 | 2019-07-11 10:30 PM |