klauz24
Randomized item giving with possible negative outcomes

Supported Games
GameServerKingsGameServerKings

Randomized item giving with possible negative outcomes. Plugin allows players to "roll the dice" for a chance to win some loot or a different negative outcome.

Be sure to read the entire document to understand the functionality. I have added a basic Roll at the bottom so that you can get started right away to test without creating a new roll.

Chat Commands

Players

  • /roll => see the full list of available rolls to be tried
  • /roll <RollName> => execute a roll and hope for the best!

Admin

  • /roll list => see the full list of rolls
  • /roll add <RollName> => add a new roll
  • /roll remove <RollName> => delete a roll
  • /roll edit <RollName> => edit a roll
  • /roll give PLAYER/STEAMID <RollName> => give a roll to a player
  • /roll resetrolls => delete all rolls and player data
  • /roll resetdata => reset player data

Roll Creation

  • /roll additem <ItemID> <Amount> <Chance>
  • /roll addspawn <CreatureName> <Amount> <Chance>
  • /roll addreplace <ItemID> <Amount> <Chance>

Additional Options

  • /roll max XXX/false => set the max usage of a roll (false will deactivate it)
  • /roll cooldown XXXX/false => set the cooldown in seconds of a roll (false will deactivate it)
  • /roll authlevel 1/0 => 1 is for admin only, 0 for players
  • /roll permission CUSTOMPERMISSION/false => only players with the custom permission oxide permission will be able to redeem those
  • /roll description "XXXX XXX"/false => set a description for a roll
  • /roll hide true/false => hide a roll from the list: /roll (won't hide from the admin command /roll list)

Permissions

Custom Permissions

When you created a roll or edited a roll use:

  • /roll permission PERMISSIONNAME

The permissionname can be a new permission or an existing permission.

Adding Items

Adding items: must be using item GUIDs, you can find all item GUIDs with this plugin: https://umod.org/plugins/hw-item-list

Spawning creatures: creatures have a 10 min decay:

  • bor
  • yeti
  • tokar

Adding replacement: same as adding items.

Example Usage

  • /roll add example
  • /roll cooldown 600
  • /roll additem guid amount chance
  • /roll addspawn bor amount chance
  • /roll addreplace guid chance guid

Localization

Credits

  • Reneb, for the plugin which this is based on, HW Kits
  • clang, the original author of this plugin

MIT License


Copyright (c) 2020 klauz24


Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:


The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.


THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.