Paste #890: Untitled Paste

Date: 2014/01/01 20:51:13 UTC-08: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


NPCLoot:
    type: assignment    
    actions:
      on damage:
      - if !<npc.flag[attackers].as_list.contains[<player>]> flag <npc> attackers:->:<player>
      on death:
      - foreach <npc.flag[attackers].aslist> {
        - if <util.random.int[0].to[100]> < 40 {
          - define item 'i@<proc[determine loot]>'
          - if %item% != null {
              - give player:%value% %item%
              - narrate player:%value% 'A %item% for your trouble...'
          }
        }
      }