Sueta

AdvDropTables

1.0

A config based drop table script.

·Script

300.png

What is this script?
AdvDropTables is a script that allows you to create complex drop tables. A drop table is a list of items or tables that contain items that are given to the player by chance when killing an entity (or executing other events).

------------------------------------------------------------------------------------------------------------------------------------------------------------

Features
- Create Drop Tables
- Add Sub Tables to your drop tables
- Everything is based in .yml (config)
- Create links between mobs and drop tables (by display name)
- Lots of different options for drop tables / sub tables (see below)
- Change config options in game
- 90% messages are editable in config. The placeholders are below the command section

------------------------------------------------------------------------------------------------------------------------------------------------------------

Commands

General Drop Table Commands:
- /dt [<help>] - Help for all drop table related commands. - dt.help
- /dt create <table> - Creates a drop table. - dt.create
- /dt remove <table> - Deletes a drop table. - dt.remove
- /dt list - List of all created drop tables. - dt.list
- /dt toggle <table> - Toggle enable or disabled a drop table. - dt.toggle
- /dt viewdt <table> - Info on the specified drop table and its sub tables - dt.viewdt

Sub Table Commands:
- /dt addsub <table> <sub name> - Create a sub table for a drop table. - dt.addsub
- /dt removesub <table> <sub name> - Removes a sub table from a drop table. - dt.removesub
- /dt listsubs <table> - Lists all sub tables for specified drop table - dt.listsubs
- /dt subdisplay <table> <sub> <display> - Set the display for a sub table - dt.subdisplay
- /dt subrarity <table> <sub> <number> - Set the rarity of a sub table - dt.subrarity
- /dt subproclimit <table> <sub> <number> - Set the proc limit of a sub table - dt.subproclimit
- /dt subprocrarity <table> <sub> <number> - Set the proc rarity of a sub table - dt.subprocrarity
- /dt subdroptoggle <table> <sub> - Toggles a sub table to drop whole table or random item - dt.subdroptoggle
- /dt subadditem <table> <sub> <drop id> - Creates a drop in a sub table with given id (held item) - dt.subadditem
- /dt subremid <table> <sub> <drop id> - Deletes a drop in a sub table - dt.subremid
- /dt subitemmin <table> <sub> <drop id> <int> - Sets min amount of drop - dt.subitemmin
- /dt subitemmax <table> <sub> <drop id> <int> - Sets max amount of drop - dt.subitemmax
- /dt subdroponfloor <table> <sub> <drop id> - Toggles drop to floor or put in inventory - dt.subdroponfloor
- /dt subtogglebc <table> <sub> <drop id> - Toggle enable or disable drop to be broadcasted - dt.subtogglebc
- /dt subsetbc <table> <sub> <drop id> <bc> - Set broadcast message of a drop - dt.subsetbc

Get Table Commands:
- /getdt <player> <table> [<amount>] - Rolls drop table for specified player - dt.getdt
- /getsub <player> <table> <sub> [<amount>]
- Rolls sub table for specified player - dt.getsub
- /getid <player> <table> <sub> <id> [<amount>]
- Rolls drop in a sub for specified player - dt.getid

Linking Commands:
- /createlink <link id> <table> <display name> - Create a link between a drop table and entity name - dt.createlink

- /removelink <link id> - Remove a link completely - dt.removelink
- /linkdetection <link id> - Toggles detection type "is" or "contains" - dt.linkdetection
- /listlinks - List all drop table links - dt.listlinks
- /linkdisplay <link id> <display name> - Set display name of link - dt.linkdisplay
- /linkaddtable <link id> <table> - Adds a drop table to a link - dt.linkaddtable
- /linkremovetable <link id> <table> - Removes a drop table from a link - dt.linkremovetable

------------------------------------------------------------------------------------------------------------------------------------------------------------

Message Placeholders
Note: Some placeholders only work in certain instances. Below will show you what placeholders can be used in what message option.

{player} - Used in IDRoll, DTRoll, SubRoll
{created} - Used in Created
{removed} - Used in RemovedTable
{display} - Used in SubDisplaySet , CreateLink , LinkDisplay
{min} - Used in SubItemMin
{max} - Used in SubItemMax
{amount} - Used in DTRoll , SubRoll , IDRoll

{sub} - Used in SubCreated, SubRemoved, SubDisplaySet, SubRaritySet, SubProcLimitSet, SubProcRaritySet, SubDropToggleTrue, SubDropToggleFalse, SubAddItem, SubRemoveId, SubItemMin, SubItemMax, SubDropOnFloorTrue, SubDropOnFloorFalse, SubToggleBcTrue, SubToggleBcFalse, SubSetBc, SubRoll, IDRoll

{dt} - Used in SubCreated , SubRemoved , SubDisplaySet , SubRaritySet , SubProcLimitSet , SubProcRaritySet , SubDropToggleTrue , SubDropToggleFalse , SubAddItem , SubRemoveId , SubItemMin , SubItemMax , SubDropOnFloorTrue , SubDropOnFloorFalse , SubToggleBcTrue , SubToggleBcFalse , SubSetBc , DTRoll , SubRoll , IDRoll , CreateLink , LinkAddTable , LinkRemoveTable , ToggleEnabled , ToggleDisabled

{id} - Used in SubAddItem, SubRemoveId, SubItemMin, SubItemMax, SubDropOnFloorTrue, SubDropOnFloorFalse, SubToggleBcTrue, SubToggleBcFalse, SubSetBc, IDRoll, CreateLink, RemoveLink, LinkDisplay, LinkDetectionContains, LinkDetectionIs, LinkAddTable, LinkRemoveTable

------------------------------------------------------------------------------------------------------------------------------------------------------------

Drop Table Options
Here is a list of config options and their functions for drop tables.

isDropTable: 'true' #This is a detector for /dt list. If this option does not exist or is not true, the drop table will not show up in the list of drop tables. The drop table will also not function.

isDropTableEnabled: 'true' #When set to true, this drop table can be used. If set to false, the drop table will not be used.

Commands for these options:
- /dt create <table>
- /dt remove <table>
- /dt toggle <table>

------------------------------------------------------------------------------------------------------------------------------------------------------------

Sub Table Options
Here is a list of config options and their functions for sub tables.

Display: '&bName of Sub Table' #This is the display for the sub table.

Rarity: '5' #Rarity is the chance that this sub table will proc. Chance goes by 1/x (x being the rarity.). So if you put 5 as the rarity, it would be 1/5 or a 20% chance.

ProcLimit: '1' #Proc limit is the amount of times this sub table can proc in one roll. So if you put this to something higher than 1, the player will have a chance to get loot from this table more than once in the same roll.

ProcChance: '10' #Proc chance is the chance that you will proc the sub table again. This works the same as rarity, so if you put 10 as the proc chance, it would be a 1/10 or a 10% chance.

DropWholeTable: 'false' #Drop whole table determines what loot is given to the player in the sub table. If set to 'false', it will pick a random item in the sub table to give as loot. If set to 'true', it will give every item in the sub table as loot.

Commands for these options:

- /dt addsub <table> <sub>
- /dt removesub <table> <sub>
- /dt subdisplay <table> <sub> <display>
- /dt subrarity <table> <sub> <number>
- /dt subproclimit <table> <sub> <number>
- /dt subprocrarity <table> <sub> <number>
- /dt subdroptoggle <table> <sub>

------------------------------------------------------------------------------------------------------------------------------------------------------------

Drops Options
Here is a list of config options and their functions for item drops in a sub table.

Min: '1' #Min is the minimum amount of the item that will be dropped.

Max: '5' #Max is the maximum amount of the item that will be dropped.

DropOnFloor: 'true' #If this option is set to 'true', the item will drop at the location of the event. If set to 'false' the loot will be put into the player's inventory. If the player's inventory is full, it will drop at location of the event.

Broadcast: 'true' #If this option is set to 'true', The loot will be broadcast to everyone on the server.

BroadcastMessage: '&8[&eDrops&8] &d{player} &7has received &bx{amount} {item} &7as a rare drop.' #The message that is broadcast when the player receives a drop. Option above must be set to 'true' for this to work.

Similar projects

Script →