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

AzPriority | API and UI to choose priority order

api priority order order manager

  • Please log in to reply
10 replies to this topic

#1
Sheater

Sheater

    Newbie

  • Trial Developer
  • 2 posts

AzScript : AzPriority

 

ezgif.com-gif-maker17139a5051ffc03b.gif

 

AzPriority is an User Interface to let the user to choose the priority for the scripts/actions and an API to avoid conflict between scripts/action

 

The users just need to press [F8] and choose the priority order (of course, user preferences are saved)

 

Getting started for the script developers:

 

1) Add AzPriority.lua into Common folder

 

2) Register your script or actions, like that:

-- Include the library

require('AzPriority')

-- Register your script/actions

AzPriority:register('SuperEvade')
AzPriority:register('SuperKillSteal')

-- Lock if you need
-- Lock function will return true if you are allowed

function IncomingSkillshot()
    if (AzPriority:lock('SuperEvade')) then
        ...
    end
end

-- The player is now safe ? No need anymore to dodge ?
-- Then lest's go to unlock
-- You can call unlock even if it wasn't lock

AzPriority:unlock('SuperEvade')

-- Be careful, you can lose the lock, if another action that has priority requests the lock
-- A function can be called if the lock got aborted by a bigger priority

AzPriority:lock('Movement', function() print('LOCK GOT STEALED!!!') end)

-- My recommandation:
-- unlock() at the start of each of your ticks and lock everytime you need an action
-- If you lock when you have already lock, you will just replace the callback
-- Best pratices:

local script_name = 'KarthusKillSteal'

function OnTick()
    AzPriority:unlock(script_name)
    
    if (EnemyIsLowLife()) then
        if (AzPriority:lock(script_name)) then
            KarthusPressR()
        end
    end
end

-- GGWP, now the user can just choose if he preff KillSteal or DodgeSpell in priority :)

Download: https://gist.githubu.../AzPriority.lua

 

 

DOCUMENTATION:

AzPriority:register(<string> name)
AzPriority:unregister(<string> name)
AzPriority:lock(<string> name, <function> abort_callback) boolean -- return true on success
AzPriority:unlock(<string> name) boolean -- return true on success

  • 6

#2
DamnedNooB

DamnedNooB

    Advanced Member

  • Scripts Developer
  • 929 posts

:o :thugdoge:


  • 0

#3
Devereux

Devereux

    Advanced Member

  • Trial Developer
  • 112 posts

Nice one!


  • 0

#4
Aristo

Aristo

    You donut

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

Wow, interesting


  • 0

#5
borgcarloop

borgcarloop

    Advanced Member

  • Premium
  • 345 posts

any actual script that support this?


  • 0

#6
Sheater

Sheater

    Newbie

  • Trial Developer
  • 2 posts

any actual script that support this?

 

Not at the moment, but I will publish my scripts within a week who will use the priority api (champions + evade)


  • 0

#7
borgcarloop

borgcarloop

    Advanced Member

  • Premium
  • 345 posts

Not at the moment, but I will publish my scripts within a week who will use the priority api (champions + evade)

great thanks


  • 0

#8
zgjfjfl

zgjfjfl

    Advanced Member

  • Scripts Developer
  • 211 posts

Not at the moment, but I will publish my scripts within a week who will use the priority api (champions + evade)

Bro, you've had a week too long :D


  • 1

#9
borgcarloop

borgcarloop

    Advanced Member

  • Premium
  • 345 posts

Bro, you've had a week too long :D


True still waiting
  • 0

#10
dayz2000

dayz2000

    Advanced Member

  • Members
  • 113 posts

Bro, you've had a week too long  :D


  • 0

#11
Aristo

Aristo

    You donut

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

Not at the moment, but I will publish my scripts within a week who will use the priority api (champions + evade)

2053?  :ph34r:


  • 0





Also tagged with one or more of these keywords: api, priority order, order manager

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users