Skip to content

botkalista/ayaya-league-external

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AyayaLeague

I AM WRITING A NEW VERSION OF AYAYA-LEAGUE

IF YOU WANT TO HELP ME, TRY THE PREVIEW OR SUGGEST SOMETHING TO MAKE / ADD FEEL FREE TO TALK IN THE NEW DISCORD SERVER

11/03/2023






AyayaLeagueLogo
Release Date

ko-fi

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

Release Date

  1. Download prebuilt version of AyayaLeague HERE

  2. Extract the folder content

  3. Run notepad.exe as Administrator (run it from a terminal if you want to read console.log outputs)

From source code

  1. Clone the repo git clone https://github.com/botkalista/ayaya-league-external.git

  2. 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/

  3. Install windows build tools if you don't have them npm install --g --production windows-build-tools

  4. Run npm i

  5. Enter into a league game (must be windowed or no borders)

  6. Run npm start from a terminal with Administrator privileges

  7. 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

  1. Create your script file inside the /scripts/ folder and call it _yourscriptname_.js

  2. Write a setup function to manage initialization

    function setup() {
      console.log("Script is loaded");
    }
  3. Write a onTick function to execute actions every tick.

    function onTick() {
      if (manager.me.spells[3].ready == true) {
        console.log("R is up");
      }
    }
  4. Write a onMissileCreate function to execute actions every time a new missile is created

    function onMissileCreate(missile) {
      if (missile.isAutoAttack) console.log("Auto attack missile created");
      if (missile.isTurretShot) console.log("Turret shot missile created");
    }
  5. Write a onMoveCreate function to execute actions every time an enemy changes direction

    function onMoveCreate(player) {
       const x = player.AiManager.endPath.x;
       const z = player.AiManager.endPath.z;
       console.log(player.name + ' heading to' + x + ' ' + z);
    }
  6. Write a onDraw function to draw something every frame

    function onDraw() {
       ctx.circle(manager.me.gamePos, manager.me.range, 50, 255, 1);
    }
  7. Export the functions we just created

    module.exports = { setup, onTick, onMissileCreate, onMoveCreate, onDraw };
  8. Start AyayaLeague and enjoy your script :3

How to add settings to your script

  1. From setup function return the settings for your script

    function 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;
    }
  2. 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