Paste #5697: Untitled Paste

Date: 2014/06/24 18:11:28 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17


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
        }
      }