Hey I was looking for some way to add honor/honor kills to an npc, so say you kill an npc and you get 5 honor and 1 honor kill. Reason I want this is because I wanted to add a title system and for honor and honor kills, but the mobs are the honorable kills you need for the titles. Thanks Ahead
Trinitycore 3.3.5
I do know dbc, Editing and sql and some C++ , all the basic stuff you would need to do this with but dont know where to start.
Sho.
A very simple script:
public void unitDeath(Unit * unit, int Event)
{
Player plr = unit->GetClosestPlayer();
if (plr != null)
{
plr->ModHonorPoints(plr->GetHonorPoints() + 1));
plr->SendBroadcast("Your honor points have increased by 1.");
}
}
That is the psuedocode, however the actual parameters and API is probably very much different. Also you need to figure out how to hook it, for which I recommend looking at how existing instances are scripted. Once you figure out those two points by looking then copy + pasting, you can add your hook and function to a existing unit script that is already set up, or try and hook a new project to the main solution.
Good luck, sorry I can't be of more help with TrinityCore.