This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [QUESTION] Honor/HonorKills From NPC  (Read 1781 times)

Sho

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 17
    • View Profile
[QUESTION] Honor/HonorKills From NPC
« on: June 14, 2012, 04:53:59 pm »
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 :D


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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: [QUESTION] Honor/HonorKills From NPC
« Reply #1 on: June 15, 2012, 01:02:31 am »
Quote from: "Sho"
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 :D


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:

Code: [Select]
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. :)
« Last Edit: June 15, 2012, 02:01:07 pm by Admin »

Sho

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 17
    • View Profile
Re: [QUESTION] Honor/HonorKills From NPC
« Reply #2 on: June 15, 2012, 10:08:42 am »
Thanks, ill try it this helps alot.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »