GithubHelp home page GithubHelp logo

maxthegreat99 / pinger Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 58 KB

Made for the Terraria UHC server, pings a specified number of players on the map when a specific amount of players remain. Also serves as a tutorial/documentation repository for anyone out there wanting to learn TShock.

License: GNU General Public License v3.0

C# 100.00%
terraria-server tshock tshock-plugin tutorial-code

pinger's Introduction

Pinger

This plugin is designed for Hardcore Challenge minigames or other PvP challenges. It creates a ping at the position of each currently alive player once a configurable timer has elapsed and a specific number of players are still alive.

How to Install

  1. Put the .dll into the \ServerPlugins\ folder.
  2. Restart the server.
  3. Give your desired group the the permissions defined in the configs folder.

User Instructions

Commands and Usage

  • /pingreload - Reloads the plugin's configurations. Requires the pinger.reload permission to use.
  • /pingenable - Enables or disables the plugin. Requires the pinger.enable permission to use.

Configs

  • Enabled - Determines whether the plugin is enabled or not.
  • PingRequirementType - Specifies when the plugin should ping the players. Valid options are:
    • PlayersAlive, setting to this basicly translates to "the plugin should ping the players when a certain number of players are left alive",
    • PlayersDead, setting to this would translate to "the plugin should ping the players when a certain number of players are dead"
    • PercentageAlive, finally this translate to "the plugin should ping the players when a certain percentage of players are left alive".
  • PingRequirementValue - This is the value in numbers that should be associated with the PingRequirementType field, these are the meaning of this field when PingRequirementType field is set to:
    • PlayersAlive, PingRequirementType represents the maximum number of players that should be alive for the plugin to ping players when PlayersAlive is PingRequirementType's value.
    • PlayersDead, in this case the value represent the minimum amount of players to be dead (ghosts) for the plugin to ping its alive players.
    • PercentageAlive, in the case of this type the PingRequirementValue should be between 1-10, so for example setting the value to 5 would mean saying that "the plugin should ping its players once 50% of the players are left alive".
  • PingIntervalSec - The time interval in seconds at which the plugin should ping its players, for instance setting it to 10 shall create a ping on the server's alive players every 10 seconds.

Default Configs

Here are the default configs, as you can see the PingRequirementType field is set to PlayersAlive while PingRequirementValue and PingIntervalSec are both set to 5, this means that the plugin shall ping the server's currently-alive players every 5 seconds once there are 5 or less players left alive.

{
  "Settings": {
    "Enabled": true,
    "PingRequirementType": "PlayersAlive",
    "PingRequirementValue": 5,
    "PingIntervalSec": 5
  }
}

pinger's People

Contributors

maxthegreat99 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

renderbr

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.