PDA

View Full Version : PVE Kill Tally - as seen in Diablo I


Kokolums
03-12-2006, 09:21 PM
I don't know how many of you ever played the original Diablo from the mid 1990s, but it had this feature where it would keep a running tally of how many of each type of monster you killed.

I'm not very good at writing mods. Actually I just keep taking Titan Honor+ and modifying it, adding new things that I like.

Anyway, here is the code I put in Honor+ to log and display PVE kill tallies for the entire history of your characters. If you like this, just slap this code snippet in your Honor+.

Step 1:

Add a new variable to TITAN_HONORPLUS_DEFAULTS:

['mobtally'] = {},

Step 2:

Register a new event in the list of registered events:

-- To pick up "You have slain" msg for pve tallies
this:RegisterEvent("CHAT_MSG_COMBAT_HOSTILE_DEATH");

Step 3:

Add the folowing to your OnEvent list:

elseif (event == "CHAT_MSG_COMBAT_HOSTILE_DEATH") then

if string.find(arg1, "You have slain") then

_, _, mobtallyname = string.find(arg1, "You have slain (.+).")


-- if first kill of this mob, create variable and log 0 kills.
if (TITAN_HONORPLUS[vC]['mobtally'][mobtallyname] == nil) then

TITAN_HONORPLUS[vC]['mobtally'][mobtallyname] = { ['kills'] = 0}; end

TITAN_HONORPLUS[vC]['mobtally'][mobtallyname]['kills'] = TITAN_HONORPLUS[vC]['mobtally'][mobtallyname]['kills'] + 1

bannery = mobtallyname..": |cFFFFFFFF[|cFF88FF88 "..TITAN_HONORPLUS[vC]['mobtally'][mobtallyname]['kills'].." |cFFFFFFFF]|cFF88FF88 kills."

DEFAULT_CHAT_FRAME:AddMessage(bannery, 0.4, 0.8, 0.4);


end

lostboi
04-12-2006, 05:35 AM
O_o wow.....very nifty! And not very good? umm...i could never writ something like that *blinks*