Date: 2014/07/05 21:37:19 UTC-07:00
Type: Denizen Script
on player right clicks with i@shopping bag:
- foreach <global.flag[store].escape_contents> {
- if !<player.location.is_within[def[value].unescaped]> {
- inventory clear d:in@<player.name>_shopping_bag
- take 'i@shopping bag'
- narrate 'You are not shopping right now!'
- determine cancelled
} else if <in@<player.name>_shopping_bag||null> == null {
- note 'in@player bag' as:<player.name>_shopping_bag
} else if !<player.location.facing[<player.flag[shopkeeper]>]> {
- narrate 'You take a look in your shopping bag...'
- inventory open d:in@<player.name>_shopping_bag
- determine cancelled
}
}