Paste #46628: Untitled Paste

Date: 2018/02/09 12:33:01 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


Chiefas: 
    type: assignment 
    actions: 
        on assignment: 
        - trigger name:click state:true 
        - trigger name:chat state:true 
        - trigger name:proximity state:true radius:20 
        - execute as_server "npc select <npc.id>" 
        - execute as_server "trait sentinel" 
        - execute as_server "sentinel health 300" 
        - execute as_server "sentinel damage 15" 
        - execute as_server "sentinel range 32" 
        - execute as_server "sentinel respawntime 5000" 
        - execute as_server "sentinel healrate 0" 
        - execute as_server "sentinel attackrate 1.5"
        on death:
        - flag player bossbar:!
        - flag player bossbardead
    interact scripts: 
    - 10 Chief 

Chief: 
    type: interact 
    steps: 
        1: 
            proximity trigger: 
                entry: 
                    script: 
                    - execute as_server "sentinel invincible"
                    - execute as_server "npc select <npc.id>" 
                    - execute as_server "trait sentinel" 
                    - execute as_server "sentinel health 300" 
                    - execute as_server "sentinel damage 10" 
                    - execute as_server "sentinel range 32" 
                    - execute as_server "sentinel respawntime 5000" 
                    - execute as_server "sentinel healrate 0" 
                    - execute as_server "sentinel attackrate 1.5"
                    - zap step:2 script:Chief 
        2: 
            click trigger: 
                script: 
                - adjust <player> walk_speed:0 
                - narrate "<blue>Chief turns on voice translation" 
                - wait 1 
                - chat "Why do you stand before me" 
                - wait 1 
                - narrate "<green>You -> [Chief]: Where have you taken Earl Solveig's son" 
                - zap step:2 script:guard100 
                - zap step:2 script:guard101 
                - wait 1 
                - look <player> <npc.location.add[0,2,0]> duration:1 
                - flag player Guard101 duration:1s 
                - chat "Guards take him outside" 
                - wait 3s 
                - teleport <player> l@611.5,64,514.5,world 
                - ^look <player> l@611,65,510,world 
                - ^teleport <npc> l@611.5,64,505.5,world 
                - ^look <npc> <player.location> 
                - adjust <player> walk_speed:0.2 
                - wait 1 
                - flag <player> chiefbar
                - while <player.has_flag[chiefbar]> { 
                    - bossbar update chief players:<player> title:Chief progress:<npc.health.percentage.div[100]> color:purple 
                    } 
                - ^execute as_server "npc select <npc.id>" 
                - ^execute as_server "sentinel addtarget players" 
                - ^execute as_server "sentinel realistic" 
                - ^execute as_server "sentinel speed 1.2" 
                - ^execute as_server "sentinel vulnerable"
                - while <player.has_flag[bossbardead]> { 
                    - bossbar remove chief
                    } 
                - create wither_skeleton Guardw1 l@602.5,65,506.5,world save:guardw1
                - ^execute as_server "npc select guardw1"
                - ^equip <Guardw1> hand:stone_sword legs:golden_leggings boots:golden_boots
                - ^execute as_server "trait sentinel" 
                - ^execute as_server "sentinel health 25"
                - ^execute as_server "sentinel damage 5"
                - ^execute as_server "sentinel range 32"
                - ^execute as_server "sentinel respawntime 0"
                - ^execute as_server "sentinel healthrate 0"
                - ^execute as_server "sentinel attackrate 1"
                - ^execute as_server "sentinel addtarget players" 
                - ^execute as_server "sentinel realistic" 
                - ^execute as_server "sentinel speed 1.5" 
                - ^execute as_server "sentinel vulnerable"
                - ^execute as_server "npc name"
                - create wither_skeleton Guardw2 l@604.5,64,518.5,world save:guardw2
                - ^execute as_server "npc select guardw2"
                - ^equip <Guardw2> hand:stone_sword legs:golden_leggings boots:golden_boots
                - ^execute as_server "trait sentinel" 
                - ^execute as_server "sentinel health 25"
                - ^execute as_server "sentinel damage 5"
                - ^execute as_server "sentinel range 32"
                - ^execute as_server "sentinel respawntime 0"
                - ^execute as_server "sentinel healthrate 0"
                - ^execute as_server "sentinel attackrate 1"
                - ^execute as_server "sentinel addtarget players" 
                - ^execute as_server "sentinel realistic" 
                - ^execute as_server "sentinel speed 1.5" 
                - ^execute as_server "sentinel vulnerable"
                - ^execute as_server "npc name"
                - create wither_skeleton Guardw3 l@621.5,64,517.5,world save:guardw3
                - ^execute as_server "npc select guardw3"
                - ^equip <Guardw3> hand:stone_sword legs:golden_leggings boots:golden_boots
                - ^execute as_server "trait sentinel" 
                - ^execute as_server "sentinel health 25"
                - ^execute as_server "sentinel damage 5"
                - ^execute as_server "sentinel range 32"
                - ^execute as_server "sentinel respawntime 0"
                - ^execute as_server "sentinel healthrate 0"
                - ^execute as_server "sentinel attackrate 1"
                - ^execute as_server "sentinel addtarget players" 
                - ^execute as_server "sentinel realistic" 
                - ^execute as_server "sentinel speed 1.5" 
                - ^execute as_server "sentinel vulnerable"
                - ^execute as_server "npc name"
                - create wither_skeleton Guardw4 l@621.5,65,499.5,world save:guardw4
                - ^execute as_server "npc select guardw4"
                - ^equip <Guardw4> hand:stone_sword legs:golden_leggings boots:golden_boots
                - ^execute as_server "trait sentinel" 
                - ^execute as_server "sentinel health 25"
                - ^execute as_server "sentinel damage 5"
                - ^execute as_server "sentinel range 32"
                - ^execute as_server "sentinel respawntime 0"
                - ^execute as_server "sentinel healthrate 0"
                - ^execute as_server "sentinel attackrate 1"
                - ^execute as_server "sentinel addtarget players" 
                - ^execute as_server "sentinel realistic" 
                - ^execute as_server "sentinel speed 1.5" 
                - ^execute as_server "sentinel vulnerable"
                - ^execute as_server "npc name"
                - zap step:3 script:chief
        3:
            damage trigger:
                script:
                - if <npc.health.percentage> <= 50 { 
                    - zap step:4 script:chief
                } else { 
                    - queue clear 
                - if <npc.flag[special]> == idle {
                    - flag npc special:active
                    - run chief_attack1
                    }
                - flag player guardw
        4:
            damage trigger:
                script:
                - if <npc.health.percentage> <= 25 { 
                    - zap step:5 script:chief
                } else { 
                    - queue clear 
                - if <npc.flag[special]> == idle {
                    - flag npc special:active
                    - run chief_attack2
                    }
                - if <player.has_flag[guardw]> {
                    - flag player guardw:!
                    - create wither_skeleton Guardw5 l@611.5,65,506.5,world save:guardw5
                    - ^execute as_server "npc select guardw5"
                    - ^equip <Guardw5> hand:stone_sword legs:golden_leggings boots:golden_boots
                    - ^execute as_server "trait sentinel" 
                    - ^execute as_server "sentinel health 25"
                    - ^execute as_server "sentinel damage 5"
                    - ^execute as_server "sentinel range 32"
                    - ^execute as_server "sentinel respawntime 0"
                    - ^execute as_server "sentinel healthrate 0"
                    - ^execute as_server "sentinel attackrate 1"
                    - ^execute as_server "sentinel addtarget players" 
                    - ^execute as_server "sentinel realistic" 
                    - ^execute as_server "sentinel speed 1.5" 
                    - ^execute as_server "sentinel vulnerable"
                    - ^execute as_server "npc name"
                    - create wither_skeleton Guardw6 l@602.5,65,516.5,world save:guardw6
                    - ^execute as_server "npc select guardw6"
                    - ^equip <Guardw6> hand:stone_sword legs:golden_leggings boots:golden_boots
                    - ^execute as_server "trait sentinel" 
                    - ^execute as_server "sentinel health 25"
                    - ^execute as_server "sentinel damage 5"
                    - ^execute as_server "sentinel range 32"
                    - ^execute as_server "sentinel respawntime 0"
                    - ^execute as_server "sentinel healthrate 0"
                    - ^execute as_server "sentinel attackrate 1"
                    - ^execute as_server "sentinel addtarget players" 
                    - ^execute as_server "sentinel realistic" 
                    - ^execute as_server "sentinel speed 1.5" 
                    - ^execute as_server "sentinel vulnerable"
                    - ^execute as_server "npc name"
                    }
        5:
            damage trigger:
                script:
                - if <npc.flag[special]> == idle {
                    - flag npc special:active
                    - run chief_attack3
                    }
chief_attack3:
    type: task
    script:
    - if <npc.flag[special]> == active {
        - random 2
        - run chief_spin
        - run Chief_charge
        } else {
        - queue clear
        }
chief_attack2:
    type: task
    script:
    - if <npc.flag[special]> == active {
        - random 3
        - run chief_spin
        - run Chief_charge
        - run none
        } else {
        - queue clear
        }
chief_attack1:
    type: task
    script:
    - if <npc.flag[special]> == active {
        - random 4
        - run chief_spin
        - run none
        - run none
        - run none
        } else {
        - queue clear
        }
none:
    type: task
    script:
    - wait 7s
    - flag npc special:idle
chief_spin:
    type: task
    script:
    - wait 1
    - narrate "<red>Chief used Spin"
    - playeffect <npc.location> effect:large_smoke qty:15
    - hurt 18 <player>
    - wait 6s
    - flag npc special:idle
chief_charge:
    type: task
    script:
    - wait 3
    #- define Chargetarget <npc.location.find.players.within[range].random>
    - playeffect <npc.location> effect:large_smoke qty:20
    #- follow followers:Chief target:<player[%Chargetarget%].location> speed:3
    #- hurt 15 <player[%Chargetarget%]>
    - wait 3s
    - follow stop
    - wait 3s
    - flag npc special:idle