Date: 2017/07/14 19:04:06 UTC-07:00
Type: Denizen Script
spiderDungeon:
type: world
debug: true
events:
on player right clicks wall_sign:
- narrate "<&b>You found the hidden portal to the Arachni Dungeon..."
- wait 2s
- ~run initiate_instance def:spiderDungeon save:instance
- teleport <player> <entry[instance].created_queue.determination.spawn_location>
on player enters spiderDungeon instance:
- flag player spiderDungeonWave:1
- wait 2s
- narrate "<&b>You find yourself on the other side of the portal... in the Arachni Dungeon!"
- wait 1s
- narrate "<&b>You must obtain the diamond block to exit the dungeon!"
- wait 1s
- run spiderSpawns instantly def:<pl>
}
on player breaks diamond_block:
- if <proc[get_instance_blueprint].context[<proc[get_instance]>]> == spiderDungeon {
- narrate "<&b>You did it!"
- teleport <player> <proc[get_instance_entry_location]>
}
spiderSpawns:
type: task
debug: true
definitions: player
script:
- announce <def[player]>
- if <pl.flag[spiderDungeonWave].contains[1]> {
- foreach <yaml[spiderDungeon].list_keys[Waves.wave1.spawnpoints]||null> {
- spawn spider <yaml[spiderDungeon].read[Waves.wave1.spawnpoints.<def[value]>]||null>,<pl.world.name>
- wait 2s
}
}