View Single Post
09-28-16, 12:06 PM   #1
luanoob
A Murloc Raider
Join Date: Sep 2016
Posts: 4
Need some help with my first addon

So i wanted a really basic addon for my rogue alt, to tell me when to reroll the «roll the bones» buff.

Basically i wanted this functionality:

When i enter combat i want the text «ROLL THE BONES» to be displayed in the middle of my screen UNTILL i get either True bearing, Shark infested waters OR 2 or more buffs.

I thought that would be really simple, but it's been like 8 hours now and i still dont have it working properly.

So i figured i could ask here and hopefully someone can help me understand what i should do.

Right now it kinda works even though everything i have done is probably wrong, but i get the «ROLL THE BONES» text whenever i activate another buff and not only when im in combat. I figure this is because of the

Lua Code:
  1. textFrame:RegisterEvent("UNIT_AURA")

but i dont understand how exactly im supposed to deal with these frames and events. So if someone could show me a proper way of doing it, i would really appreciate that. All other improvement tips would be great aswell!

Another thing was the text itself, is there not a built in function or something to display the kinda text i want? Do you really need to make it like that from scratch?

Here is the lua file, the first 30 lines is only the code i copy pasted for the fading text.

http://pastebin.com/Ccw1nXi7
  Reply With Quote