Login to Account Create an Account
API
#1
Posted 17 July 2015 - 06:31
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.
#2
Posted 17 July 2015 - 06:34
#3
Posted 17 July 2015 - 03:18
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 --////////////////////////////////////////////////////////////////// endI 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 endYou 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.
#4
Posted 17 July 2015 - 03:30
Just missing something like os.clock for orbwalker and evadeThis 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--//////////////////////////////////////////////////////////////////endI 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 endendYou 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.
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)
#5
Posted 17 July 2015 - 03:36
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"
#6
Posted 17 July 2015 - 03:38
sounds fair enough thenOh 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"
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?
#7
Posted 17 July 2015 - 03:47
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...
#8
Posted 17 July 2015 - 03:53
Apparently the class system isn't supported.. Example: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...
class "Vector"
function Vector:__init(x,y,z)
self.x = x
self.y = y
self.z = z
return self
end
#9
Posted 17 July 2015 - 04:32
Can i add those "classes" by default in GoS? Any more information regarding the subject?
#10
Posted 17 July 2015 - 04:33
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
#11
Posted 17 July 2015 - 05:11
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.
#12
Posted 17 July 2015 - 05:38
please add those classes thenI 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.
the networkID is a pretty solid way to index object tables especially for orbwalker purposes
#13
Posted 17 July 2015 - 06:14
How can I prevent channel spell cancel by orbwalk move?
I tried HoldPosition() but no luck.
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users