i have pkpoints sorta working when i kill someone it increases the pkpoints but it doesnt show on the status window of the character but when u go into the friends list it shows there pk points.
damage *= 1
Is the same as damage, but you always calculate on the right side of the equal sign, so it would be 1 - battlepower. I assume you already know that as it's common math.
However it would be like this (1 - battlepower) it would give a negative result, but 1 above than the actual battlepower result. It would be more reasonable to do it like below.
Code:
damage *= (0 - battlepower);
The 1 is not needed at all. It t's because you needed a negative value, you could just used 0.
private ushort pkpoints;
public ushort PkPoints
{
get
{
return pkpoints;
}
set
{
value = (ushort)((value >= 1000) ? 1000 : value);
if (value > 29 && value < 100)
{
this.RemoveFlag1(Effect1.BlackName);
this.AddFlag1(Effect1.RedName);
}
else if (value >= 100)
{
this.RemoveFlag1(Effect1.RedName);
this.AddFlag1(Effect1.BlackName);
}
else if (value >= 0 && value < 30)
{
this.RemoveFlag1(Effect1.RedName);
this.RemoveFlag1(Effect1.BlackName);
}
pkpoints = value;
DB.Update(DBUpdate.PKPoints, pkpoints);
Send(Packet.UpdatePacket.Create(UID, UpdateType.PkPt, pkpoints));//This is the line you need. All you need is sending an update packet with the PKPoints type to the user.
}
}
private ushort pkpoints;
public ushort PkPoints
{
get
{
return pkpoints;
}
set
{
value = (ushort)((value >= 1000) ? 1000 : value);
if (value > 29 && value < 100)
{
this.RemoveFlag1(Effect1.BlackName);
this.AddFlag1(Effect1.RedName);
}
else if (value >= 100)
{
this.RemoveFlag1(Effect1.RedName);
this.AddFlag1(Effect1.BlackName);
}
else if (value >= 0 && value < 30)
{
this.RemoveFlag1(Effect1.RedName);
this.RemoveFlag1(Effect1.BlackName);
}
pkpoints = value;
DB.Update(DBUpdate.PKPoints, pkpoints);
Send(Packet.UpdatePacket.Create(UID, UpdateType.PkPt, pkpoints));//This is the line you need. All you need is sending an update packet with the PKPoints type to the user.
}
}
it works but when u logout then back on again it stops showing
battlepower question 05/18/2009 - CO2 Private Server - 3 Replies is it possable to remove the damage cap potency gives and prehaps change it to a damage bonus? if so how would you go about doing this?