Skip to content

BakaFT/CustomHookLoader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

Introduction

This plugin allows you to easily manage various custom hooks, supporting both remote and local loading.

Hook your game client in a more easy and structured way by putting a file or adding a new line!

console

Feature

  • Load hooks from both local and remote easily

    • Put hook file into ./hooks/HOOK_PROVIDER_NAME/

    • Add a remote hook file URL into ./hooks/HOOK_PROVIDER_NAME/_remote.js

  • Support various custom hook provider

    • Ember.js Component Hook
    • XHR Hook
    • Settings panel hook
    • l10n hook
  • API for other plugins

  • Enable/Disable hooks within an external UI

Installation

  1. Download from Releases

  2. Put CustomHookLoader under plugins

That's it. You can get hooks from Pengu Loader Community and install them by instructions given by authors.

After first run, this plugin will create folders along with a _remote.js for providers if they don't exist

A typical folder structure with some hooks should be like(with automatically created folders):

├── assets
├── config
├── core.dll
├── datastore
├── Pengu Loader.exe
├── plugins
│   ├── CustomHookLoader
│   │   ├── hooks
│   │   │   ├── ember
│   │   │   │   ├── bench_killer.js
│   │   │   │   └── _remote.js
│   │   │   └── xhr
│   │   │   │   ├── betterTencentLcu.js
│   │   │   │   └── _remote.js
│	│	│	│── OTHER_PROVIDERS
│   │   ├── index.js

Usage

Adding a hook

Local way

For Devs:

This is designed for those hooks that do not need update frequently or need configs

This way CustomHookLoader will load the hook from local file.

Get the hook file from somewhere and put it under the CORRESPONDING provider folder.

├── plugins
   ├── CustomHookLoader
      ├── hooks
         ├── ember
            ├── bench_killer.js // This will be loaded as a `ember` hook
            └── _remote.js
         └── xhr
            ├── betterTencentLcu.js // This will be loaded by antoher provider `xhr`
            └── _remote.js

Remote way

For Devs:

This is usually for those hooks that do not need configs

Make sure the remote script's Content-type header should not be text/plain

This way CustomHookLoader will load the hook from remote.

Every hook provider got a _remote.js , it should contain a structure like:

export default[]

Be careful that every hook provider got its own _remote.js, do not mix them up

What we gonna do is copy the hook URL from author and paste it in _remote.js like:

export default[
    "https://whatever-cdn.com/balabala/hook.js",
    "https://whatever-cdn.com/balabala/another_hook.js",
    // and more
]

Contribution

I'm willing to see any PRs including docs and new hook providers :)

About

CustomHookLoader for Pengu Loader

Resources

Stars

Watchers

Forks

Packages

No packages published