Paste #13262: Water Temple Boss

Date: 2015/01/23 08:19:12 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


# This thing handles the boss in the fire temple
# It was written by Wahrheit and you better believe it
# @author Wahrheit
# @version 1.0
# @last-updated September 5 2013

"Emira Ivese":
    type: assignment
    interact scripts:
    - 10 Water Boss Fight
    actions:
        on assignment:
        - run 'script:Ice and Corruption' instant

"Ice and Corruption":
    type: task
    script:
    - teleport npc 'location:<anchor:wtboss1>'
    - trigger name:proximity toggle:true radius:3
"Water Boss Format":
    type: format
    format: "<red>Emira Ivese<white><&co> <text>"
"Water Champion":
    type: task
    script:
    - teleport npc 'location:<anchor:wtboss3>'
    - narrate "format:Water Boss Format" "You are more than you appear... my time has come to an end."
    - narrate "format:Water Boss Format" "I may be defeated, but you will not best the others!"
    - narrate "<yellow>Ivese disappears in a rapidly-ascending shard of ice. You hear a sort of shining sound coming from the main platform."
#    - switch state:on location:-4,74,1,ultimatus
#    - switch state:on location:-1,74,1,ultimatus
    - execute as_server "npc despawn 185"
    - execute as_server "npc spawn 187"
    - execute as_server "npc select 187"
    - execute as_server "npc anchor --assume 'wtoracle'"
    - zap "script:Water Boss Fight" "step:Victory"
    - zap "script:Water Savior" "step:Congratulations"
    - flag player watertemplecomplete:1

"Water Boss Kill Tracker":
    type: world
    events:
        on player kills guardian:
        - if !<player.has_flag[water_boss_fight]> queue clear
        - if <context.entity.elder> {
          - flag player water_boss_fight:++
          - execute as_server "spawnmob guardian 1 -11,131,259 ultimatus"
          - execute as_server "spawnmob guardian 1 3,131,249 ultimatus"
          - execute as_server "spawnmob guardian 1 -3,131,224 ultimatus"
          - execute as_server "spawnmob guardian 1 -19,131,224 ultimatus"
          - execute as_server "spawnmob guardian 1 -25,131,249 ultimatus"
          }
        - if <player.flag[water_boss_fight]> == 3 {
          - flag player water_boss_fight:!
          - run "script:Water Champion"
          }
"Water Boss Fight":
    type: interact
    steps:
        'Boss Battle*':
            proximity trigger:
                entry:
                    radius: 3
                    script:
                    - narrate "format:Water Boss Format" "You should not meddle in affairs that are above you, <player.name>. I am beyond your power."
                    - narrate "format:Water Boss Format" "Prepare to face your end!"
                    - teleport npc 'location:<anchor:wtboss2>'                    
                    - listen kill "script:Water Champion" id:wtboss type:entity target:guardian qty:2
                    - execute as_npc "warp <player.name> wtboss"
                    - execute as_npc "summon Guardian -11 132 226 {Elder:1}"
                    - execute as_npc "summon Guardian 4 132 248 {Elder:1}"
                    - execute as_npc "summon Guardian -27 132 248 {Elder:1}"
#                    - execute as_npc "spawnmob guardian 1 -11,132,226 ultimatus"
#                    - execute as_npc "spawnmob guardian 1 4,132,248 ultimatus"
#                    - execute as_npc "spawnmob guardian 1 -27,132,248 ultimatus"
                    - execute as_npc "warp <player.name> wtboss"
                    - zap "step:In Combat"
        'In Combat':
            click trigger:
                script:
                - zap "step:Boss Battle"
        'Victory':
            click trigger:
                script:
                - narrate "format:Water Boss Format" "This is a debug message that you shouldn't be seeing!"

# Preserve this section for if we ever get mob-type npc pathing working right.                    
#            Npcdeath Trigger:
#                script:
#                - narrate "format:Water Boss Format" "Master... I've failed you..."
#                - DIE
#                - switch state:on location:-4,74,1,ultimatus
#                - switch state:on location:-1,74,1,ultimatus