~ mcmonkey's simpler pastebin ~ Inspired by Hastebin ~ home page ~ Denizen help ~
click to use the normal pastebin instead ~ Click to make your own paste ~ click to duplicate and edit this paste


Title:
Type:
Date:
By:
Raw:
Other:
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
1800

for Reason
Denizen Script
2014/02/12 17:47:46 UTC-08:00
Guest
Click here to view this paste as a raw text file | Or download the script


# | Handles the world event for entity spawning and fires @KillPlayer_Task
KillPlayer_World:
    type: world
    events:
      on entity spawns:
      # Run the attack script precisely one tick from now.
      - run KillPlayer_Task def:<context.location> delay:1t

# | Causes the entity at %location% to attack the nearest player
KillPlayer_Task:
    type: task
    definitions: location
    script:
    # If there is a player nearby, attack!
    - if <def[location].find.players.within[10].get[1]> != null {
      - attack <def[location].find.living_entities.within[5].get[1]> target:<def[location].find.players.within[10].get[1]>
      }