// Chest in home in front of bank

ON INIT {
 SET £type "chest_2"
 SET §unlock 1
 set §genInv 0
 INVENTORY ADD "ARMOR\legging_villager3\legging_villager3"
 INVENTORY ADD "PROVISIONS\CRUSHER\CRUSHER"
 ACCEPT
}

ON LOAD {
 USE_MESH "CHEST_2\CHEST_2.TEO"
 ACCEPT
}

ON INVENTORY2_OPEN {
>>RANDOM_ITEM
 IF ( §genInv == 1 ) ACCEPT
  IF (#RANDOMIZER < 1) INVENTORY ADD "PROVISIONS\\SALT\\SALT"
  IF (#RANDOMIZER == 1) INVENTORY ADD "PROVISIONS\\BOTTLE_WATER\\BOTTLE_WATER"
  IF (#RANDOMIZER == 2) INVENTORY ADD "PROVISIONS\\flour\\flour"
  IF (#RANDOMIZER == 3) INVENTORY ADD "PROVISIONS\CARROT\CARROT"
  IF (#RANDOMIZER == 4) INVENTORY ADD "PROVISIONS\BREAD\BREAD"
  IF (#RANDOMIZER == 5) INVENTORY ADD "PROVISIONS\\CHEESE\\CHEESE"
  IF (#RANDOMIZER == 6) INVENTORY ADD "PROVISIONS\\FOOD_LEEK\\FOOD_LEEK"
  IF (#RANDOMIZER == 7) INVENTORY ADD "PROVISIONS\\FOOD_APPLE\\FOOD_APPLE"
  IF (#RANDOMIZER == 8) INVENTORY ADD "PROVISIONS\\candle\\candel"
  IF (#RANDOMIZER == 9) INVENTORY ADD "PROVISIONS\\BREAD_HALF\\BREAD_HALF"
  IF (#RANDOMIZER == 10) INVENTORY ADD "PROVISIONS\\BOTTLE_EMPTY\\BOTTLE_EMPTY"
  IF (#RANDOMIZER > 10) INVENTORY ADD "PROVISIONS\\GARLIC\\GARLIC"
 set §genInv 1
 ACCEPT
}