Giter Club home page Giter Club logo

ayaya-league-external's Introduction

AyayaLeague

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

ayaya-league-external's People

Contributors

botkalista avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.