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


  • This topic is locked This topic is locked
12 replies to this topic

#1
Inspired

Inspired

    Took the red pill.

  • Ex-Core Dev
  • PipPipPip
  • 723 posts
  • LocationWonderland
GotBuff(myHero,"OdinRecall")
GetBuffName(myHero,4)
-> https://raw.githubus.../Cassiopeia.lua
poisoned always true gg
 
 
CastSkillshot(_Q,origin.x,origin.y,origin.z)
-> Broken, does not even exist


Getting x,y,z coordinates from objects works but is very annoying
local target = GetCurrentTarget()
local targetPos = GetOrigin(target)
Now I can work with x,y,z
-> Please index, or at least give target an attribute .pos


We need a goddamn way to reload without alt+f4 and re-opening the game ty.
  • 1

#2
Platypus

Platypus

    Bitcoin and Paysafecard payments are now available

  • Banned
  • PipPipPip
  • 1,289 posts

^


  • 0

#3
Feretorix

Feretorix

    Administrator

  • Administrators
  • 3,139 posts
This post has been edited twice and i have fixed a typo in my code.
 
function AfterObjectLoopEvent(myHero)
--//////////////////////////////////////////////////////////////////
--The problem is CastSkillShot not CastSkillshot (capital S)
local capspress = KeyIsDown(0x14);
if capspress then
	local castusage = CanUseSpell(myHero,_Q);
	if castusage == READY then
		local mousepos = GetMousePos();
		CastSkillShot(_Q,mousepos.x,mousepos.y,mousepos.z);
		end
	end
--//////////////////////////////////////////////////////////////////
--the problem is that first you need to check if a buff at index I has count stacks bigger than 0, then get the name of it
--since as the game progresses buffs fade away (stack 0) but their names get saved on the game memory
local recalling = false
for i=0,63 do
	if GetBuffCount(myHero, i) > 0 then
		if GetBuffName(myHero, i):lower():find("recall") then
			recalling = true
			end
		end
	end
if recalling then
	DrawText("Recalling right now.",24,0,0,0xffff0000);
	end
--//////////////////////////////////////////////////////////////////
end
I can make getting XYZ of an object easier for example "target.pos" (predefined), but that means i will have to get the XYZ for all the possible objects in LOL and return them in LUA itself, calling a functions hundred of times might cause a slowdown, and it's not quite sure that it will be used in a script.


For example in a script like this:
 
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
You will get the XYZ from the engine for only 9 objects (in this case, the players) with some additional checks. This saves tons of FPS for potato computers.
But anyway, i will consider your idea and see how much performance will hit actually.


--------------


Also i will make an option to reload scripts with a hotkey; without the need of killing LOL.exe process and reconnecting back to the game.



------------


Thanks for all the great feedback so far. Keep up the good work, you are the best scripter around ATM.
  • 2

#4
Inspired

Inspired

    Took the red pill.

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

This post has been edited twice and i have fixed a typo in my code.

function AfterObjectLoopEvent(myHero)--//////////////////////////////////////////////////////////////////--The problem is CastSkillShot not CastSkillshot (capital S)local capspress = KeyIsDown(0x14);if capspress then	local castusage = CanUseSpell(myHero,_Q);	if castusage == READY then		local mousepos = GetMousePos();		CastSkillShot(_Q,mousepos.x,mousepos.y,mousepos.z);		end	end--//////////////////////////////////////////////////////////////////--the problem is that first you need to check if a buff at index I has count stacks bigger than 0, then get the name of it--since as the game progresses buffs fade away (stack 0) but their names get saved on the game memorylocal recalling = falsefor i=0,63 do	if GetBuffCount(myHero, i) > 0 then		if GetBuffName(myHero, i):lower():find("recall") then			recalling = true			end		end	endif recalling then	DrawText("Recalling right now.",24,0,0,0xffff0000);	end--//////////////////////////////////////////////////////////////////end
I can make getting XYZ of an object easier for example "target.pos" (predefined), but that means i will have to get the XYZ for all the possible objects in LOL and return them in LUA itself, calling a functions hundred of times might cause a slowdown, and it's not quite sure that it will be used in a script.For example in a script like this:
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	endend
You will get the XYZ from the engine for only 9 objects (in this case, the players) with some additional checks. This saves tons of FPS for potato computers.But anyway, i will consider your idea and see how much performance will hit actually.--------------Also i will make an option to reload scripts with a hotkey; without the need of killing LOL.exe process and reconnecting back to the game.------------Thanks for all the great feedback so far. Keep up the good work, you are the best scripter around ATM.
Just missing something like os.clock for orbwalker and evade
Also GotBuff seemed to return true, always. Could you change it so it returns true only if buff is valid or add another func for that? otherwise we have to triplecheck..
Edit: Is there something by which i can 100% identify a single object? (obj.networkID)
  • 0

#5
Feretorix

Feretorix

    Administrator

  • Administrators
  • 3,139 posts

Oh wow, again my great mistake.

GotBuff returns an INT, not BOOL.

The INT return value holds how much "stacks" the buff we "got" actually has.

It does not return a boolean.

I will fix the main lua API file, fixing that GotBuff mistake and fixing "CastSkillShot"


  • 1

#6
Inspired

Inspired

    Took the red pill.

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

Oh wow, again my great mistake.
GotBuff returns an INT, not BOOL.
The INT return value holds how much "stacks" the buff we "got" actually has.
It does not return a boolean.
I will fix the main lua API file, fixing that GotBuff mistake and fixing "CastSkillShot"

sounds fair enough then
but what about time and identifying objects?
also when i tried to write a Vector class it didn't know what "class" is, could you check on that?
  • 0

#7
Feretorix

Feretorix

    Administrator

  • Administrators
  • 3,139 posts
Actually some other API functions are planned to be reversed (if required) and then released.

That's why the API is currently an ALPHA version. It will become BETA when it's probably complete but there are possible bugs.

If you can, please make a new thread with "API Requests" regarding, but not limited to;

os.clock (or any other os.function_name_here)

"Vector" as a variable i guess?

GetDistance (easy version from GoS?)

GetPing (required for perfect OrbWalking?)

Any other that's on your mind...
  • 0

#8
Inspired

Inspired

    Took the red pill.

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

Actually some other API functions are planned to be reversed (if required) and then released.That's why the API is currently an ALPHA version. It will become BETA when it's probably complete but there are possible bugs.If you can, please make a new thread with "API Requests" regarding, but not limited to;os.clock (or any other os.function_name_here)"Vector" as a variable i guess?GetDistance (easy version from GoS?)GetPing (required for perfect OrbWalking?)Any other that's on your mind...

Apparently the class system isn't supported.. Example:
class "Vector"
function Vector:__init(x,y,z)
self.x = x
self.y = y
self.z = z
return self
end
  • 0

#9
Feretorix

Feretorix

    Administrator

  • Administrators
  • 3,139 posts

Can i add those "classes" by default in GoS? Any more information regarding the subject?


  • 0

#10
KOHH

KOHH

    Newbie

  • Members
  • 2 posts

Can i add those "classes" by default in GoS? Any more information regarding the subject?

bol has inbuild help for classes

you dont have to add this. users can make their own class structures


  • 0

#11
Feretorix

Feretorix

    Administrator

  • Administrators
  • 3,139 posts

I can pretty much embed those in GoS.dll.

 

@Inspired, on your question, i can release also NetworkID for objects. But i don't use that anywhere really.


  • 0

#12
Inspired

Inspired

    Took the red pill.

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

I can pretty much embed those in GoS.dll.
 
@Inspired, on your question, i can release also NetworkID for objects. But i don't use that anywhere really.

please add those classes then
the networkID is a pretty solid way to index object tables especially for orbwalker purposes
  • 0

#13
ilovesona

ilovesona

    Sona's wife

  • Contributor
  • 1,096 posts

How can I prevent channel spell cancel by orbwalk move?

 

I tried HoldPosition() but no luck.


  • 0




2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users