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

[Script] Priority focus (Modification of Inspired.lua "function GetTarget")


  • Please log in to reply
16 replies to this topic

#1
erwannludovic

erwannludovic

    Newbie

  • Members
  • 7 posts

Hi every one, something really important is missing on script -> Targetting priority

to get priority working on every script i change some line of code into "Inspired.lua"

 

978297UPLOAD.jpg

 

 

Search this function into "inspired.lua" :

function GetTarget(range, damageType)	
	damageType = damageType or 2
    local target, steps = nil, 10000
    for _, k in pairs(GetEnemyHeroes()) do
        local step = GetCurrentHP(k) / CalcDamage(GetMyHero(), k, DAMAGE_PHYSICAL == damageType and 100 or 0, DAMAGE_MAGIC == damageType and 100 or 0)
        if k and ValidTarget(k, range) and step < steps then
            target = k
            steps = step
        end
    end
    return target
end

replace by :

function GetTarget(range, damageType)	

if PriorityConfig.priority then
	for _, k in pairs(GetEnemyHeroes()) do
			if k and ValidTarget(k, range) and loadstring("return PriorityConfig." .. GetObjectName(k))() then
			-- PrintChat(GetObjectName(k))
			return k
		end
	end
end
	
	
	damageType = damageType or 2
    local target, steps = nil, 10000
    for _, k in pairs(GetEnemyHeroes()) do
        local step = GetCurrentHP(k) / CalcDamage(GetMyHero(), k, DAMAGE_PHYSICAL == damageType and 100 or 0, DAMAGE_MAGIC == damageType and 100 or 0)
        if k and ValidTarget(k, range) and step < steps then
            target = k
            steps = step
        end
    end
    return target
end

then add just before the function you re-write :

-- ADD PRIORITY MENU-------------------
local priorityMenuDraw = 0
OnLoop(function(myHero)
	if priorityMenuDraw == 0 then
		 PriorityConfig = scriptConfig("Inspired priority", "Inspired.lua")
		 PriorityConfig.addParam("priority", "Use priority", SCRIPT_PARAM_ONOFF, true)
		for _, k in pairs(GetEnemyHeroes()) do
			PriorityConfig.addParam(GetObjectName(k), GetObjectName(k) .. " priority", SCRIPT_PARAM_ONOFF, false)
		end
		priorityMenuDraw = 1
	end
end)
----------------------------

You can Active/Desactive the priority, and put true or false to choose witch heroe will be focus.

 

Update for Inspired v16

 

 

This fonctionnality isnt great actually because we cant make a list of priority, the list is directly create by the api when we iterate with GetEnemyHeroes(), that mean you can only focus your priority on 1 heroe.

 

if someone know how to make a sortable list with the menu, this will be perfect

 

 

if you wana try the beta version and dont have knowledge to modify the file ->

https://github.com/E...er/Inspired.lua


  • 1

#2
WizKalibog

WizKalibog

    Advanced Member

  • Members
  • 174 posts
  • LocationSA PILIPINAS KONG MINAMAHAL

Hi every one, something really important is missing on script -> Targetting priority

to get priority working on every script i change some line of code into "Inspired.lua"

 

 

 

Search this function into "inspired.lua" :

function GetTarget(range, damageType)	
	damageType = damageType or 2
    local target, steps = nil, 10000
    for _, k in pairs(GetEnemyHeroes()) do
        local step = GetCurrentHP(k) / CalcDamage(GetMyHero(), k, DAMAGE_PHYSICAL == damageType and 100 or 0, DAMAGE_MAGIC == damageType and 100 or 0)
        if k and ValidTarget(k, range) and step < steps then
            target = k
            steps = step
        end
    end
    return target
end

replace by :

function GetTarget(range, damageType)	

if PriorityConfig.priority then
	for _, k in pairs(GetEnemyHeroes()) do
			if k and ValidTarget(k, range) and loadstring("return PriorityConfig." .. GetObjectName(k))() then
			PrintChat(GetObjectName(k))
			return k
		end
	end
end
	
	
	damageType = damageType or 2
    local target, steps = nil, 10000
    for _, k in pairs(GetEnemyHeroes()) do
        local step = GetCurrentHP(k) / CalcDamage(GetMyHero(), k, DAMAGE_PHYSICAL == damageType and 100 or 0, DAMAGE_MAGIC == damageType and 100 or 0)
        if k and ValidTarget(k, range) and step < steps then
            target = k
            steps = step
        end
    end
    return target
end

then add just before the function you re-write :

-- ADD PRIORITY MENU-------------------
local priorityMenuDraw = 0
OnLoop(function(myHero)
	if priorityMenuDraw == 0 then
		 PriorityConfig = scriptConfig("Inspired priority", "Inspired.lua")
		 PriorityConfig.addParam("priority", "Use priority", SCRIPT_PARAM_ONOFF, true)
		for _, k in pairs(GetEnemyHeroes()) do
			PriorityConfig.addParam(GetObjectName(k), GetObjectName(k) .. " priority", SCRIPT_PARAM_ONOFF, false)
		end
		priorityMenuDraw = 1
	end
end)
----------------------------

You can Active/Desactive the priority, and put true or false to choose witch heroe will be focus.

 

 

This fonctionnality isnt great actually because we cant make a list of priority, the list is directly create by the api when we iterate with GetEnemyHeroes(), that mean you can only focus your priority on 1 heroe.

 

if someone know how to make a sortable list with the menu, this will be perfect

i dont know how to change can you upload new inspired.lua??


  • 2

#3
erwannludovic

erwannludovic

    Newbie

  • Members
  • 7 posts

https://github.com/E...er/Inspired.lua


  • 1

#4
NotScripter

NotScripter

    Member

  • Members
  • 29 posts

using it :D


  • 0

#5
lbmain

lbmain

    Advanced Member

  • Members
  • 297 posts
  • Locationsomewhere over the rainbow

I dont get it at all maybe im stupid.

What does this change exactly do? pls explain it to me. Does it things like dont prio attacking the Tanks as adc?


  • 0

#6
Marfix

Marfix

    Member

  • Members
  • 28 posts
  • LocationNew York

I dont get it at all maybe im stupid.

What does this change exactly do? pls explain it to me. Does it things like dont prio attacking the Tanks as adc?

upppzz


  • 0

#7
ilovesona

ilovesona

    Sona's wife

  • Contributor
  • 1,096 posts

it uses vayne e on katarina's ulti so you won't let kata ulti on team fights

it's not... :fappa:


  • 0

#8
ButterSmooth

ButterSmooth

    Advanced Member

  • Members
  • 710 posts

it's not... :fappa:

His logic Kappa
  • 0

#9
AnhDuc

AnhDuc

    GoS Lover

  • Contributor
  • 3,208 posts
  • LocationVietnam

it uses vayne e on katarina's ulti so you won't let kata ulti on team fights

:))


  • 0

#10
lbmain

lbmain

    Advanced Member

  • Members
  • 297 posts
  • Locationsomewhere over the rainbow

Do i smell troll butthurt?


  • 0

#11
Yun

Yun

    Advanced Member

  • Members
  • 177 posts

can u part in Inspired make a new lua ?


  • 0

#12
ilovesona

ilovesona

    Sona's wife

  • Contributor
  • 1,096 posts

can u part in Inspired make a new lua ?

I think he did it....at the end of first post :fappa:


  • 0

#13
oscarwyt

oscarwyt

    Advanced Member

  • Members
  • 61 posts

i think the idea is good.. but why theres nobody talking about it lol


  • 0

#14
stephenjason89

stephenjason89

    Advanced Member

  • Members
  • 41 posts

it's not... :fappa:

does it use vayne's E on zac while flying towards you? :D


  • 0

#15
ilovesona

ilovesona

    Sona's wife

  • Contributor
  • 1,096 posts

does it use vayne's E on zac while flying towards you? :D

cmon....this is target selector....it won't cast anything for you


  • 0

#16
stephenjason89

stephenjason89

    Advanced Member

  • Members
  • 41 posts

cmon....this is target selector....it won't cast anything for you

hahaha just messing with you bro :D


  • 0

#17
Chidory

Chidory

    Advanced Member

  • Members
  • 165 posts

very nice thx


  • 0




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users