npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

runescape-account-creator

v2.0.4

Published

An implementation in JavaScript for Node.js that provides the ability to create accounts for the video game Old School RuneScape®.

Downloads

54

Readme

Runescape Account Creator

npm GitHub

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 AccountCreator
const { buildAccountCreator } = require('runescape-account-creator')
// Update the API key used to match your 2captcha.com API key
const twoCaptchaApiKey = 'YOUR_TWO_CAPTCHA_API_KEY'

const accountCreator = buildAccountCreator(twoCaptchaApiKey)

// Now we can start registering accounts!
accountCreator.register().then(response => {
    // destructure the response
    const { credentials, birthday } = response
    console.log('We made a new account with these credentials:', credentials)
    console.log('The birthday of the account is', birthday)
    console.log('The User-Agent header we sent was:', response.meta.userAgent)
}).catch(error => {
    console.error(error)
})

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 function
const registerAccount = async creator => await creator.register()

// traditional async function
async function singleRegistration (accountCreator) {
    return await accountCreator.register()
}

async function serialBatchRegistration (accountCreator) {
    const accounts = []
    for (let i = 1; i <= 10; i++) {
        console.log('Registering account', i)
        // this is where the syntax magic happens
        const { credentials, birthday } = await accountCreator.register()
        console.log(`Account was registered! ${credentials.email}:${credentials.password} with birthday ${birthday}`)
        accounts.push(account)
    }
    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| |---|---|---|---| |email|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

  1. Clone this repository
    • $ git clone https://github.com/Sphiinx/runescape-account-creator
  2. Install the npm dependencies
    • $ cd runescape-account-creator
    • $ npm install
  3. 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.

Dependencies