// Chest/Dresser in barracks, goblin castle

ON INIT {
 SET §unlock 1
 set §genInv 0
 ACCEPT
}
ON INITEND {
 INVENTORY SKIN "ingame_inventory_chest"
 ACCEPT
}
ON LOAD {
 USEMESH "Chest_dresser_chest\\Chest_dresser_chest.teo"
 ACCEPT
}

ON INVENTORY2_OPEN {
>>RANDOM_ITEM
 IF ( §genInv == 1 ) ACCEPT
  IF (#RANDOMIZER < 7) {
  INVENTORY ADD "PROVISIONS\\BOTTLE_WINE\\BOTTLE_WINE"
  }
  IF (#RANDOMIZER > 6) {
  INVENTORY ADD "PROVISIONS\\BOTTLE_EMPTY\\BOTTLE_EMPTY"
  }
  RANDOM 80 { INVENTORY ADDMULTI "JEWELRY\\GOLD_COIN\\GOLD_COIN" 1 }
  RANDOM 60 { INVENTORY ADDMULTI "JEWELRY\\GOLD_COIN\\GOLD_COIN" 3 }
  RANDOM 40 { INVENTORY ADDMULTI "JEWELRY\\GOLD_COIN\\GOLD_COIN" 7 }
  RANDOM 20 { INVENTORY ADDMULTI "JEWELRY\\GOLD_COIN\\GOLD_COIN" 11 }
  set §genInv 1
 ACCEPT
}