// Chest in hidden ritual chamber

ON INIT {
 SET £type "chest_1"
 set §genInv 0
 SET §unlock 0
 SET §lockpickability 50
 INVENTORY ADDMULTI "Jewelry\Gold_coin\Gold_coin" 200
 INVENTORY ADD "\Jewelry\Gold_cup\Gold_cup"
 INVENTORY ADD "magic\\scroll_generic\\scroll_generic"
 SENDEVENT -ir TRANSMUTE 1 "5 levitate"
 ACCEPT
}

ON LOAD {
 USEMESH "chest_1\\chest_1.teo"
 ACCEPT
}

ON INVENTORY2_OPEN {
>>RANDOM_ITEM
 IF ( §genInv == 1 ) ACCEPT
  IF (#RANDOMIZER < 3) {
  INVENTORY ADDMULTI "Magic\Potion_life\Potion_life" 3
  }
  IF (#RANDOMIZER == 3) {
  INVENTORY ADDMULTI "Magic\Potion_life\Potion_life" 2
  INVENTORY ADDMULTI "Magic\Potion_mana\Potion_mana" 1
  }
  IF (#RANDOMIZER == 4) {
  INVENTORY ADDMULTI "Magic\Potion_life\Potion_life" 1
  INVENTORY ADDMULTI "Magic\Potion_mana\Potion_mana" 2
  }
  IF (#RANDOMIZER == 5) {
  INVENTORY ADDMULTI "Magic\Potion_life\Potion_life" 3
  INVENTORY ADDMULTI "Magic\Potion_antidote\Potion_antidote" 1
  }
  IF (#RANDOMIZER == 6) {
  INVENTORY ADDMULTI "Magic\Potion_life\Potion_life" 2
  INVENTORY ADDMULTI "Magic\Potion_antidote\Potion_antidote" 2
  }
  IF (#RANDOMIZER > 6) {
  INVENTORY ADDMULTI "Magic\Potion_life\Potion_life" 1
  INVENTORY ADDMULTI "Magic\Potion_purple\Potion_purple" 1
  }
  RANDOM 80 { INVENTORY ADDMULTI "JEWELRY\\GOLD_COIN\\GOLD_COIN" 19 }
  RANDOM 60 { INVENTORY ADDMULTI "JEWELRY\\GOLD_COIN\\GOLD_COIN" 17 }
  RANDOM 40 { INVENTORY ADDMULTI "JEWELRY\\GOLD_COIN\\GOLD_COIN" 14 }
  RANDOM 20 { INVENTORY ADDMULTI "JEWELRY\\GOLD_COIN\\GOLD_COIN" 12 }
  set §genInv 1
 ACCEPT
}