Readme

AdvancedEconomy

An all-in-one complete economy, shop and money rewards 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
  • UconomyToAdvancedEconomy plugin - All plugins that depend on or use Uconomy will work with AdvancedEconomy

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

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

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>

StatRewards

  • 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">
  <Debug>false</Debug>
  <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>
  <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 &lt;player&gt;" />
  <Translation Id="OtherBalance" Value="{0} balance: {1} credits" />
  <Translation Id="YourBalance" Value="Your balance: {0} credits" />
  <Translation Id="PayInvalid" Value="Invalid usage, use: /pay &lt;player&gt; &lt;amount&gt;" />
  <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 &lt;name/id&gt;" />
  <Translation Id="CostVehicleInvalid" Value="Invalid usage, sit in the vehicle or use: /costv &lt;name/id&gt;" />
  <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 &lt;name/id&gt; [amount]" />
  <Translation Id="BuyVehicleInvalid" Value="Invalid usage, use /buyv &lt;name/id&gt;" />
  <Translation Id="BuyInvalid" Value="Invalid usage, use /buy &lt;name/id&gt; [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>