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

Latest GoS for LoL EXT [API documentation]


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

#1
Feretorix

Feretorix

    Administrator

  • Administrators
  • 3,016 posts

Post last modified 20th April 2023.(Check the latest post.)
 

	MenuElement - Class
		MenuElement({}) -- initial call; returns instance
			possible properties of the input table:
				- id = "string", can be omitted but then it will not save
				- name = "string"
				- type = MENU|PARAM|SPACE, for PARAM type can be omitted
				- leftIcon = "string" [URL!], -> icon displayed on the left, 100% menu height
				- rightIcon = "string" [URL!] -> automatically converts param to boolean, 50% menu height
				- icon = "string" [URL!] -> icon displayed on the right, e.g. sub menu, 100% menu height
				- value =
					-> true|false, creates boolean param
					-> number, creates slider param
						-> + min = "number" + max = "number" [+ step = "number"] [+ identifier = "string"]
						or
						-> drop = {"string"[, "string", ...]}
					-> table {"number", "number"}, creates min/max slider param
						-> + min = "number" + max = "number" [+ step = "number"]
				- color = "color", creates color param
					-> Draw.Color(integer)
					or
					-> Draw.Color(hex)
					or
					-> Draw.Color(alpha, red, green, blue)
					or
					-> Draw.Color(hue, saturation, lightness)
				- key = "number", creates key param
				- toggle = "boolean", defaults to false, used to make a toggle key param
				- callback = "function"
					-> gets called on param change with changed value as input
				- onKeyChange = "function"
					-> gets called on key change with changed key as input
				- onhover = "function"
					-> gets called on param hover with the param as input
				- onclick = "function"
					-> gets called on param click with the param as input
				- tooltip = "string"
					-> gets displayed on hover
		instance:MenuElement({})
			creates submenu
		instance:Value([newVal])
			-> if called without newVal it returns the current value
			-> if called with newVal it'll set the current value to newVal and return it
		instance:Sprite(which[, url])
			-> which = "string"; "leftIcon"|"rightIcon"|"icon"
			-> if called without url it returns the current sprite
			-> if called with url it'll set the current sprite to that url
		instance:Hide([bool])
			-> if called without bool it'll toggle the hide property between true|false and return it
			-> if called with bool it'll set the hide property to that value and return it
		instance:Remove()
			-> this will permanently remove the MenuElement

	Example:
		local menu = MenuElement({id = "myMenu", name = "This is my Menu", type = MENU})
		menu:MenuElement({id = "bool", name = "My boolean Value", value = true})
		menu:MenuElement({id = "slide", name = "My slider", value = 0.7, min = 0, max = 1, step = 0.1})
		menu:MenuElement({id = "space", name = "This will get hidden on mouse click", type = SPACE, onclick = function() menu.space:Hide() end})
		Callback.Add("Tick", function()
			PrintChat("My bool: "..tostring(menu.bool:Value()).."; My slider: "..menu.slide:Value()..";")
		end)



Vector - Class
	Vector(...) -- initial call; returns instance
		overloads:
			() => 'nullvector' => (0, 0, 0)
			({x = 100, y = 100}) => (xy-table) => (100, 100)
			({x = 100, y = 0, z = 100}) => (xyz-table) => (100, 0, 100)
			(100, 0, 100) => (number, number, number) => (100, 0, 100)
			({x = 0, y = 50, z = 75}, {x = 100, y = 100, z = 100}) => (startVec, endVec) => (100, 50, 25)
	properties:
		.x -- the x value
		.y -- the y value
		.z -- the z value
		.onScreen -- for 2D vectors
	functions:
		:To2D() -- returns screenpos from Vector3 (alias ToScreen)
		:ToMM() -- returns minimap position from Vector3
		:Clone() -- returns a new vector
		:Unpack() -- returns x, y, z
		:DistanceTo(Vector) -- returns distance to another vector or, if ommited, myHero
		:Len() -- returns length
		:Len2() -- returns squared length
		:Normalize() -- normalizes a vector
		:Normalized() -- creates a new vector, normalizes it and returns it
		:Center(Vector) -- center between 2 vectors
		:CrossProduct(Vector) -- cross product of 2 vectors (alias: CrossP)
		:DotProduct(Vector) -- dot product of 2 vectors (alias: DotP)
		:ProjectOn(Vector) -- projects a vector on a vector
		:MirrorOn(Vector) -- mirrors a vector on a vector
		:Sin(Vector) -- calculates sin of 2 vector
		:Cos(Vector) -- calculates cos of 2 vector
		:Angle(Vector) -- calculates angle between 2 vectors
		:AffineArea(Vector) -- calculates area between 2 vectors
		:TriangleArea(Vector) -- calculates triangular area between 2 vectors
		:RotateX(phi) -- rotates vector by phi around x axis
		:RotateY(phi) -- rotates vector by phi around y axis
		:RotateZ(phi) -- rotates vector by phi around z axis
		:Rotate(phiX, phiY, phiZ) -- rotates vector 
		:Rotated(phiX, phiY, phiZ) -- creates a new vector, rotates it and returns it
		:Polar() -- returns polar value
		:AngleBetween(Vector, Vector) -- returns the angle formed from a vector to both input vectors
		:Compare(Vector) -- compares both vectors, returns difference
		:Perpendicular() -- creates a new vector that is rotated 90° right
		:Perpendicular2() -- creates a new vector that is rotated 90° left
		:Extend(Vector, distance) -- extends a vector towards a vector
		:Extended(Vector, distance) -- creates a new vector, extends it and returns it
		:Shorten(Vector, distance) -- shortens a vector towards a vector
		:Shortened(Vector, distance) -- creates a new vector, shortens it and returns it
		:Lerp(Vector, delta) -- creates a new vector, lerps it towards vector by delta



Sprite - Class
	Sprite(path)
		overloads:
			Sprite(path, scale)
			Sprite(path, scaleX, scaleY)
	properties (READ-ONLY):
		.x -- the x value
		.y -- the y value
		.pos -- Vector2
		.path -- file path
		.width -- the width
		.height -- the height
		.scale -- the scale
		.color -- the color
	functions:
		:Draw() -- draws the sprite at .pos
		:Draw(Vector2) -- draws the sprite at Vector2
		:Draw(x, y) -- draws the sprite at x y
		:Draw({x, y, w, h}, Vector2) -- draws a rectangle of the sprite at Vector2
		:Draw({x, y, w, h}, x, y) -- draws a rectangle of the sprite at x y
		:SetScale(scale) -- sets a sprite's scale
		:SetScale(scaleX, scaleY) -- sets a sprite's scale
		:SetPos(Vector2) -- sets a sprite's pos
		:SetPos(x, y) -- sets a sprite's pos
		:SetColor(Color) -- sets a sprite's color

GameObject
	-- not callable by user
	properties:
		.networkID
		.handle -- use for missile owner/target check
		.chnd --use for camp handle
		.buffCount
		.isMe
		.isAlly
		.isEnemy
		.team
		.owner
		.targetID --Turret Target
		.type
		.name
		.charName
		.health
		.maxHealth
		.mana
		.maxMana
		.hudAmmo
		.hudMaxAmmo --used for Jhin/Graves bullets or Annie stun or even Kled mount health; use with caution on other champs because it's not always 0 by default
		.shieldAD
		.shieldAP
		.cdr
		.armorPen
		.armorPenPercent
		.bonusArmorPenPercent
		.magicPen
		.magicPenPercent
		.baseDamage
		.bonusDamage
		.totalDamage
		.ap
		.lifeSteal
		.spellVamp
		.attackSpeed
		.critChance
		.armor
		.bonusArmor
		.magicResist
		.bonusMagicResist
		.hpRegen
		.mpRegen
		.ms
		.range
		.boundingRadius
		.gold
		.totalGold
		.dead
		.visible
		.isImmortal --works for zhonya and kayle ulti ++
		.isTargetable
		.isTargetableToTeam --works for turrets
		.distance
		.pos
			.x
			.y
			.z
		.posTo
			.x
			.y
			.z
		.hpBar
			.x
			.y
			.onScreen
		.pos2D
			.x
			.y
			.onScreen
		.toScreen
			.x
			.y
			.onScreen
		.posMM
			.x
			.y
		.dir
			.x
			.y
			.z
		.isCampUp -- for jungle camps only
		.valid -- for units only
		.attackData -- for units only
			.state -- STATE_UNKNOWN, STATE_ATTACK, STATE_WINDUP, STATE_WINDDOWN
			.windUpTime
			.windDownTime
			.animationTime
			.endTime
			.castFrame
			.projectileSpeed
			.target -- GameObject handle
			.attackDelayOffsetPercent -- used for calculating animationTime
			.attackDelayCastOffsetPercent -- used for calculating windUpTime
		.levelData -- for heroes only
			.exp
			.lvl
			.lvlPts
		.activeSpell
			.valid --always use this to check if it's casting
			.level
			.name
			.startPos -- Vector
			.placementPos -- Vector
			.target -- GameObject handle
			.windup
			.animation
			.range
			.mana
			.width
			.speed
			.coneAngle
			.coneDistance
			.acceleration
			.castFrame
			.maxSpeed
			.minSpeed
			.spellWasCast
			.isAutoAttack
			.isCharging
			.isChanneling
			.startTime
			.castEndTime
			.endTime
			.isStopped
		.activeSpellSlot --use this to determine which spell slot was activated for ".activeSpell"
		.isChanneling --use this to determine if ".activeSpell" is actually a spell, otherwise it's autoattack
		.missileData -- for missiles only
			.name -- string
			.owner -- GameObject handle
			.target -- GameObject handle
			.startPos -- Vector
			.endPos -- Vector
			.placementPos -- Vector
			.range
			.delay
			.speed
			.width
			.manaCost
		.bonusDamagePercent -- for minions only
		.flatDamageReduction -- for minions only
		.pathing --returns waypoints for unit
			.hasMovePath
			.pathIndex
			.startPos
				.x 
				.y 
				.z 
			.endPos
				.x 
				.y 
				.z
			.pathCount
	functions: -- for units only
		:GetSpellData(iSlot)
			.name
			.level
			.castTime -- time the spell was casted last
			.cd
			.currentCd
			.ammo
			.ammoTime
			.ammoCd
			.ammoCurrentCd
			.toggleState
			.range
			.mana
			.width
			.speed
			.targetingType
			.coneAngle
			.coneDistance
			.acceleration
			.castFrame
			.maxSpeed
			.minSpeed
		:GetItemData(index)
			.itemID
			.stacks
			.ammo
		:GetBuff(index)
			.type
			.name
			.startTime
			.expireTime
			.duration
			.stacks
			.count
			.sourcenID
			.sourceName
		:GetPrediction(speed,delay) --Vector
			.x
			.y
			.z
		:GetCollision(width,speed,delay)
			number --Collision Count
		:IsValidTarget(range,team check,source or pos) -- returns a boolean
		:GetPath(index) --returns a vector
			.x
			.y
			.z




Draw API: {
    Circle = Draws a 3D Circle; Input: (x, y, z)
    Circle = Draws a 3D Circle; Input: (x, y, z, Color)
    Circle = Draws a 3D Circle; Input: (x, y, z, radius)
    Circle = Draws a 3D Circle; Input: (x, y, z, radius, Color)
    Circle = Draws a 3D Circle; Input: (x, y, z, radius, width)
    Circle = Draws a 3D Circle; Input: (x, y, z, radius, width, Color)
    Circle = Draws a 3D Circle; Input: (Vector3)
    Circle = Draws a 3D Circle; Input: (Vector3, Color)
    Circle = Draws a 3D Circle; Input: (Vector3, radius)
    Circle = Draws a 3D Circle; Input: (Vector3, radius, Color)
    Circle = Draws a 3D Circle; Input: (Vector3, radius, width)
    Circle = Draws a 3D Circle; Input: (Vector3, radius, width, Color)
	CircleMinimap = Draws a 2D Circle; Input: (x, y, z)
    CircleMinimap = Draws a 2D Circle; Input: (x, y, z, Color)
    CircleMinimap = Draws a 2D Circle; Input: (x, y, z, radius)
    CircleMinimap = Draws a 2D Circle; Input: (x, y, z, radius, Color)
    CircleMinimap = Draws a 2D Circle; Input: (x, y, z, radius, width)
    CircleMinimap = Draws a 2D Circle; Input: (x, y, z, radius, width, Color)
    CircleMinimap = Draws a 2D Circle; Input: (Vector3)
    CircleMinimap = Draws a 2D Circle; Input: (Vector3, Color)
    CircleMinimap = Draws a 2D Circle; Input: (Vector3, radius)
    CircleMinimap = Draws a 2D Circle; Input: (Vector3, radius, Color)
    CircleMinimap = Draws a 2D Circle; Input: (Vector3, radius, width)
    CircleMinimap = Draws a 2D Circle; Input: (Vector3, radius, width, Color)
    Rect = Draws a 2D Rectangle; Input: (x, y, width, height)
    Rect = Draws a 2D Rectangle; Input: (x, y, width, height, Color)
    Rect = Draws a 2D Rectangle; Input: (Vector2, width, height)
    Rect = Draws a 2D Rectangle; Input: (Vector2, width, height, Color)
    Line = Draws a 2D Line; Input: (x1, y1, x2, y2)
    Line = Draws a 2D Line; Input: (x1, y1, x2, y2, Color)
    Line = Draws a 2D Line; Input: (x1, y1, x2, y2, width)
    Line = Draws a 2D Line; Input: (x1, y1, x2, y2, width, Color)
    Line = Draws a 2D Line; Input: (Vector2, x2, y2)
    Line = Draws a 2D Line; Input: (Vector2, x2, y2, Color)
    Line = Draws a 2D Line; Input: (Vector2, x2, y2, width)
    Line = Draws a 2D Line; Input: (Vector2, x2, y2, width, Color)
    Line = Draws a 2D Line; Input: (x1, y1, Vector2)
    Line = Draws a 2D Line; Input: (x1, y1, Vector2, Color)
    Line = Draws a 2D Line; Input: (x1, y1, Vector2, width)
    Line = Draws a 2D Line; Input: (x1, y1, Vector2, width, Color)
    Line = Draws a 2D Line; Input: (Vector2, Vector2)
    Line = Draws a 2D Line; Input: (Vector2, Vector2, Color)
    Line = Draws a 2D Line; Input: (Vector2, Vector2, width)
    Line = Draws a 2D Line; Input: (Vector2, Vector2, width, Color)
    Color = Creates a drawable Color; Input: (a, r, g, b); Returns Color
    Color = Creates a drawable Color; Input: (hex); Returns Color
    Color = Creates a drawable Color; Input: (unsigned); Returns Color
    Color = Creates a drawable Color; Input: (h, s, l); Returns Color
    Color = Creates a drawable Color; Input: (); Returns Color
    Default Color is White.
    Text = Draws a 2D Text; Input: (text, x, y)
    Text = Draws a 2D Text; Input: (text, size, x, y)
    Text = Draws a 2D Text; Input: (text, size, x, y, Color)
    Text = Draws a 2D Text; Input: (text, size, x, y, Color, Font)
    Text = Draws a 2D Text; Input: (text, Vector2)
    Text = Draws a 2D Text; Input: (text, size, Vector2)
    Text = Draws a 2D Text; Input: (text, size, Vector2, Color)
    Text = Draws a 2D Text; Input: (text, size, Vector2, Color, Font)
    Font = Creates a drawable Font; Input: (path, fontName)
    FontRect = Gets a Font Rectangle; Input: (text, fontSize); Return {width, height}
    FontRect = Gets a Font Rectangle; Input: (text, fontSize, Font); Return {width, height}
}



Control API: {
	LeftClick = Executes a left mouse click; Input: (XYTable | x, y)
	RightClick = Executes a right mouse click; Input: (XYTable | x, y)
    CastSpell = Executes a keystroke; Input: (char | byte)
    CastSpell = Executes a keystroke; Input: (char | byte, GameObject)
	CastSpell = Executes a keystroke and moves mouse; Input: (char | byte, x, y) --screen position
    CastSpell = Executes a keystroke and moves mouse; Input: (char | byte, x, y, z)
    CastSpell = Executes a keystroke and moves mouse; Input: (char | byte, Vector3)
    Move = Sends a move command towards mousePos; Input: none
	Move = Sends a move command; Input: (x, y) --screen position
    Move = Sends a move command; Input: (x, y, z)
    Move = Sends a move command; Input: (Vector3)
    Attack = Sends an attack command; Input: (GameObject)
    IsKeyDown = Check for a key being held down; Input: none; Return bool
	SetCursorPos = Sets the cursor position; Input: (Object | Vector3 | Vector2 | x, y) Return: bool
	KeyDown = Holds down a keystroke; Input: (char | byte) Return: bool
	KeyUp = Releases up a keystroke; Input: (char | byte) Return: bool
	mouse_event = Sends a mouse click (down or up, depending on flag); Input: (byte) Return: bool
}



Game API: {
    MyHero = Input none; Returns myHero
    Resolution = Input none; Returns Resolution as Vector
    FPS = Input none; Returns the total FPS
    IsOnTop = Input none; Return true/false if Game is on top
    IsChatOpen = Input none; Return true/false if chat is open
    Timer = Input none; Return the Game Timer
    mapID = The current map ID
    HeroCount = Input none; Return the total Hero Count
    Hero = Input (index); Return the Hero at index
    ObjectCount = Input none; Return the total Object Count
    Object = Input (index); Return the Object at index
    HeroCount = Input none; Return the total Hero Count
    Hero = Input (index); Return the Hero at index
    CampCount = Input none; Return the total Camp Count
    Camp = Input (index); Return the Camp at index
    TurretCount = Input none; Return the total Turret Count
    Turret = Input (index); Return the Turret at index
    MissileCount = Input none; Return the total Object Count
    Missile = Input (index); Return the Object at index
	ParticleCount = Input none; Return the total Object Count
    Particle = Input (index); Return the Object at index
    MinionCount = Input none; Return the total Minion Count
    Minion = Input (index); Return the Minion at index
    WardCount = Input none; Return the total Wards Count
    Ward = Input (index); Return the Wards at index
    ObjectCount = Input none; Return the total Object Count
    Object = Input (index); Return the Object at index
	GetObjectByNetID = Input (networkID); returns the object with the networkID requested
	Latency = Input none; Returns the game latency (ping)
	CanUseSpell = Input (spell index); Returns the state of a specific spell
	mousePos = alias to the global mouse pos; Return Vector3
	cursorPos = alias to the global cursor pos; Return Vector2
}



Callback API: {
    Add = Adds a new Callback; Input: (iType, function); Return: callbackID
    Del = Deletes a callback, Input: (iType, callbackID)
}

iTypes: {
    "Load",
    "UnLoad",
    "GameEnd",
    "Tick",
    "Draw",
    "WndMsg", -- (msg, wParam)
    "ProcessRecall" -- (unit, proc)
}



Global Constants:
	SCRIPT_PATH
	COMMON_PATH
	SPRITE_PATH
	SOUNDS_PATH
	FONTS_PATH
	
	READY
	NOTAVAILABLE
	READYNOCAST
	NOTLEARNED
	ONCOOLDOWN
	NOMANA
	NOMANAONCOOLDOWN

	WM_MOUSEHWHEEL
	WM_MBUTTONUP
	WM_MBUTTONDOWN
	WM_RBUTTONUP
	WM_RBUTTONDOWN
	WM_LBUTTONUP
	WM_LBUTTONDOWN
	KEY_UP
	KEY_DOWN

	CRYSTAL_SCAR
	TWISTED_TREELINE
	SUMMONERS_RIFT
	HOWLING_ABYSS

	STATE_UNKNOWN
	STATE_ATTACK
	STATE_WINDUP
	STATE_WINDDOWN

	_Q
	_W
	_E
	_R
	ITEM_1
	ITEM_2
	ITEM_3
	ITEM_4
	ITEM_5
	ITEM_6
	ITEM_7 --(trinket)
	SUMMONER_1
	SUMMONER_2
	
	HK_Q
	HK_W
	HK_E
	HK_R
	HK_ITEM_1
	HK_ITEM_2
	HK_ITEM_3
	HK_ITEM_4
	HK_ITEM_5
	HK_ITEM_6
	HK_ITEM_7 --(trinket)
	HK_SUMMONER_1
	HK_SUMMONER_2
	HK_TCO -- Target Champions Only
	HK_LUS -- Level Up Spell Hotkey
	HK_MENU -- Hotkey for the LUA Menu
	
	MOUSEEVENTF_LEFTDOWN --used by mouse_event
	MOUSEEVENTF_LEFTUP
	MOUSEEVENTF_RIGHTDOWN
	MOUSEEVENTF_RIGHTUP

	Obj_AI_SpawnPoint
	Obj_AI_Camp
	Obj_AI_Barracks
	Obj_AI_Hero
	Obj_AI_Minion
	Obj_AI_Turret
	Obj_AI_LineMissle
	Obj_AI_Shop
	Obj_AI_Nexus

	cursorPos (Vector2)
	mousePos (Vector3)

	myHero (GameObject)


Global Functions:
	GetTickCount()
	GetImageInfoFromFile(path)
	PrintChat(message) -- prints one string
	print(...) -- prints everything
	DumpDocumentation("api.lua") -- writes this text to a file

  • 7

#2
Feretorix

Feretorix

    Administrator

  • Administrators
  • 3,016 posts
New additions in 29th January 2017:


CORE Changes:

-Added hotkey changer for the LUA Menu.
-Added in menu ability to change delay between clicks. (Performance TAB)
-Improved minimap circle quality.
-Fixed AttackData windup cancelation for Jinx and a few more.
-Fixed windup issue for Annie and a few more.




API Changes:

Menu API:
- toggle = "boolean", defaults to false, used to make a toggle key param
example: MyMenu:MenuElement({id = "myID", name = "Test Slave Param", key = 0x41, toggle = true})

Control API:
LeftClick = Executes a left mouse click; Input: (XYTable | x, y)
RightClick = Executes a right mouse click; Input: (XYTable | x, y)

Game API:
Latency = Input none; Returns the game latency (ping)
CanUseSpell = Input (spell index); Returns the state of a specific spell

Vector Functions:
:ToMM() -- returns minimap position from Vector3



Global Constants:
READY
NOTAVAILABLE
READYNOCAST
NOTLEARNED
ONCOOLDOWN
NOMANA
NOMANAONCOOLDOWN

  • 6

#3
Feretorix

Feretorix

    Administrator

  • Administrators
  • 3,016 posts

New additions in 13th Feb 2017:

 

API Changes:
 
GameObject:
.hudAmmo
.hudMaxAmmo --used for Jhin/Graves bullets or Annie stun or even Kled mount health; use with caution on other champs because it's not always 0 by default
 
Game API:

mousePos = alias to the global mouse pos; Return Vector3
cursorPos = alias to the global cursor pos; Return Vector2

  • 2

#4
Feretorix

Feretorix

    Administrator

  • Administrators
  • 3,016 posts
New additions in 9th Mar 2017:
 
 
GameObject:
.isImmortal --works for zhonya and kayle ulti and much more probably
.isTargetableToTeam --works for turrets which can't be autoattacked yet
.activeSpell
     .valid --always use this to check if it's casting
     .name
     .startPos -- Vector
     .placementPos -- Vector
     .target -- GameObject handle
     .windup
     .animation
.activeSpellSlot --use this to determine which spell slot was activated for ".activeSpell"
.isChanneling --use this to determine if ".activeSpell" is actually a spell, otherwise it's autoattack
Here is a small and really rough example on how you can use the code above to "re-create" OnProcessSpell:
(works only for spells which have at least a minimum channeling time)
 
function OnDraw()
for i = 1, Game.HeroCount() do
	local hero = Game.Hero(i)
	if hero.alive and hero.visible and hero.isChanneling then
		local currSpell = hero.activeSpell;
		local myvec0n = Vector(currSpell.placementPos.x,currSpell.placementPos.y,currSpell.placementPos.z); --ignore this weird vector recreation
		Draw.Circle(myvec0n);
		end
	end
end

  • 7

#5
Deftsu

Deftsu

    donthackourgames

  • Ex-Core Dev
  • PipPipPip
  • 4,812 posts

New additions in 17th March 2017:

GameObject.attackData:
.attackDelayOffsetPercent -- used for calculating animationTime
.attackDelayCastOffsetPercent -- used for calculating windUpTime
-- ^ note that those values are base values, they won't change with the change of forms/attackData, ex : Jinx Q/Nidalee R

Fixes : 

Game:
.mousePos
.cursorPos

  • 5

#6
Feretorix

Feretorix

    Administrator

  • Administrators
  • 3,016 posts

New additions in 25th May 2017:

 

unit.hpBar
.x
.y
.onScreen
 
 
unit.activeSpell
.level
.range
.mana
.width
.speed
.coneAngle
.coneDistance
.acceleration
.castFrame
.maxSpeed
.minSpeed
.spellWasCast
.isAutoAttack
.isCharging
.isChanneling
.startTime
.castEndTime
.endTime
.isStopped

  • 3

#7
Feretorix

Feretorix

    Administrator

  • Administrators
  • 3,016 posts
New pathing added in 16th June 2017:

Updated with dash data on 28th June 2017.
 
 
.pathing --returns waypoints for unit
.hasMovePath
.pathIndex
.startPos
.x 
.y 
.z 
.endPos
.x 
.y 
.z
.pathCount
.isDashing
.dashSpeed
.dashGravity
 
 
unit::GetPath(index) --returns a vector
.x
.y
.z
 
And some code example:
 
 
for i = 1, Game.HeroCount() do
local hero = Game.Hero(i)
if hero.alive and hero.visible then
		local path = hero.pathing;
		if path.hasMovePath then
			for i = path.pathIndex, path.pathCount do
				local path_vec = hero:GetPath(i)
				if path.isDashing then
					Draw.Circle(path_vec,100,1,Draw.Color(255,0,0,255))
					else
					Draw.Circle(path_vec,100,1,Draw.Color(255,225,255,255))
					end
				end
			end
		end
	end
 
result: c5e81a334f.gif
  • 8

#8
Feretorix

Feretorix

    Administrator

  • Administrators
  • 3,016 posts
New addition on 20th April 2023:
 
18d0f12def.gif
 
Game.GetUnderMouseObject --Input none; Returns gameObject (minion/turret/champion/inhib etc)

--example code

local undmousobj = Game.GetUnderMouseObject();
if undmousobj then
	Draw.Circle(undmousobj.pos)
	end

  • 2




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users