Paste #33459: Untitled Paste

Date: 2016/05/14 16:11:50 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


on block dispenses item:
    - if !<server.flag[dispenser].as_list.contains[<context.location.simple>]||false> {
        - if <context.location.inventory.list_contents> contains <i@DungeonBoss> {
          - if !<server.has_flag[dungeonboss]||false> {
            - playsound <context.location> sound:ENTITY_ENDERDRAGON_GROWL pitch:-100
            - ^spawn skeleton <context.location.add[0,1,0]> save:DungeonBoss
            - ^flag server "DungeonSpawns:|:<entry[DungeonBoss].spawned_entities>"
            - ^health <entry[DungeonBoss].spawned_entities> 30
            - ^heal <entry[DungeonBoss].spawned_entities>
            - ^adjust <entry[DungeonBoss].spawned_entities.get[1]> "custom_name:<gold><bold>DungeonBoss"
            - flag server dungeonboss duration:5m
            - DETERMINE CANCELLED
            }
          }
        - if <context.location.inventory.list_contents> contains <i@DungeonGuardian> {
          - if !<server.has_flag[DungeonGuardian]||false> {
            - playsound <context.location> sound:ENTITY_LIGHTNING_THUNDER pitch:-100
            - ^spawn skeleton <context.location.add[0,1,0]> save:DungeonGuardian
            - ^flag server "DungeonSpawns:|:<entry[DungeonGuardian].spawned_entities>"
            - ^health <entry[DungeonGuardian].spawned_entities> 30
            - ^heal <entry[DungeonGuardian].spawned_entities>
            - ^adjust <entry[DungeonGuardian].spawned_entities.get[1]> "custom_name:<red><bold>DungeonGuardian"
            - flag server DungeonGuardian duration:1m
            - DETERMINE CANCELLED
            }
          }
        - if <context.location.inventory.list_contents> contains <i@DungeonGhost> {
          - if !<server.has_flag[DungeonGhost]||false> {
            - playsound <context.location> sound:ENTITY_LIGHTNING_IMPACT pitch:-100
            - ^spawn skeleton <context.location.add[0,1,0]> save:DungeonGhost
            - ^flag server "DungeonSpawns:|:<entry[DungeonGhost].spawned_entities>"
            - ^health <entry[DungeonGhost].spawned_entities> 30
            - ^heal <entry[DungeonGhost].spawned_entities>
            - ^adjust <entry[DungeonGhost].spawned_entities.get[1]> "custom_name:<bold>DungeonGhost"
            - flag server DungeonGhost duration:1m
            - DETERMINE CANCELLED
            }
          }
        - if <context.location.inventory.list_contents> contains <i@AncientDungeonsArrow> {
          - if <server.has_flag[Entity]> == true {
            - if <server.has_flag[LaggOFix]> == false {
              - random {
                - DETERMINE i@lingering_potion[potion_effects=li@POISON,false,false]
                - DETERMINE i@lingering_potion[potion_effects=li@INSTANT_DAMAGE,true,false]
                - DETERMINE i@lingering_potion[potion_effects=li@SLOWNESS,false,true]

                - DETERMINE i@AncientDungeonsArrow
                }
              - DETERMINE CANCELLED
              - flag server LaggOFix duration:20
              }
            }
            else if <server.has_flag[Entity]> == false {
            - random {
              - spawn zombie <context.location>
              - spawn pig_zombie <context.location>
              - spawn creeper <context.location>
              - spawn spider <context.location>
              - DETERMINE CANCELLED
              }
            - random {
              - flag server Entity duration:5m
              - spawn zombie <context.location>
              - spawn pig_zombie <context.location>
              - spawn spider <context.location>
              - DETERMINE CANCELLED
              }
            - DETERMINE CANCELLED
            }
          }
        }
      - DETERMINE CANCELLED
      }