Quote:
Originally Posted by walmartboi
Try my 5165 cp code, it'll fix that.
|
so let me get this straight.
replace this:
PHP Code:
if (MyMath.ChanceSuccess(100))
{
if (MobID == 1)
{
Char.Silvers += 1;
Char.CPs += 10;
return;
}
}
with this:
PHP Code:
if (MyMath.ChanceSuccess(100))
{
string acc = "";
int cpDroprate = 10;//rate of cp for server
int cpLow = 1;//min cp drop
int cpHigh = 25;// max cp drop
int cpMultiplyer = 5;// cp drop multiplier
double cpMobDropRate = (Convert.ToDouble(MobTarget.Level) / Convert.ToDouble(Char.Level)) * cpDroprate;
if (MyMath.ChanceSuccess(cpMobDropRate))
{
Random rand = new Random();
int cpBaseReward = rand.Next(cpLow, cpHigh);
int cpToAdd = cpBaseReward * cpMultiplyer;
Char.CPs += Convert.ToUInt32(cpToAdd);
Char.MyClient.LocalMessage(2005, "[CPs] You have gained: " + cpToAdd + " CPs for killing a(n) " + MobTarget.Name);
Database.SaveCharacter(Char, acc);
}
}
Edit:
Seems to be ok now. Will let you know in about 10mins.
Edit#2:
The Error till shows, that sucks. Anyone?