I want to be a limited number of exball so that each player on the day 10 exball not be open
if u want help post your reply
That's all, thank
if u want help post your reply
That's all, thank
ExpBall(+1, CSocket);
// ExpBall-limit
public uint expball = 0;
public DateTime expballend;
public string expballend2 = "";
else if (ItemParts[0] == "723700")
{
if (expball < 10)
{
expball++;
expballend = DateTime.Now.AddDays(1);
SaveExpball();
if (Level < 100)
AddExp((ulong)(1295000 + Level * 50000), false);
else if (Level < 110)
AddExp((ulong)(1395000 + Level * 80000), false);
else if (Level < 115)
AddExp((ulong)(1595000 + Level * 100000), false);
else if (Level < 120)
AddExp((ulong)(1895000 + Level * 120000), false);
else if (Level < 125)
AddExp((ulong)(2095000 + Level * 150000), false);
else if (Level < 130)
AddExp((ulong)(2395000 + Level * 180000), false);
else if (Level < 135)
AddExp((ulong)(2895000 + Level * 200000), false);
RemoveItem(ItemUID);
}
else
{
MyClient.SendPacket(General.MyPackets.SendMsg(MyClient.MessageId, "SYSTEM", Name, "You used allready 10 used ExpBalls", 2005));
}
}
if (DateTime.Now >= expballend)
{
expballend2 = "";
expball = 0;
SaveExpball();
MyClient.SendPacket(General.MyPackets.Vital(UID, 18, 0));
MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
World.UpdateSpawn(this);
}
public void SaveExpball()
{
if (MyClient.There)
if (MyClient.Online)
DataBase.SaveExpball(this);
}
if (MyChar.expball > 0)
{
MyChar.expballend = DateTime.Parse(MyChar.expballend2);
SendPacket(General.MyPackets.String(MyChar.UID, 10, "zf2-e128"));
SendPacket(General.MyPackets.Vital(MyChar.UID, 26, MyChar.GetStat()));
World.UpdateSpawn(MyChar);
}
[PHP]public static void Expball(Character Charr)
{
try
{
MySqlCommand Command = null;
Command = new MySqlCommand("UPDATE `Characters` SET `expballend` = '" + Charr.expballend.ToString() + "',`expball` = '" + Charr.expball + "' WHERE `Account` = '" + Charr.MyClient.Account + "'", Connection);
Command.ExecuteNonQuery();
}
catch (Exception Exc) { General.WriteLine(Convert.ToString(Exc)); }
}[/PHP]
Charr.expballend2 = (string)DR["expballend"];
Charr.expball = (byte)DR["expball"];
Field: expballend
Type : VARCHAR
Lenght : 32
null : not null
Field: expball
Type : TINYINT
Lenght : 10
Attribute : UNSIGNED
null : not null
Default : 0
else if (ItemParts[0] == "723700")
{
if (ExpBallCount < 5)
{
RemoveItem
ExpBallCount++;
public byte RBCount = 0;
public byte ExpBallCount = 0;