Awesome
<div align="center"> <h1>AyayaLeague</h1> </div> <div align="center"> <h1> I AM WRITING A NEW VERSION OF AYAYA-LEAGUE <h1/> <h2>IF YOU WANT TO HELP ME, TRY THE PREVIEW OR SUGGEST SOMETHING TO MAKE / ADD FEEL FREE TO TALK IN THE NEW DISCORD SERVER <h2> <h2> 11/03/2023 </h2> <h1> https://discord.gg/76p9nyJg8e </h1> <h1> https://github.com/botkalista/ayaya-league-rewrite </h1> </div><div align="center"> <img src="https://user-images.githubusercontent.com/42075940/187264788-c4c74bcb-2912-41ee-a0b9-c985741fff04.jpg" alt="AyayaLeagueLogo" width="512"> <div align="middle"> <img align="top" src="https://img.shields.io/github/release-date/botkalista/ayaya-league-external" alt="Release Date"></img> </div> </div>
What's AyayaLeague ?
AyayaLeague is an external script platform written in nodejs that supports custom user scripts.
How to setup and run
Prebuilt version
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
<img align="top" src="https://img.shields.io/github/release-date/botkalista/ayaya-league-external" alt="Release Date"></img>
-
Download prebuilt version of AyayaLeague <a href="https://github.com/botkalista/ayaya-league-external/releases"><b>HERE</b></a>
-
Extract the folder content
-
Run
notepad.exe
as Administrator (run it from a terminal if you want to read console.log outputs)
From source code
-
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
-
Enter into a league game (must be
windowed
orno borders
) -
Run
npm start
from a terminal with Administrator privileges -
Enjoy :3
Set game settings
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
User Scripts
Every user script is located into: /scripts/
(on prebuilt version /resources/app/scripts/
)
How to write a script
-
Create your script file inside the
/scripts/
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.function onTick() { 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) { 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) { 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.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 and enjoy your script :3
How to add settings to your script
-
From
setup
function return the settings for your scriptfunction setup() { console.log('SettingTest is loaded'); const settings = [ { id: 'test.toggle', type: 'toggle', text: 'Test toggle', style: 1, value: true }, { id: 'test.slider', type: 'slider', text: 'Test slider', style: 1, value: 10, max: 100, min: 0, size: 1 }, { id: 'test.text', type: 'text', text: 'Test text', value: 'Something' }, { id: 'test.radio', type: 'radio', text: 'Test radio', value: 'Option A', options: ['Option A', 'Option B', 'Option C'] }, { id: 'test.key', type: 'key', text: 'Test key', value: getVKEY("SPACEBAR") }, ] return settings; }
-
Use them in other functions
function onTick(getSettings) { console.log(getSettings('test.toggle')); console.log(getSettings('test.slider')); console.log(getSettings('test.text')); console.log(getSettings('test.radio')); console.log(getSettings('test.key')); }
Better documentation
I'm currently creating a website to publish a very detailed documentation on it. For now stick to examples and use intellisense, for any question or doubt join our discord :3