Making / Updating basic wPvP addons

Greetings,

I made an addon a few years ago with the help of the people here. I recently came back to WoW and want to update it, and maybe make a few other extremely simple addons. I’m mostly using this space to talk to myself, but if anyone reads it and has insights to offer I’d be more than happy for any assistance provided.

a) What’s the best way to search for lua api commands? The websites I used to use seem to have broke/moved? Or should I use visual studio code and download the WoW packs? (Years ago I used notepad and notepad++, using VS code is kind of amazing in comparison lol.)

b) I deeply enjoy writing addons because I can test them, but everything I’ve written so far seems to have broken. Is there a best way to debug things, or to find if old api calls have been broken/changed?

Thank you so much for all your time. I’ll probably use this thread a lot to post code/try to explain it to myself as I figure out what I’m trying to do, but again don’t feel like anyone needs to respond or anything. It just helps to like, have to write about this and explain it, I hope that makes sense.

Generally Google/WoWPedia. There’s also https://github.com/Gethe/wow-ui-source/ if you want to look at the actual source code.

BugStack & Bug Grabber

1 Like

Thank you so much!

Using that website you linked + a link there to wowprogramming I was able to find:

realm = GetRealmName()
maxHealth = UnitHealthMax(unit)
COMBAT_LOG_EVENT_UNFILTERED
and UnitAura stuff which I’m still trying to comprehend.

These are like 90% of what I’m looking for, thank you so much! I couldn’t find a way to get the name of the target of target. I found some vehicle stuff, and some stuff that looked like it was trying to change the target which was protected, but what I’d like is to be able to know the name of the target of target (of target of target as far as the code will let me go.)

local name, realm = UnitName("targettarget")

local name, realm = UnitName("targettargettargettarget")

Functions starting with Unit…() take the unit you want information for as the first parameter.

You will probably also want to look into events that “fire” when things happen in-game eg.

PLAYER_TARGET_CHANGED
PLAYER_LOGIN
UNIT_xxx

There a lots of others.

1 Like

Thank you so much! I think you were the one that helped me in 2018 and showed me how to use PLAYER_TARGET_CHANGED!

edit:

Greetings,

I think I need to look into a way of understanding what other enemy players are in combat with me. So far I’ve found:

UnitAffectingCombat(), PLAYER_REGEN_ENABLED / DISABLED for checking when I’m in combat, and UNIT_COMBAT, but UNIT_COMBAT doesn’t seem to be what I’m looking for since it requires the unit to also take damage.

Are there any other tools that I’m missing that anyone knows off the top of their head. The more I work on this thing the more I realize that what I need to do like, increases from a simple addon to a monster lol.

I’m guessing a simple COMBATLOG_EVENT_UNFILTERED with a sourceName and UnitAffectingCombat() might be the best starting points?

Thank you everyone for your time in reading this. Just typing it all out seems to help me a lot in understanding what I need to do.