It's actually easy, and sad to see that most of the "Developer" doesn't even know how to write 7 lines of code.
What it will do:
- Safe killed Monster Amount in Database
- Display killed Monster in Database
- Handle Rewards for a certain Kill Count
1. Add a new Column in DB on Character called KillCount
> Go to DAL.EF > Character.cs and add
Code:
public int KillCount { get; set; }
Code:
public int KillCount { get; set; }
Code:
KillCount = input.KillCount;
Code:
output.KillCount = input.KillCount;
> Go to GameObject > Character.cs and add whereever u want
Code:
public void GenerateKillCountBonus()
{
switch (KillCount)
{
//When Character killed 100 Monsters
case 100:
break;
}
}
> Go to GenerateKillBonus, go to #region EXP, Reputation and Dignity in GenerateKillBonus and add on top of that region
Code:
#region Generate KillCount Bonus
if (Hp > 0 && !monsterToAttack.BattleEntity.IsMateTrainer(monsterToAttack.MonsterVNum))
{
switch (KillCount)
{
case 100:
GenerateKillCountBonus();
break;
}
}
#endregion
Code:
Session.Character.KillCount++;
You can also check by using if statement at the end instead of case. I like this one more.
Happy leech







