Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #the current spot of respawning the player which will change depending on the checkpoint
- currentRespawnPosition=player.position()
- #this varialbe will make sure that the stage is only created once during the gameplay
- isStage1=False
- isStage2=False
- isStage3=False
- isStage4=False
- def death():
- player.teleport(currentRespawnPosition)
- player.on_died(death)
- #building the stairs and the platform loading stage 1
- def newParkour():
- #teleporting the builder close to the player
- builder.teleport_to(pos(5, 0, 0))
- #rotate it
- builder.face(EAST)
- for i in range(70):
- #the builder places a stairs block
- builder.place(PURPUR_STAIRS)
- #the builder moves up and forward
- builder.shift(1, 1, 0)
- #marking the current position of the builder
- builder.mark()
- #moving the builder
- builder.shift(2, 0, -4)
- #the builder fills the space between its position and the mark with blocks
- builder.fill(DIAMOND_BLOCK)
- player.on_chat("start", newParkour)
- def stage1and2(builderRotation,courseType,checkpointType):
- #teleporting the builder under the platform and shifting it
- builder.teleport_to(pos(1, -4, 0))
- builder.mark()
- builder.face(EAST)
- for i in range(2):
- for j in range(5):
- #moving the builder
- builder.move(FORWARD, randint(3, 8))
- #creating a line of the certain block
- builder.line(courseType)
- #moving the builder to create a space between blocks
- builder.move(FORWARD, randint(2, 4))
- #marking the position so the next line is built starting from it
- builder.mark()
- #turning the builder
- builder.turn(builderRotation)
- #creating a new platform
- builder.mark()
- builder.shift(2, 0, -4)
- builder.fill(checkpointType)
- def stage3():
- #creating a sphere made of slime blocks
- shapes.sphere(SLIME_BLOCK, pos(4, -30, 0), 1, ShapeOperation.REPLACE)
- builder.teleport_to(pos(6, -32, 0))
- builder.mark()
- builder.face(EAST)
- #setting the starting position and we will return here with the constructor and add some fire
- builder.set_origin()
- builder.move(FORWARD, 65)
- builder.line(NETHERRACK)
- #going back to add fire
- builder.teleport_to_origin()
- builder.move(UP, 1)
- for i in range(11):
- builder.move(FORWARD, randint(3, 8))
- builder.place(FIRE)
- #building a platform
- builder.mark()
- builder.shift(2, 0, -4)
- builder.fill(MOSS_STONE)
- def stage4():
- #making the leap of faith
- builder.move(DOWN, 30)
- builder.face(SOUTH)
- builder.move(FORWARD, 6)
- #building a well with water
- builder.mark()
- builder.shift(2, 2, 2)
- builder.fill(BRICKS)
- builder.shift(-1, 0, -1)
- builder.place(WATER)
- builder.move(FORWARD, 4)
- builder.set_origin()
- #the loop creating the spiral stairs ends when the player stands on the last platform
- while not (blocks.test_for_block(SEA_LANTERN, pos(0, -1, 0))):
- builder.teleport_to_origin()
- builder.face(SOUTH)
- #the building of the stairs can be stopped when the player stands on the last platform
- for i in range(30):
- if not blocks.test_for_block(SEA_LANTERN, pos(0, -1, 0)):
- builder.place(POLISHED_GRANITE)
- builder.move(FORWARD, 1)
- builder.move(UP, 1)
- builder.turn(RIGHT_TURN)
- else:
- break
- builder.mark()
- builder.shift(-2, 0, 2)
- builder.fill(SEA_LANTERN)
- builder.teleport_to_origin()
- builder.face(SOUTH)
- #replacing stairs for magma blocks
- for i in range(30):
- if not blocks.test_for_block(SEA_LANTERN, pos(0, -1, 0)):
- builder.place(MAGMA_BLOCK)
- builder.move(FORWARD, 1)
- builder.move(UP, 1)
- builder.turn(RIGHT_TURN)
- loops.pause(1000)
- else:
- break
- #the player gets a bucket of water and does water bucket challenge, drops in the abyss and clicks RMB to pour water underneath themselves to absorb the fall
- player.execute("/clear")
- mobs.give(mobs.target(NEAREST_PLAYER), WATER_BUCKET, 5)
- #the loop controlling loading stages and checkpoint system
- while True:
- if blocks.test_for_block(DIAMOND_BLOCK, pos(0, -1, 0)) and not isStage1:
- #updating player's position
- currentRespawnPosition = player.position()
- isStage1 = True
- stage1and2(RIGHT_TURN,SLIME_BLOCK,GOLD_BLOCK)
- elif blocks.test_for_block(GOLD_BLOCK, pos(0, -1, 0)) and not isStage2:
- currentRespawnPosition = player.position()
- isStage2 = True
- stage1and2(LEFT_TURN,MAGENTA_STAINED_GLASS_PANE,BEDROCK)
- elif blocks.test_for_block(BEDROCK, pos(0, -1, 0)) and not isStage3:
- currentRespawnPosition = player.position()
- isStage3 = True
- stage3()
- elif blocks.test_for_block(MOSS_STONE, pos(0, -1, 0)) and not isStage4:
- currentRespawnPosition = player.position()
- isStage4 = True
- stage4()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement