View Full Version : [SOLVED] my questchain

04-01-2016, 10:16 AM
Hey I'm trying to create a custom questchain in wow 3.3.5 trinitycore 335.60, and this questchain requires an NPC to show some informations to players. I need the NPC to show the Top 30 players with highest lifetime kills. and Top 30 player kills "Today" with the player names mentioned. I'm pretty sure such a thing is not possible with sql (If is i have no idea how to) and I'd like to know can anyone make this NPC for me so I can continue with my questchain?

PS: and please tell me how to implement it into my local cuz I've never done anything with C++ at all.

Side Question: Is it possible to create something that only triggers when someone kills someone on the same IP more than once in a time limit? so that this prevents players from honor farming?

04-01-2016, 04:57 PM
I thought this would be possible in SQL, so I gave it a go and it actually worked out.
Doing it in SQL however isn't the most efficient way and there is a catch.
The catch is that it will only update the top kills that the npc shows,
after a server restart. However it does work.

Script: http://paste2.org/eJHJp295

Note: Your world database must be called 'world' and your characters database
must be called 'characters'. If they aren't, you will have to change the
database names inside the script, eg: world.npc_text

So it might be better to use a C++ script, seeing as this script doesn't update the kills
instantly, but only after a server restart.
You could however use this as a substitute if you can't implement a C++ script.


04-02-2016, 11:00 AM
Thanks, I'll give it a try :), however it's so bad that it doesn't show before restart , cuz I don't think it's possible to restart the server everynight for update, players like to see their rank instantly. Is there a way?

04-02-2016, 11:17 AM
Yes there are ways to do that, you could use a C++ script like you mentioned.
If you're running a core with Eluna, you could do it in Lua as well.

I'm pretty sure there are a few scripts out there that do what you want.
If you search a little, you'll find one.