// Wooden chest in goblin storeroom, under goblin jail

ON INIT {
 SET £type "chest_1"
 set §genInv 0
 SET §unlock 1
 INVENTORY ADD "WEAPONS\\dagger_iron\dagger_iron"
 INVENTORY ADDMULTI "Jewelry\Gold_coin\GOLD_COIN" 44
 ACCEPT
}

ON LOAD {
 USE_MESH "Chest_1\\Chest_1.teo"
 ACCEPT
}

ON INVENTORY2_OPEN {
>>RANDOM_ITEM
 IF ( §genInv == 1 ) ACCEPT
  IF (#RANDOMIZER < 4) INVENTORY ADD "PROVISIONS\TORCH\TORCH"
  IF (#RANDOMIZER == 4) INVENTORY ADD "Jewelry\Gold_coin\GOLD_COIN"
  IF (#RANDOMIZER == 5) INVENTORY ADD "MAGIC\\Potion_Life\\Potion_life"
  IF (#RANDOMIZER == 6) INVENTORY ADDMULTI "Jewelry\Gold_coin\GOLD_COIN" 3
  IF (#RANDOMIZER == 7) INVENTORY ADD "PROVISIONS\\candle\\candel"
  IF (#RANDOMIZER == 8) INVENTORY ADDMULTI "Jewelry\Gold_coin\GOLD_COIN" 7
  IF (#RANDOMIZER > 8) INVENTORY ADD "PROVISIONS\ROPE\ROPE"
 set §genInv 1
 ACCEPT
}