-
Posted by frostig on Thu, 22 Jul 2010 23:47:11
Hello.
I am kind of new, as many of the others at world of warcraft programming. For a fact, I have never programmed something "real" in lua before. But since I've got experience in some other programming languages this ain't a problem.
However, I want to create a addon that keep a record on the mob-creature kill-statistic for the player in question. When the kill statistic reach a specific number, like 100 or 1000 I want to play a audio file (which will be a cool voice screaming the number out btw).
The problem that I'm experiencing is which API-function I should use? I understand that http://www.wowwiki.com/API_GetAchievementInfo might be a good place to start. But tho, I might have to keep track on the latest updates.
But my first question is, is this the right functions to look at? I don't know if achievements can retrieve statistics with the right data, which would just contain an integer value.
Could someone help me and explain which API-feature I should use and why? :)
And please, if you know, help me find out the right ID for this. Or atleast a link to a site that contain all the ID's for this or something like that. As I said, I'm a beginner World of Warcraft programmer.
Peace. / Frostig
-
Posted by jnwhiteh on Fri, 23 Jul 2010 07:58:12
This site is a support site for readers of World of Warcraft Programming: a Guide and Reference for Creating WoW Addons, and an online API reference for readers and the general WoW Addon development community. Material regarding what you're asking is covered in the book, so I'd suggest you start there. You're going to need to use the
COMBAT_LOG_EVENT_UNFILTERED
event. This event is covered in detail in Chapter 21. -
Posted by frostig on Mon, 26 Jul 2010 02:49:06
Thanks for the answer. Luckily, I found an addon that was doing almost the same thing that mine was supposed to do and I was able to record and make my own sounds. If I decide to do anything more serious in the addon-way I will buy the book :)
-
Posted by jnwhiteh on Mon, 26 Jul 2010 12:13:41
Glad to hear it worked out for you.