GithubHelp home page GithubHelp logo

stormfusions / storm_rtd Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 9 KB

Home Page: https://steamcommunity.com/sharedfiles/filedetails/?id=2019034487

License: MIT License

Lua 100.00%
garrys-mod garrysmod garrysmod-addon gmod gmod-addon gmod-lua roll-the-dice rtd

storm_rtd's Introduction

RTD (Roll The Dice) System for Garry's Mod

About

The RTD System adds a dynamic and fun element to Garry's Mod servers, allowing players to "roll the dice" for a chance to receive random effects. These effects can range from beneficial buffs to humorous or challenging changes that can turn the tide of gameplay in unexpected ways.

Features

  • Global RTD Command: Players can use the !rtd command to trigger a random effect.
  • Cooldown System: To prevent abuse, each roll has a cooldown. The default setting is 60 seconds, but it's configurable.
  • Private and Global Messages: The system informs the server of the player roll's outcome and private messages the player about time left and other restrictions.

Installation

Clone this repository or download the ZIP file. Extract the contents into your server's garrysmod/addons directory. Restart your server, or load the addon manually via the server console.

Configuration

The RTD system is highly configurable through the rtd_config.lua file. You can set the cooldown duration, and adjust messages sent to players.

Usage

Players can initiate a roll by typing !rtd in the chat. The system will then randomly select an effect from the configured list and apply it to the player. If the player tries to roll again before their cooldown has expired, they'll receive a message indicating how much longer they need to wait.

Adding Custom Effects

To add custom effects to the RTD system, modify the sv_rtdresults.lua file. Each effect should be a function that takes the player as an argument. For example:

local function IncreaseSpeed(ply)
  local s = ply:GetWalkSpeed()
  local i = math.random(100, 300)
  local t = math.random(5, 50)

  local speed = s+i
  ply:SetWalkSpeed(speed)

  timer.Simple(t, function()
    ply:SetWalkSpeed(s)
  end)

  RTDGlobalMessage(ply, " speed been increased by "..i.." for "..t.." seconds!")
end

Make sure to add the function to the table at the end of the file:

RTD.Results = {
  BurnThePlayer,
  LaunchPlayer,
  IncreaseHealth,
  IncreaseSpeed,
  ExplodePlayer,
  GivePoints,
  MegaExplode,
  SmallScalePlayer,
  WhipPlayer,
  GodMode,
  LowGravity,
  LargePlayerScale,
  Rocket,
}

Commands

  • !rtd: Roll the dice for a random effect.
  • !rtd reset: (Admin only) Developer command to reset your cooldown

Contributions

Contributions to the RTD system are welcome! If you have suggestions for new effects, improvements, or bug fixes, please submit an issue or pull request on GitHub.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgments

The Garry's Mod community for continuous support and inspiration. Contributors who have submitted issues, pull requests, or provided feedback.

storm_rtd's People

Contributors

stormfusions avatar

Watchers

 avatar

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.