RUST Vending Manager v0.2.2

No permission to download
You can download a maximum of 0 files within 24 hours
Vending Manager is a plugin which provides some tools for admins to help improve Vending Machine management. This includes the ability to save, load, and clear sales order templates (which are saved to the config file), as well as enable locking vending machine inventory access again.

Permissions​

This plugin uses the permission system. To assign a permission, use oxide.grant <user or group> <name or steam id> <permission>. To remove a permission, use oxide.revoke <user or group> <name or steam id> <permission>.
  • vendingmanager.canuse - Allows plugin access to non-admin players (admins have access by default)
  • vendingmanager.caneject - Allows a non-admin player to run the eject command (not that you'd ever want that)

Chat commands​

Effect is applied to vending machine being looked at

All chat commands preceded by /vm, e.g. /vm save MyMachine confirm

Commands​

This plugin provides both chat and console commands using the same syntax. When using a command in chat, prefix it with a forward slash: `/`.
  • save [name] confirm: Save the sales orders of the vending machine as template named name. If a template already exists with that name, adding confirm to the command will overwrite it. (Note: Saving the machine config this way is critical.)
  • load [name]: Load the sales orders from the specified template [name] into the vending machine. This will replace all existing sales orders in the vending machine.
  • add [name]: Adds the sales orders from the specified template [name] into the vending machine. This will append to the existing sales orders in the vending machine. Note: Max sales orders is normally limited to 7 by Rust, but that limit is not enforced by this plugin.
  • clear: Clears all existing sales orders from the vending machine
  • resetconfirm: Clears all saved templates and resets the plugin configuration to default values - requires confirm to be entered as a parameter
  • list: Prints out a list of all available templates - for template details, it's recommended you look at the config. Sales order items are now stored as their item shortname.
  • eject: Ejects all locks from vending machines
  • info: Displays details of the Vending Machine being looked at
  • set [flag]: Sets a flag on the Vending Machine being looked at
  • unset [flag]: Unsets a flag on the Vending Machine being looked at

Flags (case-sensitive)​

  • Bottomless: Items don't get removed from the Vending Machine on purchase. but no payment is deposited/transferred (meant for admins) - This requires at least one of the selling item to be in the vending machine, but it's recommended to keep a full stack or players cannot purchase more than one at a time!
  • Immortal: Vending Machine cannot be damaged
  • Restricted: Only the owner can access the Vending Machine administration panel (same behavior as global option, but for a specific vending machine)
  • LogTransactions: Log all transactions (to /oxide/logs/VendingManager.log)

Configuration​

The settings and options can be configured in the VendingManager file under the config directory. The use of an editor and validator is recommended to avoid formatting issues and syntax errors.

Default configuration​

Code:
Please, Log in or Register to view codes content!

Configuration Items​

  • currencyItem: Shortname of item to be used as currency - defaults to "blood"
  • destroyOnUnload: Destroy locks on plugin unload (saved locks are recreated on reload)
  • ejectLocks: Locks are ejected on plugin unload
  • health: Vending Machine health - defaults to 500.
  • lockable: Enable locks to be added to Vending Machines (default "true". The lock placement is validated, so players cannot place locks on vending machines they don't own unless they have access to the back panel. The owner can still place a lock from the front. Note: Unloading this plugin or setting "lockable = false" will not remove existing locks from vending machines, but will only prevent new locks from being attached.
  • lockFailureMessage: Whether to display a "failure" message when a player tries to attach a lock to a vending machine for which they do not have access.
  • saveLocks: Save locks and recreate them on server restart
  • setHealth: Enable Vending Machine health to be updated - Setting "false" skips setting health, in case you are using another plugin to manage deployable health.
  • noBroadcast: Prevents players from turning on broadcasting
  • restricted: Restricts admin panel access to Vending Machine owner
  • useEconomics: Enables use of Economics money for purchases (see below for details)
  • useServerRewards: Enables use of ServerRewards RP for purchases (see below for details)
  • transactionTimeout: Forcibly cancels player looting Vending Machines after so many seconds (no timeout if set to zero) - to reduce Economics calls
  • logTransSuccess: Log transaction successes to /oxide/logs/VendingManager.log
  • logTransFailure: Log transaction failures to /oxide/logs/VendingManager.log
  • transMessages: Send success messages to players after transaction

Economics / Server Rewards​

Economics money or ServerRewards RP can be used when the currency item is used in a vending machine transaction - other items will use the normal Rust transaction behavior. Each currency item is $1 of Economics money or 1RP, so selling an item for 10 currency items translates to $10 in Economics money or 10RP if using ServerRewards.

In order to keep things mostly synchronized, VendingManager will check the player's current balance from Economics or ServerRewards in short intervals while the store interface is open. This also allows semi-realtime updating of the availability buttons. In order to reduce calls to Economics or ServerRewards in case (for example) a player decides to AFK with the VM store interface open, a configurable timeout transactionTimeout is implemented that will automatically end looting after some time has elapsed. This can be set to zero to disable the timeout, but something like the default 300s (5m) should be more than enough to fight the lag monster without annoying legitimate VM patrons. Normally, you should be able to turn this off (set to zero), unless you have an unusually high player count, and lots of vending machines being used causing lag.

On purchase, the required money or RP will be transferred from the purchasing player to the owner of the vending machine or vice versa. If the vending machine is currently set as Bottomless then the money is simply withdrawn from the purchasing player, or deposited to their account.

To enable Economics $ as currency, set configuration option useEconomics to true.

To enable ServerRewards RP as currency, set configuration option useServerRewards to true.

Note: Enabling usage of both Economics and ServerRewards will forcibly select Economics as the currency! If you wish to use ServerRewards, you must set useEconomics to false.

Resistances​

Resistances can now be customized in the configuration json. If the resistances do not exist in the config when VendingManager loads, the default resistances for VendingMachines will be written to the config. Resistances are stored as a percentage, where 1.0 = 100% resistance, and 0.0 = 0% resistance. (Note: Still trying to figure out what resistances means here.)

Admin Notes​

The configuration of each machine is generally saved to the main configuration file. At some point in the future this may be migrated to the data directory.
Author
Box2
Downloads
0
Views
29
First release
Last update
Rating
0.00 star(s) 0 ratings

Similar resources

Customize monument vending machines
0.00 star(s) 0 ratings
Downloads
0
Updated
It just refill items in the NPC vending machines to keep them always in stock.
0.00 star(s) 0 ratings
Downloads
0
Updated
Changes the logic of work of vending machines inside the zone
0.00 star(s) 0 ratings
Downloads
0
Updated
Загрузчик учётных записей (админ-лоадер)
0.00 star(s) 0 ratings
Downloads
0
Updated
XF 2  Ad manager 1.4 GP20.00
легко управлять рекламой в Google AdSense.
0.00 star(s) 0 ratings
Downloads
0
Updated
Back
Top
Development Community