Paste #47853: Untitled Paste

Date: 2018/06/13 08:07:01 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


SkeletonFlags:
    type: world
    events:
        on server flag skeletonwalk changed:
        - wait 10
        - run skeletonok
skeletonfr:
    type: assignment
    actions:
        on assignment:
        - trigger name:click state:true
        - trigger name:proximity state:true radius:10
        - run skeletonok instantly
        - flag server skeletonwalk:0
        on click:
        - narrate "<npc.location> <npc.name>"
        - run skeletonok instantly
    interact scripts:
    - 1 skeletonstuff

skeletonstuff:
    type: interact
    steps:
        1:
            proximity trigger:
                entry:
                    script:
                        - flag server skeletonwalk:++
                        - define <npc.location.find.players.within[10.0].sort_by_number[<npc.location.distance[<npc.location>]>]> as:Target
                        - attack npc target:<def[Target]>
                        - run skeletonok
                exit:
                    script:
                        - flag server skeletonwalk:--

skeletonok:
    type: task
    script:
    - if <npc.location.find.players.within[30.0].size> == 0 {
        - ^walk <npc> <cu@-215,64,-176,world_nether|-176,52,-136,world_nether.blocks[red_nether_brick].random> speed:2
        - wait 3
        - run skeletonok
        } else {
        - announce "Skele: I can smell you there, weakling."
        }