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