Jump to content

Welcome to Gaming On Steroids Forums
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account
Photo

Buff Explorer: OnUpdate(Remove)Buff callback

buff

  • Please log in to reply
4 replies to this topic

#1
Meeboo

Meeboo

    Advanced Member

  • Scripts Developer
  • 786 posts
  • LocationUnited States

Hi, this simple script was supposed to work as OnUpdateBuff and OnRemoveBuff callback. It should be useful when you write new script. There is a limitation to it since it works for heroes only. However, you can update it for minion and others

 

Usage:

require "BuffExplorer"

OnUpdateBuff(function(unit,buff) --get triggered when someone gets new buff
--your code here
end)

OnRemoveBuff(function(unit,buff)--get triggered when someone's buff is expired
--your code here
end)

Source: (saves as "BuffExplorer.lua" and put in Common Folder)

 

http://pastebin.com/ZMU0SqYp


  • 2

#2
Aristo

Aristo

    You donut

  • Moderator
  • 12,717 posts
  • LocationSomewhere over the rainbow

Hi, this simple script was supposed to work as OnUpdateBuff and OnRemoveBuff callback. It should be useful when you write new script. There is a limitation to it since it works for heroes only. However, you can update it for minion and others

 

Usage:

require "BuffExplorer"

OnUpdateBuff(function(unit,buff) --get triggered when someone gets new buff
--your code here
end)

OnRemoveBuff(function(unit,buff)--get triggered when someone's buff is expired
--your code here
end)

Source: (saves as "BuffExplorer.lua" and put in Common Folder)

 

http://pastebin.com/ivEYY9HS

Thanx


  • 0

#3
D0vahkiin

D0vahkiin

    Member

  • Contributor
  • 17 posts
  • LocationSkyrim

Hey :)

Thanks for this cool lib !

 

Would it be possible to add .stacks to the buff return ?

 

 

Best regards,

D0vahkiin


  • 0

#4
Meeboo

Meeboo

    Advanced Member

  • Scripts Developer
  • 786 posts
  • LocationUnited States

Hey :)

Thanks for this cool lib !

 

Would it be possible to add .stacks to the buff return ?

 

 

Best regards,

D0vahkiin

It should have stacks.


  • 0

#5
D0vahkiin

D0vahkiin

    Member

  • Contributor
  • 17 posts
  • LocationSkyrim
I've found a way to do it without using the callbacks anyway thanks :D
  • 0




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users