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

API


  • Please log in to reply
5 replies to this topic

#1
c0mrade

c0mrade

    Coder

  • Members
  • 26 posts
  • LocationUK

Functions MIssing?

 

  • Cannot seam to iterate through objects to return champions or minons to create champ/minion tables managers.

 

  • As above, something like GetEnemyChampions(LowHp) or LowMR etc, would be nice, atm theres no way to target and even using CurrentTaget does nothing.

 

  • Distance is not included but can be calculated in scripts, would be nice to have a target.distance automatically though

 

Will add as I find more.


  • 0

#2
Feretorix

Feretorix

    Administrator

  • Administrators
  • 3,177 posts
•Cannot seam to iterate through objects to return champions or minons to create champ/minion tables managers.

You can do this with a simple script:


function ObjectLoopEvent(Object,myHero) --Object is a pointer to the current object, ObjectLoopEvent is looping trough all objects each frame.
local Obj_Type = GetObjectType(Object);
if Obj_Type == Obj_AI_Hero then
	if IsObjectAlive(Object) then
		local hero_origin = GetOrigin(Object);
		local myscreenpos = WorldToScreen(1,hero_origin.x,hero_origin.y,hero_origin.z);
		if myscreenpos.flag then
			DrawText("This is a champion ^^",24,myscreenpos.x,myscreenpos.y,0xffffff00);
			end
		end
	end
end

•As above, something like GetEnemyChampions(LowHp) or LowMR etc, would be nice, atm theres no way to target and even using CurrentTaget does nothing.

One of your missions as a "Core Developer" would be to code functions like GetEnemyChampions(LowHp) or LowMR to ease the life of yourself and other newbie scripters around. Also others have already used "CurrentTaget" in their scripts with success.

•Distance is not included but can be calculated in scripts, would be nice to have a target.distance automatically though

I really might add ths, but others have a semi-distance script available already.
  • 0

#3
Inspired

Inspired

    Took the red pill.

  • Ex-Core Dev
  • PipPipPip
  • 723 posts
  • LocationWonderland

•Cannot seam to iterate through objects to return champions or minons to create champ/minion tables managers.

You can do this with a simple script:

 

function ObjectLoopEvent(Object,myHero) --Object is a pointer to the current object, ObjectLoopEvent is looping trough all objects each frame.
local Obj_Type = GetObjectType(Object);
if Obj_Type == Obj_AI_Hero then
	if IsObjectAlive(Object) then
		local hero_origin = GetOrigin(Object);
		local myscreenpos = WorldToScreen(1,hero_origin.x,hero_origin.y,hero_origin.z);
		if myscreenpos.flag then
			DrawText("This is a champion ^^",24,myscreenpos.x,myscreenpos.y,0xffffff00);
			end
		end
	end
end
•As above, something like GetEnemyChampions(LowHp) or LowMR etc, would be nice, atm theres no way to target and even using CurrentTaget does nothing.

One of your missions as a "Core Developer" would be to code functions like GetEnemyChampions(LowHp) or LowMR to ease the life of yourself and other newbie scripters around. Also others have already used "CurrentTaget" in their scripts with success.

•Distance is not included but can be calculated in scripts, would be nice to have a target.distance automatically though

I really might add ths, but others have a semi-distance script available already.

 

The minion and hero funcs will be there in a bit.

I'm developing a target selector at the moment.

And np for the distance check.


  • 0

#4
TheFoxy

TheFoxy

    Advanced Member

  • Donator
  • 116 posts
  • LocationRight Here :P

I have few questions too:

 

I wanted to ask how do modes work now. When ingame does the GoS still orbwalk by it self and if it does can we get the mode other than keycheks (if KeyIsDown(key) )

Is there OnInputEvent? Like in LS when someone says smtg in chat? Or when player does? if not can we check for this via AfterLoop event since it's fired every frame?

 

Can we make custom orbwalker that would override the existing one and how do disable one in game from the script :S

Can we get the setting in GoS menus and change them?

If spellcast in GoS is set to true would it interfere with our spell casts? Thats why I want to know.... I want to do combo totaly from the script :)


  • 0

#5
Inspired

Inspired

    Took the red pill.

  • Ex-Core Dev
  • PipPipPip
  • 723 posts
  • LocationWonderland

I have few questions too:
 
I wanted to ask how do modes work now. When ingame does the GoS still orbwalk by it self and if it does can we get the mode other than keycheks (if KeyIsDown(key) )
Is there OnInputEvent? Like in LS when someone says smtg in chat? Or when player does? if not can we check for this via AfterLoop event since it's fired every frame?
 
Can we make custom orbwalker that would override the existing one and how do disable one in game from the script :S
Can we get the setting in GoS menus and change them?
If spellcast in GoS is set to true would it interfere with our spell casts? Thats why I want to know.... I want to do combo totaly from the script :)

Yes, GoS still orbwalks by itself unless you include an orbwalker into a script and change the button in the F7 menu.
At the current state we cannot make a fully working custom orbwalker (no autoattacks) and we cannot override the existing one, neither can we disable the inbuilt one autimatically.
If spellcast in GoS is set to true, it indeed interferes with the script's spell casts. As I said, turn everything in F7 off or, even better, change the combo button in F7 menu.
  • 0

#6
Pillow

Pillow

    Advanced Member

  • Members
  • 73 posts
  • LocationSomewhere on Geeky Planet

Yes, 

 

Get Everytime the champion gets in range and it trys to CalcDamage it messes up with that error msg im trying to do this for Kennen and i dont want the E to be calculated as its mostly a mobility spell any way to help? 


function AfterObjectLoopEvent(myHer0)
    myHero = myHer0
    myHeroPos = GetOrigin(myHero)
    DrawText("Nekro Kennen By: Spudgy",24,10,0,0xffff0000);
    waitTickCount = waitTickCount - 1
    local unit = GetCurrentTarget()
    if waitTickCount > 0 and lastTargetName == GetObjectName(unit) then return end
    if KeyIsDown(0x20) then
    end
    if ValidTarget(unit) then
        local dmg = 0
        local hp  = GetCurrentHP(unit)
        local AP = GetBonusAP(myHero)
        local TotalDmg = GetBonusDmg(myHero)+GetBaseDamage(myHero)
        local targetPos = GetOrigin(unit)
        local drawPos = WorldToScreen(1,targetPos.x,targetPos.y,targetPos.z)
        if CanUseSpell(myHero, _Q) == READY then
            dmg = apdmg + CalcDamage(myHero, unit, 0, GetCastLevel(myHero,_Q)+0.75*AP)
        end
        if CanUseSpell(myHero, _W) == READY then
            dmg = apdmg + CalcDamage(myHero, unit, 0, GetCastLevel(myHero,_W)+0.55*AP)
        end
        if CanUseSpell(myHero, _R) ~= ONCOOLDOWN and GetCastLevel(myHero,_R) > 0 then
            dmg = apdmg + CalcDamage(myHero, unit, 0, 30+10*GetCastLevel(myHero,_R)+1.20*AP(myHero))
        end
        if dmg > hp then
            DrawText("Kill",20,drawPos.x,drawPos.y,0xffffffff)
            DrawDmgOverHpBar(unit,hp,0,hp,0xffffffff)
        else
            DrawText(math.floor(100 * dmg / hp).."%",20,drawPos.x,drawPos.y,0xffffffff)
            DrawDmgOverHpBar(unit,hp,0,dmg,0xffffffff)
        end

  • 0




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users