Ok im trying to add where LOTF source Says when you win a Big Prize from Lotto this is what i got and wont work can smeone maybe help me fix this up?
public void DoLottery()
{
if (Other.ChanceSuccess(25))
{
World.SendMsgToAll(MyChar.Name + " is so lucky to win a(an) " + PrizeSoc + "" + PrizeName + "" + PrizePlus + "!", "SYSTEM", 2000);
byte Quality = 8;
if (Other.ChanceSuccess(15))
Quality = 9;
byte Plus = 0;
if (Quality == 8)
if (Other.ChanceSuccess(1))
Plus = 8;
byte Soc1 = 0;
byte Soc2 = 0;
if (Plus == 0)
if (Quality == 8)
if (Other.ChanceSuccess(1))
{
Soc1 = 255;
if (Other.ChanceSuccess(0.5))
Soc2 = 255;
}
byte Enchant = (byte)General.Rand.Next(0, 255);
byte Bless = 0;
if (Other.ChanceSuccess(20))
Bless = (byte)General.Rand.Next(0, 3);
uint EquipID = Other.GenerateEquip((byte)General.Rand.Next(15, 119), Quality);
while (EquipID == 0)
{
EquipID = Other.GenerateEquip((byte)General.Rand.Next(15, 119), Quality);
}
AddItem(EquipID.ToString() + "-" + Plus.ToString() + "-" + Bless.ToString() + "-" + Enchant.ToString() + "-" + Soc1.ToString() + "-" + Soc2.ToString(), 0, (uint)General.Rand.Next(263573635));
}
else if (Other.ChanceSuccess(15))
{
AddItem(Other.GenerateGarment().ToString() + "-0-0-0-0-0", 0, (uint)General.Rand.Next(263573635));
World.SendMsgToAll(MyChar.Name + " is so lucky to win a(an) " + PrizeSoc + "" + PrizeName + "" + PrizePlus + "!", "SYSTEM", 2000);
}
else if (Other.ChanceSuccess(20))
{
uint ID = Other.GenerateEtc();
if (Other.ItemType2(ID) == 73)
AddItem(ID.ToString() + "-" + (ID - 730000) + "-0-0-0-0", 0, (uint)General.Rand.Next(263573635));
else
AddItem(ID.ToString() + "-0-0-0-0-0", 0, (uint)General.Rand.Next(263573635));
World.SendMsgToAll(MyChar.Name + " is so lucky to win a(an) " + PrizeSoc + "" + PrizeName + "" + PrizePlus + "!", "SYSTEM", 2000);
}
else if (Other.ChanceSuccess(25))
{
AddItem(Other.GenerateSpecial().ToString() + "-0-0-0-0-0", 0, (uint)General.Rand.Next(263573635));
World.SendMsgToAll(MyChar.Name + " is so lucky to win a(an) " + PrizeSoc + "" + PrizeName + "" + PrizePlus + "!", "SYSTEM", 2000);
}
else
{
uint ID = Other.GenerateCrap();
if (ID != 730001)
AddItem(ID.ToString() + "-0-0-0-0-0", 0, (uint)General.Rand.Next(263573635));
else
AddItem("730001-1-0-0-0-0", 0, (uint)General.Rand.Next(263573635));
World.SendMsgToAll(MyChar.Name + " is so lucky to win a(an) " + PrizeSoc + "" + PrizeName + "" + PrizePlus + "!", "SYSTEM", 2000);
}
}






