Date: 2014/06/24 18:11:28 UTC-07:00
Type: Denizen Script
on player right clicks with i@selling bag:
- foreach <global.flag[store].escape_contents> {
- if <def[value].unescaped.as_cuboid.is_within[<player.location>]> {
- if <in@<player.name>_selling_bag> == false && <player.location.facing[<player.flag[shopkeeper]>]> != true {
- note 'in@player bag' as:<player.name>_selling_bag
- inventory open d:in@<player.name>_selling_bag
- determine cancelled
} else if <player.location.facing[<player.flag[shopkeeper]>]> != true {
- inventory open d:in@<player.name>_selling_bag
- determine cancelled
}
} else if !<def[value].unescaped.as_cuboid.is_within[<player.location>]> {
- inventory clear d:in@<player.name>_selling_bag
- narrate 'You are not in a shop right now!'
- determine cancelled
}
}