Paste #71346: Untitled Paste

Date: 2020/06/24 15:17:11 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


#Made by AVolkoff, because why not?
rocket_item:
    type: item
    display name: Rocket
    lore:
    - Right click to be launched
    - upwards.
    material: firework_rocket




RocketPlayer:
    type: world
    debug: true
    events:
        on player right clicks with:rocket_item:
            - narrate hello



            - run Countdown

            # - run Explode makes a particle at location
            - determine cancelled


Countdown:
    type: task
    script:

        - narrate Starting Countdown
        - define count 10
        - repeat 10:
            - playeffect effect:FLAME at:<player.location> visibility:200 quantity:20
            - actionbar <[count]>
            - define count:--
            - wait 1s


        - cast levitation d:4 amplifier:12 false false
        - run AddRocket
        - run RocketFlameTrail
        - stop




RocketFlameTrail:
    type: task
    script:

        - narrate hi
        - while <player.has_effect[levitation]>:
            - playeffect effect:FLAME at:<player.location> visibility:200 quantity:20
            - wait 1t

        - run RemoveRocket
        - stop


AddRocket:
    type: task
    script:

        - narrate mount
        - teleport <player> <player.location.add[0,2,0]>
        - mount falling_block,end_rod|falling_block,white_concrete|falling_block,white_concrete|falling_block,white_concrete|falling_block,white_concrete|<player>
        #Use minecarts with blocks
        - cast invisibility d:4 false false
        - stop



RemoveRocket:
    type: task
    script:

        - narrate dismount

        - remove <player.location.find.entities[falling_block].within[6.0]>

        - run ExplodeRocket

        - stop


ExplodeRocket:
    type: task
    script:

        - narrate dismount

        - playeffect effect:FLAME at:<player.location> visibility:200 quantity:2000 offset:2.0



        - stop