You are not logged in.

Applications: [GameMaster: OPEN] | [Volunteer Testers: OPEN]


This forum will be permanently shut down on Friday 13.07.2018
Please copy or save all important information from old forum before they will be deactivated
We have moved to new board. https://forum.runesofmagic.gameforge.com/Come join us.

1

Tuesday, October 25th 2016, 11:24am

UNIT_BUFF_CHANGED Event

This Event appers to have two ...arguments?.. associated with it. "arg1" is theunitname, "player" "target" etc. But I'm not sure what the arg2 number represents. I've got values from 0 to 100, 75, 64, 11598, etc....Can't seem to find any correlation between the change in buffs and arg2.


I'm trying to work on an addon to count the number of times a particular buff is received. I have a simple frame registered to the UNIT_BUFF_CHANGED event, and when arg1 is "player", I scan through player buffs to increment a counter. The problem is that this event fires multiple times, and for a single count, I end up with a counter value of 16+.

I'm currently playing with UnitBuffLeftTime > X to try to get only a single count for a given event. There's a limitation to this though....if an unrelated buff gets applied/refreshed while time > X, you still get multiple counts.

But I was hoping there was a simpler way, maybe through some global variable associated with the UNIT_BUFF_CHANGED event (like how _source and _target are related to COMBATMETER_DAMAGE event).


EDIT: It occurred to me that I can just use the combat log message event rather than going through the buff bar, but question about buff-related global vars still remains.

This post has been edited 3 times, last edit by "BlankMinded" (Oct 25th 2016, 9:46pm)


mohammed1234

WarriorKing

Posts: 594

Location: Everywhere but here

Occupation: Selfmade

  • Send private message

2

Tuesday, October 25th 2016, 5:12pm

What are you talking about ? The water fall with the buff or is their a Halloween buff ?

3

Tuesday, October 25th 2016, 5:34pm


What are you talking about ? The water fall with the buff or is their a Halloween buff ?
I lol'd. He's probaby trying to make an add on to count how many times he gets the chain drive proc from having the forge buff active on Champion. Likely to compare the amount of procs in shield form and disassembly form.
Maimed - S/WD(R)(W)(M)(D) Wallet/Warrior

mohammed1234

WarriorKing

Posts: 594

Location: Everywhere but here

Occupation: Selfmade

  • Send private message

4

Tuesday, October 25th 2016, 5:36pm

Oh lol I was looking like wtf but wait he said something about event

5

Tuesday, October 25th 2016, 9:36pm

If I was asking about the festival (aka event) I would not have placed this thread in the "AddOns, UI & questins & issues" section of the forums. As such, if you don't understand a thread in this section of the forums, your comments of confusion only clutter them unnecessarily (as does this comment but I feel it had to be said).

This post has been edited 1 times, last edit by "BlankMinded" (Oct 25th 2016, 9:44pm)


6

Friday, November 4th 2016, 9:25pm

Not directly an answer to your question, but:
Taktyq has written an addon to count chain drive/forge. Look here for the addon (and here for the test results).

Both forum posts should google-translate well from Polish into English. The last comment in the addon post mentions differences between COMBATMETER_DAMAGE and UNIT_BUFF_CHANGED (but again - not exactly what you have asked about).
>>>> >>>> >>>>
>>>>
>>>> Please, bring back (bound if there is no other option) dias to AH! :thumbsup:
>>>> If you do this we will all love you forever. ;)
>>>>
>>>> >>>> >>>>

7

Monday, November 14th 2016, 8:58pm

So I've started investigating this event, in an attempt to be able to use it in an addon I'm making. I'm getting some strange results, so I'm wondering anyone out there is able to help.

The event fires multiple times for a single buff or debuff. I need to find some way to run code only 1 time when a debuff is applied (right now I get chat window spam messages when I receive a debuff).


I've been testing in a duel against a warlock/mage using soul pain (which applies a 24s and a 20s debuff), and just manually printing arg1 arg2 arg3 when the event fires. It fires a few times upon use of soul pain, and 1 time when the 20s debuff expires (but not when the 24s debuff expires).

arg1 is always the buff / debuff name

arg2
sometimes returns nil, but sometimes returns a number. Even with the same debuff, the number changes when I close, then open a new client. This suggests it is an address or object ID, but I'm unsure how to do anything with this. It also doesn't really answer why it is nil sometimes, and a number other times.


Strange event...

This post has been edited 3 times, last edit by "BlankMinded" (Nov 14th 2016, 9:47pm)


8

Monday, November 14th 2016, 9:48pm

So just to understand, let's say AD goes on the boss. Lasts 3 seconds. You want a text on screen to tell you AD is on the Boss. But it seems to be spamming you with messages the whole duration?

Perhaps you tried it already, but would adding a timer like adding a slash timer in diyce work? I am not sure if these are even the same thing. it would require a lot code since you would probably have to add in timers for a million things.


Or debuffs you mean boss specific buffs that happen? like stacks on hope?

these are just guesses and trying to figure out in a layman's terms since your question is already really confusing to me. i could be completely going the wrong direction
Osha Erebos - Evilempires
Shaynoff R/S/M (98/98/85)
Rakalaka M/P/L (98/98/98)
Ffonyahs Wd/W/S (98/98/98)

9

Tuesday, November 15th 2016, 4:02am

The purpose is less important than the event itself. Essentially I want to understand how it works from a programming perspective, to better ultilise it in code.

I have only few courses of basic programming, hoping someone with more knowledge of programming in general, and runes of magic coding, might be able to assist. Essentially there's more to the event than what is listed on the wiki, and I want assistance in deciphering the other arguments it returns when it fires.

Similar threads