ON INIT {
 SET_MATERIAL CLOTH
 COLLISON OFF
 SET_NAME [description_flour_big]
 SET £type "flour_normal"
 set §genInv 0
 INVENTORY CREATE
 ACCEPT
}

ON INVENTORY2_OPEN {
 PLAY "Interface_Backpack"
>>RANDOM_ITEM
IF ( §genInv == 1 ) ACCEPT
 IF (£type == "flour_small") {
  INVENTORY ADDMULTI "PROVISIONS\\flour\\flour" 2
  RANDOM 80 { INVENTORY ADD "PROVISIONS\\flour\\flour" }
  RANDOM 60 { INVENTORY ADD "PROVISIONS\\flour\\flour" }
  RANDOM 40 { INVENTORY ADD "PROVISIONS\\flour\\flour" }
  RANDOM 20 { INVENTORY ADD "PROVISIONS\\flour\\flour" }
  set §genInv 1
  ACCEPT
 }
 IF (£type == "flour_big") {
  INVENTORY ADDMULTI "PROVISIONS\\flour\\flour" 10
  RANDOM 80 { INVENTORY ADD "PROVISIONS\\flour\\flour" }
  RANDOM 60 { INVENTORY ADD "PROVISIONS\\flour\\flour" }
  RANDOM 40 { INVENTORY ADD "PROVISIONS\\flour\\flour" }
  RANDOM 20 { INVENTORY ADD "PROVISIONS\\flour\\flour" }
  set §genInv 1
  ACCEPT
 }
 IF (£type == "flour_random") {
  IF (#RANDOMIZER < 1) INVENTORY ADDMULTI "PROVISIONS\\flour\\flour" 2
  IF (#RANDOMIZER == 1) INVENTORY ADDMULTI "PROVISIONS\\flour\\flour" 6
  IF (#RANDOMIZER == 2) INVENTORY ADDMULTI "PROVISIONS\\flour\\flour" 12
  IF (#RANDOMIZER == 3) INVENTORY ADDMULTI "PROVISIONS\\flour\\flour" 9
  IF (#RANDOMIZER == 4) INVENTORY ADDMULTI "PROVISIONS\\flour\\flour" 13
  IF (#RANDOMIZER == 5) INVENTORY ADDMULTI "PROVISIONS\\flour\\flour" 7
  IF (#RANDOMIZER == 6) INVENTORY ADDMULTI "PROVISIONS\\flour\\flour" 10
  IF (#RANDOMIZER == 7) INVENTORY ADDMULTI "PROVISIONS\\flour\\flour" 5
  IF (#RANDOMIZER == 8) INVENTORY ADDMULTI "PROVISIONS\\flour\\flour" 8
  IF (#RANDOMIZER == 9) INVENTORY ADDMULTI "PROVISIONS\\flour\\flour" 14
  IF (#RANDOMIZER == 10) INVENTORY ADDMULTI "PROVISIONS\\flour\\flour" 4
  IF (#RANDOMIZER == 11) INVENTORY ADDMULTI "PROVISIONS\\flour\\flour" 11
  IF (#RANDOMIZER > 11) INVENTORY ADDMULTI "PROVISIONS\\flour\\flour" 3
  set §genInv 1
  ACCEPT
 }
 INVENTORY ADDMULTI "PROVISIONS\\flour\\flour" 6
 RANDOM 80 { INVENTORY ADD "PROVISIONS\\flour\\flour" }
 RANDOM 60 { INVENTORY ADD "PROVISIONS\\flour\\flour" }
 RANDOM 40 { INVENTORY ADD "PROVISIONS\\flour\\flour" }
 RANDOM 20 { INVENTORY ADD "PROVISIONS\\flour\\flour" }
 set §genInv 1
 ACCEPT
}

ON INVENTORY2_CLOSE {
 PLAY "Interface_Backpack"
 ACCEPT
}