Advanced Economy
An all-in-one complete economy, shop and money rewards plugin.
Replaces Uconomy and ZaupShop with a more advanced and feature-rich economy plugin.
Features
- Complete asynchronization - Every database call is made asynchronously outside of the game thread
- Logs and statistics - Every pay, buy or sell transaction can be logged and saved in the database
- Migration from Uconomy and ZaupShop - Migrate all data with two commands
- Money rewards - Let players earn credits for doing different activities and playtime
- Sellbox - Let players sell items from their inventory
- Importing and exporting prices - Easily import or export prices for items and vehicles
- Uconomy To Advanced Economy - All plugins that depend on or use Uconomy will work with Advanced Economy
Uconomy To Advanced Economy
Install Uconomy To Advanced Economy along with Advanced Economy to make all Uconomy-dependent plugins like uPets, Kits, and Sell Door work with Advanced Economy instead of Uconomy.
Sync Experience
SyncExperience is experimental and may cause experience sync issues. Use it only with stable local/network MySQL connections.
Consider using UconomyXP instead for more reliable experience sync.
If you want to use it, I recommend setting Lose_Experience_PvP
and Lose_Experience_PvE
options to 1
in Players
section of Config.json
file to prevent experience loss on death.
Importing Prices
To save you time, we prepared the prices for almost all vanilla items and vehicles and share them at UnturnedServerConfigs GitHub repository.
You can easily import them into your database, by running the following commands in the server console after you have installed the plugin:
importitemshop https://raw.githubusercontent.com/RestoreMonarchyPlugins/UnturnedServerConfigs/refs/heads/master/shop/itemshop.json
importvehicleshop https://raw.githubusercontent.com/RestoreMonarchyPlugins/UnturnedServerConfigs/refs/heads/master/shop/vehicleshop.json
Editing Prices
You can edit the prices by connecting to the database using MySQL client like HeidiSQL, phpMyAdmin or MySQL Workbench.
ItemShop and VehicleShop tables have Selling
and Buying
columns that represent the price of the item or vehicle.
Selling
- is the buy price at which the server sells the item or vehicle to the player./buy <item>
Buying
- is the sell price at which the server buys the item or vehicle from the player./sell <item>
- If you accidentally set the
Selling
price to lower than theBuying
price, plugin will prevent players from buying the item or vehicle. - If you want some item or vehicle to be only buyable or only sellable, set the
Selling
orBuying
price to0
. - The
ItemName
andVehicleName
columns are only to make it easier for you to find the item or vehicle in the database. They are not used by the plugin.
Commands
The plugin has a lot of commands, so we will split them into two categories: Player Commands and Console Commands.
Player Commands
- /balance - Shows your economy balance
- /balance <player> - Shows the economy balance of the player
- /pay <player> <amount> - Sends specified amount of credits to the player
- /cost <item> - Shows the buy and sell price of the specified item
- /cost <item> <amount> - Shows the buy and sell price for the specified amount of item
- /costv <vehicle> - Shows the buy and sell price of the specified vehicle
- /buy <item> - Buys the specified item
- /buy <item> <amount> - Buys the specified amount of item
- /buyv <vehicle> - Buys the specified vehicle
- /sell <item> - Sells the specified item
- /sell <item> <amount> - Sells the specified amount of items
- /sellv - Sells a vehicle player is sitting in
- /sellbox - Opens a sellbox storage
- /ammo [amount] - Buys ammo for the gun you are holding
Console Commmands
- /uploaditemshop - Uploads all items from the server to ItemShop table in database
- /uploadvehicleshop - Uploads all vehicles from the server to VehicleShop table in database
- /migrateuconomy <UconomyTableName> - Migrates Uconomy database table data into AdvancedEconomy
- /migratezaupshop <ItemShopTableName> <VehicleShopTableName> - Migrates Zaupshop database table data into AdvancedEconomy
- /exportitemshop [FileName] - Exports all items and their prices from the database to a file in the plugin directory
- /exportvehicleshop [FileName] - Exports all vehicles and their prices from the database to a file in the plugin directory
- /importitemshop <FileName> - Imports items and their prices from a file in the plugin directory to the database
- /importvehicleshop <FileName> - Imports vehicles and their prices from a file in the plugin directory to the database
Aliases
- /balance, /bal
- /buy, /b
- /buyvehicle, /buyv, /bv
- /costvehicle, /costv
- /sell, /s
- /sellvehicle, /sellv, /sv
Permissions
<Permission Cooldown="0">balance</Permission>
<Permission Cooldown="0">bal</Permission>
<Permission Cooldown="0">buy</Permission>
<Permission Cooldown="0">b</Permission>
<Permission Cooldown="0">buyvehicle</Permission>
<Permission Cooldown="0">buyv</Permission>
<Permission Cooldown="0">bv</Permission>
<Permission Cooldown="0">cost</Permission>
<Permission Cooldown="0">costvehicle</Permission>
<Permission Cooldown="0">costv</Permission>
<Permission Cooldown="0">pay</Permission>
<Permission Cooldown="0">sellbox</Permission>
<Permission Cooldown="0">sell</Permission>
<Permission Cooldown="0">s</Permission>
<Permission Cooldown="0">sellvehicle</Permission>
<Permission Cooldown="0">sellv</Permission>
<Permission Cooldown="0">sv</Permission>
<Permission Cooldown="0">ammo</Permission>
StatRewards
StatRewards are different activities that players can do to earn credits. You can configure the amount of credits players earn for each activity and whether they should receive a message when they earn credits in the configuration file.
- KILLS_ZOMBIES_NORMAL - When player kills normal zombie
- KILLS_PLAYERS - When player kills other player
- FOUND_ITEMS - When player finds server spawned item
- FOUND_RESOURCES - When player cuts down a tree, mines metal etc.
- KILLS_ZOMBIES_MEGA - When player kills mega zombie
- DEATHS_PLAYERS - When player dies
- KILLS_ANIMALS - When player kills an animal
- FOUND_CRAFTS - When player crafts an item
- FOUND_FISHES - When player catches a fish
- FOUND_PLANTS - When player pickups a plant, berries for example
- ARENA_WINS - When player wins arena game
- FOUND_BUILDABLES - When player builds a barricade or structure
Configuration
<?xml version="1.0" encoding="utf-8"?>
<AdvancedEconomyConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<EnableAsynchronization>true</EnableAsynchronization>
<EnableMainThreadWarnings>true</EnableMainThreadWarnings>
<MessageColor>yellow</MessageColor>
<ConnectionString>Server=127.0.0.1;Database=Zombiesia;User Id=root;Password=password;</ConnectionString>
<EconomyTableName>Economy</EconomyTableName>
<EconomyPaymentsTableName>EconomyPayments</EconomyPaymentsTableName>
<ItemShopTableName>ItemShop</ItemShopTableName>
<ItemShopTransactionsTableName>ItemShopTransactions</ItemShopTransactionsTableName>
<VehicleShopTableName>VehicleShop</VehicleShopTableName>
<VehicleShopTransactionsTableName>VehicleShopTransactions</VehicleShopTransactionsTableName>
<MaxBuyItemsAmount>50</MaxBuyItemsAmount>
<InitialBalance>0</InitialBalance>
<LogEconomyPayments>true</LogEconomyPayments>
<LogItemShopTransactions>true</LogItemShopTransactions>
<LogVehicleShopTransactions>true</LogVehicleShopTransactions>
<SellboxWidth>8</SellboxWidth>
<SellboxHeight>15</SellboxHeight>
<Comment>Use SyncExperience only with stable local/network MySQL connections. Otherwise use UconomyXP plugin.</Comment>
<SyncExperience>false</SyncExperience>
<SyncIntervalSeconds>5</SyncIntervalSeconds>
<EnableTimeRewards>true</EnableTimeRewards>
<TimeRewardIntervalSeconds>900</TimeRewardIntervalSeconds>
<TimeRewards>
<TimeReward GroupId="default" Salary="150" />
<TimeReward GroupId="star" Salary="500" />
<TimeReward GroupId="vip" Salary="300" />
</TimeRewards>
<EnableStatRewards>true</EnableStatRewards>
<StatRewards>
<StatReward>
<Stat>KILLS_ZOMBIES_NORMAL</Stat>
<Amount>10</Amount>
<ShouldSendMessage>true</ShouldSendMessage>
<Message>+{0} credits for killing a zombie</Message>
</StatReward>
<StatReward>
<Stat>KILLS_ZOMBIES_MEGA</Stat>
<Amount>200</Amount>
<ShouldSendMessage>true</ShouldSendMessage>
<Message>+{0} credits for killing a mega zombie</Message>
</StatReward>
<StatReward>
<Stat>FOUND_ITEMS</Stat>
<Amount>2</Amount>
<ShouldSendMessage>false</ShouldSendMessage>
<Message />
</StatReward>
<StatReward>
<Stat>FOUND_RESOURCES</Stat>
<Amount>5</Amount>
<ShouldSendMessage>false</ShouldSendMessage>
<Message />
</StatReward>
<StatReward>
<Stat>KILLS_PLAYERS</Stat>
<Amount>30</Amount>
<ShouldSendMessage>true</ShouldSendMessage>
<Message>+{0} credits for killing a player</Message>
</StatReward>
<StatReward>
<Stat>DEATHS_PLAYERS</Stat>
<Amount>-10</Amount>
<ShouldSendMessage>true</ShouldSendMessage>
<Message>{0} credits for dying</Message>
</StatReward>
</StatRewards>
</AdvancedEconomyConfiguration>
Translations
<?xml version="1.0" encoding="utf-8"?>
<Translations xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Translation Id="TargetPlayerNotFound" Value="Player {0} not found" />
<Translation Id="BalanceOtherNoPermission" Value="You don't have permission to check other players balance" />
<Translation Id="BalanceConsole" Value="Console can only check balance of a player. Use /balance <player>" />
<Translation Id="OtherBalance" Value="{0} balance: {1} credits" />
<Translation Id="YourBalance" Value="Your balance: {0} credits" />
<Translation Id="PayInvalid" Value="Invalid usage, use: /pay <player> <amount>" />
<Translation Id="PayBalanceNotEnough" Value="You can't pay {0} credits because you have {1} credits" />
<Translation Id="PaySuccess" Value="You successfully paid {0} {1} credits!" />
<Translation Id="PayReceived" Value="You received {0} credits from {1}!" />
<Translation Id="ConsoleIncreaseBalance" Value="Successfully added {0} credits to {1} balance!" />
<Translation Id="ConsoleIncreaseYourBalance" Value="{0} credits were added to your balance!" />
<Translation Id="ItemNotFound" Value="Failed to find {0} item" />
<Translation Id="ItemMaxAmount" Value="You cannot buy more than {0} items at once" />
<Translation Id="VehicleNotFound" Value="Failed to find {0} vehicle" />
<Translation Id="ItemNotForSale" Value="{0} is not for sale" />
<Translation Id="VehicleNotForSale" Value="{0} is not for sale" />
<Translation Id="ItemCantAfford" Value="You can't afford buying x{0} {1}. It costs {2} credits" />
<Translation Id="VehicleCantAfford" Value="You can't afford buying {0}. It costs {1} credits" />
<Translation Id="BuyItemSuccess" Value="You successfully bought {0} {1} for {2} credits!" />
<Translation Id="BuyVehicleSuccess" Value="You successfully bought {0} for {1} credits!" />
<Translation Id="ItemNotAvailable" Value="{0} is not available in the shop" />
<Translation Id="VehicleNotAvailable" Value="{0} is not available in the shop" />
<Translation Id="CostItem" Value="You can buy x{0} {1} for {2} credits or sell for {3} credits" />
<Translation Id="CostItemBuy" Value="You can buy x{0} {1} for {2} credits. You can't sell it" />
<Translation Id="CostItemSell" Value="You can sell x{0} {1} for {2} credits. You can't buy it" />
<Translation Id="CostVehicle" Value="You can buy {0} for {1} credits or sell for {2} credits" />
<Translation Id="CostVehicleBuy" Value="You can buy {0} for {1} credits. You can't sell it" />
<Translation Id="CostVehicleSell" Value="You can sell {0} for {1} credits. You can't buy it" />
<Translation Id="CostItemInvalid" Value="Invalid usage, use: /cost <name/id>" />
<Translation Id="CostVehicleInvalid" Value="Invalid usage, sit in the vehicle or use: /costv <name/id>" />
<Translation Id="SellItemDontHave" Value="You don't have x{0} {1} in your inventory" />
<Translation Id="SellItemSuccess" Value="Successfully sold x{0} {1} for {2} credits!" />
<Translation Id="ItemNotBuying" Value="Server is not buying {0}" />
<Translation Id="TimeReward" Value="You received {0} credits for playing!" />
<Translation Id="SellInvalid" Value="Invalid usage, use /sell <name/id> [amount]" />
<Translation Id="BuyVehicleInvalid" Value="Invalid usage, use /buyv <name/id>" />
<Translation Id="BuyInvalid" Value="Invalid usage, use /buy <name/id> [amount]" />
<Translation Id="PayCantYourself" Value="You can't pay yourself" />
<Translation Id="NotInVehicle" Value="Enter a vehicle you want to sell" />
<Translation Id="NotVehicleDriver" Value="You have to sit in the driver's seat to sell a vehicle" />
<Translation Id="VehicleNotBuying" Value="Server is not buying {0}" />
<Translation Id="SellVehicleSuccess" Value="Successfully sold {0} for {1} credits!" />
<Translation Id="SellboxReturn" Value="Returned {0} items from sellbox that could not be sold" />
<Translation Id="SellboxSuccess" Value="Successfully sold x{0} items from sellbox for {1} credits!" />
<Translation Id="YouAreNotHoldingAnyGun" Value="You are not holding any gun" />
<Translation Id="GunHasNoMagazineID" Value="The gun you are holding does not have a magazine" />
</Translations>