Runescape Account Creator
What is Runescape Account Creator?
Runescape Account Creator is an implementation in JavaScript for Node.js that provides the ability to create accounts for the video game RuneScape®.
Installation
Install via npm:
npm install runescape-account-creator
Usage
The request is Promise based therfore we
call .then()
in order to access the response once it has been recieved.
First we will build a new AccountCreator
instance with our 2Captcha API key
// Import the factory function for the AccountCreatorconst buildAccountCreator = // Update the API key used to match your 2captcha.com API keyconst twoCaptchaApiKey = 'YOUR_TWO_CAPTCHA_API_KEY' const accountCreator = // Now we can start registering accounts!accountCreator
Async/Await
Since we are using Promises, we can make use of async/await if your JavaScript runtime allows for it, or you are using a transpiler that supports code generation for async/await.
// Fat-arrow functionconst registerAccount = async await creator // traditional async function { return await accountCreator} { const accounts = for let i = 1; i <= 10; i++ console // this is where the syntax magic happens const credentials birthday = await accountCreator console accounts return accounts}
See examples.js for more examples.
Config
It is possible to configure the registration/captcha configuration in a couple different ways.
This package automatically tries to use a .env
file via the
dotenv package. You can copy the
default configuration file by running:
cp node_modules/runescape-account-creator/.env.example .env
Or you can copy the contents of .env.example here
AccountCreator.register
Take a look at the AccountCreator.register(options) documentation
Parameter | Type | Required | Notes |
---|---|---|---|
String | No | The email to use when creating the account. If none is provided, one will be generated. | |
password | String | No | The password to use when creating the account. If none is provided, one will be generated. |
birthday | Date | No | The birthday to use when creating the account. If none is provided, one will be generated. |
Contributing
- Clone this repository
$ git clone https://github.com/Sphiinx/runescape-account-creator
- Install the npm dependencies
$ cd runescape-account-creator
$ npm install
- Make sure to run eslint or enable automatic linting in your editor
$ npm run lint
You can also generate the documentation by running the following command:
npm run docs
Which will run jsdoc and publish the generated assets to the docs/
directory.