AyayaLeague is an external script platform written in nodejs that supports custom user scripts.
- Show player attack range
- Show enemy champions attack range
- Show enemy champions summoner spells cooldown
- Settings window [CTRL + SPACE]
- Show enemy champions ultimate cooldown
- Show missiles
- Custom user scripts (Read more here)
For UnknownCheats moderators: as i already discussed with a moderator the prebuilt version is just the code minified and compressed (since javascript is an interpreted language and you can't build it). The term PREBUILT, BUILD, etc.. are only for newbie users understanding
-
Download prebuilt version of AyayaLeague HERE
-
Extract the folder content
-
Run
AyayaLeague
as Administrator (run it from a terminal if you want to read console.log outputs)
-
Clone the repo
git clone https://github.com/botkalista/ayaya-league-external.git
-
Install Node.js 32bit v16.10.0
Download for Windows: https://nodejs.org/dist/v16.10.0/node-v16.10.0-x86.msi
Download for other OS: https://nodejs.org/fa/blog/release/v16.10.0/
-
Install windows build tools if you don't have them
npm install --g --production windows-build-tools
-
Run
npm i
andnpm run check-dependencies
to check that everything is ok and automatically build packages -
Enter into a league game (must be
windowed
orno borders
) -
Run
npm start
from a terminal with Administrator privileges -
Enjoy :3
To use correctly the script you must adjust some settings inside League.
- Set screen mode to
no borders
- Set Player Move Click to U inside Settings > Shortcuts -> Player Movement
- Set Player Attack Only to I inside Settings > Shortcuts -> Player Movement
Every user script is located into: /scripts/userscripts/
(on prebuilt version /resources/app/scripts/userscripts/
)
AyayaLeague comes with 2 default UserScripts called SimpleEvade.js
and Orbwalker.js
.
-
Create your script file inside the
/scripts/userscripts/
folder and call it_yourscriptname_.js
-
Write a
setup
function to manage initializationfunction setup() { console.log("Script is loaded"); }
-
Write a
onTick
function to execute actions every tick. It accepts 2 arguments:manager
andticks
.function onTick(manager, ticks) { if (manager.me.spells[3].ready == true) { console.log("R is up"); } }
-
Write a
onMissileCreate
function to execute actions every time a new missile is createdfunction onMissileCreate(missile, manager) { if (missile.isAutoAttack) console.log("Auto attack missile created"); if (missile.isTurretShot) console.log("Turret shot missile created"); }
-
Write a
onMoveCreate
function to execute actions every time an enemy changes directionfunction onMoveCreate(player, manager) { const x = player.AiManager.endPath.x; const z = player.AiManager.endPath.z; console.log(player.name + ' heading to' + x + ' ' + z); }
-
Write a
onDraw
function to draw something every framefunction onDraw(ctx, manager) { ctx.circle(manager.me.gamePos, manager.me.range, 50, 255, 1); }
-
Optionally you can add the JSDoc before the functions to get intellisense inside visual studio code
/** * @typedef {import('../../src/models/drawing/DrawContext').DrawContext} DrawContext * @typedef {import('../UserScriptManager').UserScriptManager} Manager * @typedef {import('../../src/models/Missile').Missile} Missile * @typedef {import('../../src/models/Entity').Entity} Entity */ /** * @param {Manager} manager * @param {number} ticks **/ function onTick(manager, ticks) { if (manager.me.spells[3].ready == true) { console.log("R is up"); } } /** * @param {Missile} missile * @param {Manager} manager **/ function onMissileCreate(missile, manager) { if (missile.isAutoAttack) console.log("Auto attack missile created"); if (missile.isTurretShot) console.log("Turret shot missile created"); } /** * @param {Entity} player * @param {Manager} manager **/ function onMoveCreate(player, manager) { const x = player.AiManager.endPath.x; const z = player.AiManager.endPath.z; console.log(player.name + ' heading to' + x + ' ' + z); } /** * @param {DrawContext} ctx * @param {Manager} manager **/ function onDraw(ctx, manager) { ctx.circle(manager.me.gamePos, manager.me.range, 50, 255, 1); }
-
Export the functions we just created
module.exports = { setup, onTick, onMissileCreate, onMoveCreate, onDraw };
-
Start AyayaLeague (
npm run start
) and enjoy your script :3
-
From
setup
function return the settings for your scriptfunction setup() { console.log('SettingTest is loaded'); const settings = [ {type: 'check', text: 'Test checkbox', defalut: false }, {type: 'string', text: 'Test string', defalut: "" }, {type: 'number', text: 'Test number', defalut: 0 }, {type: 'key', text: 'Test key', defalut: "Space" }, ] return settings; }
-
Use them in other functions
function onTick(manager, ticks, settings) { console.log('SettingTest is loaded'); if (settings[0].value == true) console.log('Test checkbox is enabled'); console.log('Test string has value of', settings[1].value); console.log('Test number has value of', settings[2].value); console.log('Test key has value of', settings[3].value); }
onTick(manager: UserScriptManager
, ticks:number) - Called every tick. Used to execute actions inside user scripts.
setup() - Called at script load. Used to initialize the script.
onMissileCreate(missile: Missile
, manager: UserScriptManager
) - Called every time a new missile is created
onMoveCreate(player: Entity
, manager: UserScriptManager
) - Called every an enemy clicks to move
onDraw(ctx: DrawContext
, manager: UserScriptManager
) - Called every frame (16ms at 60fps)
How data is read Every time a property is used it gets read from the game and cached for subsequent calls on the same tick. The manager reads the game data only if a script use that specific piece of data
properties
-
spellSlot:
SpellSlot
- Enum of game key codes -
game
Game
- Get game informations and execute actions -
playerState
PlayerState
- Get player state -
me
Entity
- Get local player -
utils
ScriptUtils
- Get utility functions -
missiles
Missile
- Get all missiles -
monsters
Entity[]
- Get all monsters -
champions:
-
turrets:
-
minions:
methods
-
checkCollision(target:
Entity
, missile:Missile
):CollisionResult
- Checks the collision between target and missile -
worldToScreen(pos:
Vector3
):Vector2
- Returnpos
converted to screen position -
setPlayerState(state:
PlayerState
) - Set the player state
-
line(p1:
Vector2
, p2:Vector2
, color?:number
, thickness?:number
) - Draw a line fromp1
top2
with colorcolor
and thicknessthickness
-
linePoints(x1:
number
, y1:number
, x2:number
, y2:number
, color?:number
, thickness?:number
) - Draw a line fromx1
y1
tox2
y2
with colorcolor
and thicknessthickness
-
circle(c:
Vector3
, r:number
, points?:number
, color?:number
, thickness?:number
) - Draw a circle atc
ofr
radius with colorcolor
and thicknessthickness
. It automatically transform the circle from game coordinates to screen coordinates usingpoints
points to rappresent it -
text(str:
string
, x:number
, y:number
, size:number
, color?:number
) - Drawstr
atx
,y
with sizeesize
and colorcolor
properties
-
netId
number
- Entity network identifier -
name
string
- Entity name -
gamePos
Vector3
- Entity position relative to the game map -
screenPos
Vector3
- Entity position relative to the screen -
hp
number
- Entity current health points -
maxHp
number
- Entity max health points -
visible
boolean
- True if the entity is outside fog of war -
dead
boolean
- True if the entity is dead -
range
number
- Entity attack range -
team
number
- Entity team identifier (100
= Team1,200
= Neutral,300
= Team2) -
spells
Spell[]
- Entity spells -
AiManager
AiManager
- Used to check player movement -
satHitbox - Used internally to check collisions
properties
-
name
string
- Spell name -
readyAt
number
- Timestamp when the spell will be ready -
level
number
- Spell level (always 1 for summoner spells) -
ready
boolean
- True if the spell is not on cooldown -
readyIn
boolean
- Seconds to wait before the spell is ready
properties
-
gameStartPos
Vector3
- Missile start position relative to the game map -
gameEndPos
Vector3
- Missile end position relative to the game map -
screenStartPos
Vector3
- Missile start position relative to the screen -
screenEndPos
Vector3
- Missile end position relative to the screen -
team
number
- Missile team identifier (100
= Team1,200
= Neutral,300
= Team2) -
isBasicAttack
boolean
- True if the missile is a basic attack -
isTurretAttack
boolean
- True if the missile is a turret shot -
isMinionAttack
boolean
- True if the missile is a minion attack -
spellName
string
- Name of the spell that created the missile -
satHitbox - Used internally to check collisions
properties
-
startPath
Vector3
- Start position of the player movement -
endPath
Vector3
- End position of the player movement -
isDashing
boolean
- True if the entity is dashing -
isMoving
boolean
- True if the entity is moving -
dashSpeed
number
- Speed of the dash
properties
-
result
boolean
- True if there is a collision -
evadeAt
Vector3
- Screen position to move the player in order to dodge the missile
properties
- time
number
- get seconds passed after game start
methods
-
issueOrder(pos:
Vector2
, isAttack:boolean
, delay?:boolean
):void
- Moves the player topos
position. If isAttack is true attacks atpos
position.
NOTE: You must set PlayerMoveClick to U and PlayerAttackOnly to I. Read more here -
castSpell(slot:
number
, pos1?:Vector2
, pos2?:Vector2
, selfCast?:boolean
):void
- Cast the spellslot
atpos1
if provided topos2
if provided.
Self cast the spell ifselfCast
is true.
Usepos2
for spells like Viktor Q or Viego W.
You can usespellSlot
of UserScriptManager forslot
-
isKeyPressed(key:
number
):boolean
- Return true if the key is pressed.
You can get the key numbers here -
pressKey(key:
number
):void
- Press the keykey
.
You can usespellSlot
of UserScriptManager.
(Ex:manager.spellSlot.Q
) -
release(key:
number
):void
- Release the keykey
.
You can usespellSlot
of UserScriptManager.
(Ex:manager.spellSlot.Q
) -
getMousePos():
Vector2
- Return the mouse position -
setMousePos(x:
number
, y:number
):void
- Set the mouse position tox
,y
-
blockInput(value:
boolean
) - If true blocks user input (keyboard+mouse), if false unlocks it. -
sleep(ms:
number
) - Waitms
milliseconds synchronously
methods
-
enemyChampsInRange(range:
number
):Entity[]
- Returns all the enemy champions insiderange
-
genericInRange(list:
Entity[]
, range:number
):Entity[]
- Returns all the entities oflist
insiderange
-
lowestHealthEnemyChampInRange(range:
number
):Entity
- Return the lowest health enemy champion insiderange
-
lowestHealthGenericInRange(list:
Entity[]
, range:number
) - Return the lowest health entity oflist
insiderange
-
predictPosition(target:
Entity
, castTime:number
) - Returns the position oftarget
aftercastTime
ms if he keeps moving in the same direction
properties
-
x
number
- x -
y
number
- y -
static
zeroVector2
- Returns a vector with x=0 y=0
methods
-
copy():
Vector2
- Returns a copy of the vector -
flatten():
Vector2
- Returns a copy of the vector with x, y asinteger
(instead offloat
) -
isEqual(vec:
Vector2
):Vector2
- Returns true if vectors have the samex
,y
-
add(x:
number
, y:number
):Vector2
- Returns a copy of the vector with his x, y multiplied byx
,y
-
sub(x:
number
, y:number
):Vector2
- Returns a copy of the vector with his x, y subtracted byx
,y
-
mul(x:
number
, y:number
):Vector2
- Returns a copy of the vector with his x, y multiplied byx
,y
-
div(x:
number
, y:number
):Vector2
- Returns a copy of the vector with his x, y divided byx
,y
-
dist(v:
Vector2
):number
- Returns the distance between this andv
-
static
fromData(x:number
, y:number
):Vector2
- Returns a vector with x=x
y=y
properties
-
x
number
- x -
y
number
- y -
z
number
- z -
static
zeroVector2
- Returns a vector with x=x
y=y
z=z
methods
-
copy():
Vector3
- Returns a copy of the vector -
flatten():
Vector3
- Returns a copy of the vector with x, y, z asinteger
(instead offloat
) -
isEqual:(vec:
Vector3
):Vector3
- Returns true if vectors have the samex
,y
,z
-
add(x:
number
, y:number
):Vector2
- Returns a copy of the vector with his x, y, z multiplied byx
,y
,z
-
sub(x:
number
, y:number
):Vector2
- Returns a copy of the vector with his x, y, z subtracted byx
,y
,z
-
mul(x:
number
, y:number
):Vector2
- Returns a copy of the vector with his x, y, z multiplied byx
,y
,z
-
div(x:
number
, y:number
):Vector2
- Returns a copy of the vector with his x, y, z divided byx
,y
,z
-
dist(v:
Vector3
):number
- Returns the distance between this andv
-
static
fromData(x:number
, y:number
, z:number
):Vector3
- Returns a vector with x=x
y=y
z=z
isCasting
isMoving
isAttacking
isEvading
isCharging
isChanneling
idle
- Fuck you. It's fast enough.
- Add width and height of missiles
- Use better serialization for settings
Simple evade
SimpleEvade.js
simple_evade.mp4
Orbwalker Test 1
Orbwalker_1.mp4
Orbwalker Test 2
Orbwalker_2.mp4
Orbwalker Test 3
Orbwalker_3.mp4
Cooldown tracker
Settings window
UserScript example