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

[NewUpdate - Must See] New Events / Callbacks [w/ MeoBeo]

callbacks events

Best Answer Async , 17 April 2017 - 06:51

There has been a new update for you all to know.

 

With this new version you decide which callback you want to load, instead of having all of them running in the background although you were not going to use them.

This version also includes a few performance improvements.

 

 

How does this work?

 

As of now we have 5 callbacks which are the following ones:

  • LevelUp (OnLevelUp)
  • BuffExplorer  (OnUpdateBuff/OnRemoveBuff)
  • Animation (OnAnimation)
  • Vision (OnGainVision / OnLoseVision)
  • Item (OnBuyItem / OnSellItem)

To load one, two, or all of them you need to do this:

 

Let's imagine we want to load LevelUp and Vision Callbacks:

require("callbacks")["Load"]({"levelup", "vision"}) -- not case sensitive

And this would be everything as of now, have fun... I guess.

Go to the full post »


  • Please log in to reply
7 replies to this topic

#1
Async

Async

    Advanced Member

  • Contributor
  • 107 posts

MeoBeo and me have decided to make a unique topic with the callbacks we have written. Respective topics will be written here. We will be adding more with the time.

 

 

If any of you want to contribute feel free to PM one of us.

 

 

GLOBAL API

Spoiler

 

On(Update/Remove)Buff(unit/buff) -- MeoBeo

Spoiler

 

On(Gain/Lose)Vision(unit) -- Async

Spoiler

 

OnAnimation(unit, animation) -- Async

Spoiler

 

OnLevelUp(unit, levelData) -- Async   NEW

Spoiler

 

On(Buy/Sell)Item(itemData, slot) -- Async   NEW

Spoiler

 

Source(save as "Callbacks.lua" and put in Common Folder)

 

That GitHub is maintained by us both, meaning he can also do changes / improvements, you may also want to contact him if you want to improve this. 


  • 3

#2
Shulepin

Shulepin

    Advanced Member

  • Contributor
  • 185 posts
  • LocationRussia

Nisu 


  • 0

#3
fubman

fubman

    Advanced Member

  • Contributor
  • 48 posts

GJ! :D


  • 0

#4
Async

Async

    Advanced Member

  • Contributor
  • 107 posts

Added OnBuyItem and OnSellItem

 

Added reference tables and buff types.

 

^_^


  • 0

#5
LeighaLish

LeighaLish

    Advanced Member

  • Ex-Staff
  • PipPipPip
  • 1,156 posts

Can I request, IsShopOpen or something so I dont type ` into shop always


  • 0

#6
Async

Async

    Advanced Member

  • Contributor
  • 107 posts

Hmmm with the current API I can't manage to code that, we have IsChatOpen... I guess you should contact Feretorix for that


  • 0

#7
Deftsu

Deftsu

    donthackourgames

  • Ex-Core Dev
  • PipPipPip
  • 4,812 posts
OnAnimation doesn't work like that lol
  • 1

#8
Async

Async

    Advanced Member

  • Contributor
  • 107 posts
✓  Best Answer

There has been a new update for you all to know.

 

With this new version you decide which callback you want to load, instead of having all of them running in the background although you were not going to use them.

This version also includes a few performance improvements.

 

 

How does this work?

 

As of now we have 5 callbacks which are the following ones:

  • LevelUp (OnLevelUp)
  • BuffExplorer  (OnUpdateBuff/OnRemoveBuff)
  • Animation (OnAnimation)
  • Vision (OnGainVision / OnLoseVision)
  • Item (OnBuyItem / OnSellItem)

To load one, two, or all of them you need to do this:

 

Let's imagine we want to load LevelUp and Vision Callbacks:

require("callbacks")["Load"]({"levelup", "vision"}) -- not case sensitive

And this would be everything as of now, have fun... I guess.


  • 0




2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users