Paste #23196: Untitled Paste

Date: 2015/11/29 10:02:47 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


Name:
  Type: assignment
  Interact Scripts:
  - 10 Name_Script
  actions:
    on assignment:
    - trigger name:proximity state:true radius:10
    - flag <npc> respawn_location:<npc.location>
    - vulnerable state:true

Name_Script:
  Type: interact
  Steps:
    1:
      Proximity Trigger:
        entry:
          Script:
          - health <npc> <player.flag[level].div[4].power[2].add[Base_Health]>
          - walk <npc> <player.location>
          - ^attack <npc> target:<player>
        exit:
          Script:
          - ^flag server Name_Attack_Player:!
          - ^attack <npc> target:cancel
          - define walkhere l@x,y,z,world
          - define walk <def[walkhere].add[<util.random.int[0].to[3]>,0,<util.random.int[0].to[3]>]>
          - walk <npc> <def[walk]>
        move:
          Script:
          - walk <npc> <player.location>
          - ^attack <npc> target:<player>