Readme

Drop Boxes

Custom loot boxes, which drop from various events with different probabilities.

Features

  • Configure custom loot boxes via configuration
  • Saves data in MySQL so it can be shared across servers
  • Boxes drop with a different probability (1-1000) from different events e.g. zombie kill or resource found
  • Box can drop one item, picked based on probability (1-1000)
  • To use rich text in translations replace < & > to {{ & }} example: <color=red> will be {{color=red}}

Commands

  • /boxes – Shows a list of your boxes
  • /unbox <boxID> – Opens a box with specified boxID
  • /givebox <player> <boxID> – Gives a box with specified boxID to player

Configuration

<?xml version="1.0" encoding="utf-8"?>
<DropBoxesConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <MessageColor>yellow</MessageColor>
  <ConnectionString>Server=127.0.0.1;Database=unturned;Uid=root;Password=Password!123;</ConnectionString>
  <DropBoxes>
    <DropBox BoxId="epic" Name="Epic Chest" Color="#FFC0CB">
      <PlayerKillChance>50</PlayerKillChance>
      <ZombieKillChance>150</ZombieKillChance>
      <MegaZombieKillChance>1000</MegaZombieKillChance>
      <FoundPlantsChance>200</FoundPlantsChance>
      <FoundResourcesChance>500</FoundResourcesChance>
      <FoundFishesChance>50</FoundFishesChance>
      <Rewards>
        <DropBoxReward ItemId="363" Chance="30" />
        <DropBoxReward ItemId="254" Chance="50" />
        <DropBoxReward ItemId="17" Chance="80" />
        <DropBoxReward ItemId="519" Chance="20" />
      </Rewards>
    </DropBox>
  </DropBoxes>
</DropBoxesConfiguration>

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="Box_Unbox" Value="You received {0} from {1}!" />
  <Translation Id="Box_Found" Value="You got {0}!" />
  <Translation Id="Box_None" Value="You don't have any {0}" />
  <Translation Id="Box_NotFound" Value="Failed to find any box with id {0}" />
  <Translation Id="GiveBox_Success" Value="Successfully gave {0} a {1}!" />
  <Translation Id="GiveBox_Fail" Value="Use /givebox &lt;player&gt; &lt;boxID&gt;" />
  <Translation Id="Unbox_Fail" Value="Use: /unbox &lt;boxID&gt;" />
  <Translation Id="Boxes_List" Value="Your boxes:" />
  <Translation Id="Boxes_None" Value="You don't have any box" />
  <Translation Id="Box_Unbox_NoItemExist" Value="The item ({0}) you opened from the {1} box does not exist on the server!" />
</Translations>