[Server Script] Sales Chest - Turn loot into gold

[github.com]

Description

[www.nexusmods.com]

Usage

Configuration

Known Issues

Sales chest adds the ability for players to claim containers and remotely sell its contents. The script was inspired by and intended to be asimplified implementation of one of my favourite Oblivion mods ( Trade and Commerce ).To set up their own sales chest, players should typeinto chat. They'll be given a GUI popup that should take them through setting up assigning a container. They can then later use the same command and GUI to sell the items contained in it. Simple as that.Note: Any items not featured in itemInfo won't be sold, nor those that ultimately have a value of 0.Main options:- Determines if the price of weapons, armor, and tools are affected by its current durability/uses.- After all the price calculations, the price is then multiplied by this amount. Alter this if you want to make selling via sales chest to be more/less favourable compared to regular trading.Minor options:- Modify the time the players have to assign a new container after selecting the option- Allow/Disallow two players from designating the same container as their sales chest.- A simple variable used internally for the script's GUIid. You'll most likely never have to worry about it unless it somehow conflicts with another script's (and the chances of that are extremely low)New options in release 2:- There are 4 different methods for determining the value of the items to sell. "creature" mode means the price isn't effected at all by skill, as if trading to a creature merchant. "basic" mode uses the player's mercantile skill as a percantage modifier when working out the price (level 42 mercantile means they get 42% of the price). "tac" uses the formula from Trade and Commerce where every point of the mercantile adds a certain amount to a base percentage (by default, each point in mercantile adds 0.5% onto a base 50%). "advanced" uses a simplified version of the original game's trading formula which is... janky to say the least (look up the Merchant Bug). Most can be configured with extra options, check the file itself for those.- There are now 2 options for what mode sales chest should use deciding what containers to sell from: "private" and "global". "private" mode is how sales chest worked originally - players claim their own personal containers and sell its contents. "global" mode designates a single container (via some config options) that everyone must use to sell items from.> Since the script relies on the itemInfo resource to get the gold value of items, the items that can be sold are limited to only what's listed in itemInfo.> There's a possible item duplication bug/exploit, but I believe it's part of the current version of tes3mp rather than the script itself (though I could be wrong)> Using a corpse that equips items can result in buggy behaviour like items being removed but yielding no money - it's recommended you avoid using those as containers until later versions of tes3mp/this script fix this problem.> Because of the way the script checks if the contents of a chest have changed, players may run into problems like being told the contents have changed if another player has opened the GUI before they pressed sell while in global mode.