Multi-Phased Boss Fight. Sentry/Denizen


Author: tardreted
Created: 2012-09-29T01:01:09-0400
Edited: 2013-09-21T16:10:32-0400
Denizen Version: 0.76
Views: 219
Downloads: 864
Likes: 3


WGET
Description: ////////
WARNING! This script is outdated. Using this script may require modifications for recent versions of Denizen.
If you are the script owner, simply update your script and remove this warning. This script has also been marked private as to avoid the front page.
////////


Heres a script with details explaining what it does.

#This is a bossfight on my server CraftWars, IP: 108.170.47.26:25610 Website: cwars.enjin.com Youtube: youtube.com/thepvperson
#He has two phases and a reward at the end :D.
BossFight-1:
#^Bossfight - Phase 1
  Type: Trigger
  Requirements:
    Mode: NONE
    List:
  Steps:
    1:
      Proximity Trigger:
        Script:
        - ENGAGE
        - WAIT 10
        - ^TELEPORT DENIZEN 'BOOKMARK:(Bossname1):tp1'
#Here, he will teleport to a bookmark i set in a 10x20 room.
        - ^EXECUTE ASSERVER "sentry 190 equip BLAZE_ROD"
#Right after he teleports he will change weapons to a blaze rod. This changes his attack style to throwing Fireballs.
        - WAIT 10
        - ^TELEPORT DENIZEN 'BOOKMARK:(Bossname1):tp2'
        - ^EXECUTE ASSERVER "sentry 190 equip SNOW_BALL"
        - WAIT 10
        - ^TELEPORT DENIZEN 'BOOKMARK:(Bossname1):tp3'
        - ^EXECUTE ASSERVER "sentry 190 equip BOOK"
        - WAIT 10
        - ^TELEPORT DENIZEN 'BOOKMARK:(Bossname1):tp4'
        - ^EXECUTE ASSERVER "sentry 190 equip BOW"
        - WAIT 10
        - ^TELEPORT DENIZEN 'BOOKMARK:(Bossname1):tp5'
        - ^EXECUTE ASSERVER "sentry 190 equip DIAMOND_SWORD"
#Basically this script makes the boss teleport around the room, depending on where you place your bookmarks and will change attacks every time he does it.
      Npcdeath Trigger: 
        Script:
          - CHAT "You must think you have defeated me! HAHAHA, you've seen nothing yet!"
          - ^EXECUTE ASNPC "npc spawn 191"
          - DIE
#When he dies, he will spawn another npc for the 2nd phase. This npc has a different name and different armor/attack style (ender pearl).
BossFight-2:
#2nd stage of the boss fight. Script for NPC spawned above.
  Type: Trigger
  Requirements:
    Mode: NONE
    List:
  Steps:
    1:
      Proximity Trigger:
        Script:
        - ENGAGE
        - WAIT 10
        - ^TELEPORT DENIZEN 'BOOKMARK:(Bossname2):sp5'
        - ^SPAWN QTY:5 ZOMBIE SPREAD:3 BOOKMARK:sp2
#After the boss teleports in the 2nd stage, he will spawn 5 zombies on the targeted bookmark.
        - WAIT 10
        - ^TELEPORT DENIZEN 'BOOKMARK:(Bossname2):sp1'
        - ^SPAWN QTY:5 ZOMBIE SPREAD:3 BOOKMARK:sp3
        - WAIT 10
        - ^TELEPORT DENIZEN 'BOOKMARK:(Bossname2):sp2'
        - ^SPAWN QTY:5 ZOMBIE SPREAD:3 BOOKMARK:sp4
        - WAIT 10
        - ^TELEPORT DENIZEN 'BOOKMARK:(Bossname2):sp3'
        - ^SPAWN QTY:5 ZOMBIE SPREAD:3 BOOKMARK:sp5
        - WAIT 10
        - ^TELEPORT DENIZEN 'BOOKMARK:(Bossname2):sp4'
        - ^SPAWN QTY:5 ZOMBIE SPREAD:3 BOOKMARK:sp1
#In this stage, the boss is equiped with an enderpearl so he can throw targets in the air while they are being attacked by zombies he spawned after he teleported :D.
      Npcdeath Trigger: 
        Script:
          - CHAT "I underestimated you!"
          - ^TELEPORT DENIZEN 'BOOKMARK:(Bossname2):sp3'
          - ^EXECUTE ASNPC "/schematic load bosschest1"
          - ^EXECUTE ASNPC "/paste"
          - ^DISENGAGE
          - ^EXECUTE ASNPC "npc select (Your npc id here)"
          - ^EXECUTE ASNPC "npc despawn"
#This death trigger will teleport the boss to a bookmark set. He will then load a worldedit schematic(mine is a chest with rewards in it) and he will paste
#the chest infront of him. I have my sentry set on a respawn time of 0 so i made him just despawn instead of actually die preventing it from glitching out
#next time he is called uppon. I assigned each boss name to their scripts in the Assignments.yml file located in the denizen folder.




Comments
2012-11-30 18:21:02 - L1amm:

The pasting of the boss chest schematic is well done haha! Very sneaky. Thanks this gives me some good ideas and some good methods.
2012-12-09 22:14:32 - sketaful:

Thanks for this. Trying to get this working ok really made me get a better grip on how denizen in general works :)
2013-05-16 23:19:06 - L1amm:

Does anyone know of a new way to make NPCs able to paste schematics or use world edit? This script no longer works for me in .8; world edit gives an error saying 'offline player not allowed'.... I tried doing /npc playerlist still doesn't work.