// Maria's alchemy stock

ON INIT {
>>FREE_REFILL 
 SET_SHOP YES
 SHOP_CATEGORY PROVISIONS
 SHOP_MULTIPLY 1.1
 INVENTORY ADD "PROVISIONS\\CRUSHER\\CRUSHER"
 INVENTORY ADDMULTI "PROVISIONS\\BOTTLE_EMPTY\\BOTTLE_EMPTY" 2
 INVENTORY ADDMULTI "MAGIC\POTION_LIFE\POTION_LIFE" 8
 INVENTORY ADDMULTI "MAGIC\POTION_MANA\POTION_MANA" 9
 INVENTORY ADDMULTI "MAGIC\POTION_PURPLE\POTION_PURPLE" 3
 INVENTORY ADDMULTI "MAGIC\POTION_GREEN\POTION_GREEN" 2
 INVENTORY ADD "MAGIC\POTION_INVISIBLE\POTION_INVISIBLE"
 SET §unlock 1
 SET £key "KEY_BASE_0072"
 ACCEPT
} 
ON INITEND {
 SENDEVENT -ri IDENTIFY 100 ""
 ACCEPT
}
ON RESET {
 INVENTORY DESTROY
 GOTO FREE_REFILL
 ACCEPT
}
ON CUSTOM {
  IF (^$PARAM1 == "DEAD") {
    SET_SHOP NO
    SET §unlock 0
    ACCEPT
  }
 IF (^$PARAM1 == "LOCK") {
   SET §unlock 0
   SET_SHOP NO
   ACCEPT
 }  
 IF (^$PARAM1 == "UNLOCK") {
   SET §unlock 1
   SET_SHOP YES
   ACCEPT
 }
 ACCEPT
}
ON INVENTORY2_OPEN {
 IF (#SHOPPING == 1) ACCEPT
 SET #SHOPPING 1
 HEROSAY [tutorial_shop]
 ACCEPT
}