Git Product home page Git Product logo

ranksystem's Introduction

Average's RankSystem

Support me & this plugin's (along with several others) development on Ko.Fi: Here!

This is a complete rewrite of another plugin I originally updated, but then started implementing features to. Now, I have gone over all the code, and completely re-done almost all of it! The way it works is much more efficient, speedy, and easy for the user to use.

REQUIRES: SimpleEcon

Features

  • Time based rank progression system (unlimited ranks!)
  • REQUIRES: SimpleEcon - can utilize economy to boost rank, with a modifier. See config explanation for how this modifier works

Config Explained

(tshock/RankSystem.json)

{
  "Groups": [
    {
      "name": "vip",
      "info": {
        "nextGroup": "trusted",
        "rankCost": 15000,
        "rankUnlocks": {}
      }
    },
      {
        "name": "trusted",
        "info": {
          "nextGroup": "admin",
          "rankCost": 65000,
          "rankUnlocks": {}
        }
  }
  ],
  "StartGroup": "default",
  "doesCurrencyAffectRankTime": false,
  "currencyAffect": 1
}

Very easy and self-explanatory, but here is an explanation of each field regardless.

StartGroup essentially gets skipped, your gonna wanna keep this one at default. doesCurrencyAffectRankTime and currencyAffect are complementary. If set to true, all of the rank times are also affected by the user's economy level. the currencyAffect is a percentage value. For example, if it is set to 5, then 5% of the user's balance adds to the user's playtime (in seconds). If set to 100, then the user balance will add the entire balance (in seconds) to the user's playtime. Groups has three main values. Each group has a name such as "member", and nextGroup is the next group that will come after the rankCost has been achieved. This is the user's playtime in seconds.

Commands List

Command Description Usage Permission
/rank Shows the user's playtime and next rank info /rank (optional: playerName) (Alias: /check, /rankup rs.user
/rankdelete Delete's a user's playtime /rankdelete playerName se.admin

Plugin Dev Implementations

Simply add this plugin as a dependency for yours and you'll be able to use the following:

Retrieving a user's info

//Retrieve a user's next rank
RankSystem.PlayerManager.getPlayer(player).NextRankInfo.nextGroup

//Retrieve a user's next rank
RankSystem.PlayerManager.getPlayer(player).NextRankInfo.rankCost;

// and plenty of others within
RankSystem.PlayerManager :D

ranksystem's People

Contributors

bippity avatar renderbr avatar

Stargazers

 avatar  avatar  avatar

ranksystem's Issues

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.