Paste #128015: Unnamed Denizen Script Paste

Date: 2024/11/10 13:13:41 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link



######  MIECZE #######

mieczendermana:
    type: item
    material: netherite_sword
    display name: <&gradient[from=#B148BC;to=#93419B]><bold>KATANA KRESU
    mechanisms:
        unbreakable: true
        custom_model_data: 6370001
    enchantments:
    - sharpness:6
    - unbreaking:3
    - fire_aspect:2

mieczzatrucia:
    type: item
    material: netherite_sword
    display name: <&gradient[from=#43A727;to=#54D231]><bold>ZATRUTY MIECZ
    mechanisms:
        unbreakable: true
        custom_model_data: 6370002
    enchantments:
    - sharpness:6
    - unbreaking:3
    - fire_aspect:2



### EVENTY DZIAŁANIE EVENTOWEK

eventowki:
    type: world
    events:

### MIECZ ENDERMANA
        on player right clicks block with:mieczendermana:
        - if !<player.has_flag[mieczcooldown]>:
            - if !<player.has_flag[mieczcooldownzatrucia]>:
                - define countdown_time 60
                - flag <player> mieczcooldown expire:<[countdown_time]>s
                - itemcooldown netherite_sword d:<[countdown_time]>s
                - run skill_mieczendermana
                - repeat <[countdown_time]>:
                    - if <player.has_flag[mieczcooldownzatrucia]>:
                        - stop
                    - else:
                        - actionbar "<&gradient[from=#B148BC;to=#93419B]><bold>KATANA KRESU <dark_gray>» (<gray>Odnowi się za: <white><[countdown_time]>s<dark_gray>)" targets:<player>
                        - define countdown_time <[countdown_time].sub[1]>
                        - wait d:1s
            - else if <player.has_flag[mieczcooldownzatrucia]>:
                - define countdown_time 60
                - flag <player> mieczcooldown expire:<[countdown_time]>s
                - itemcooldown netherite_sword d:<[countdown_time]>s
                - run skill_mieczendermana
                - repeat <[countdown_time]>:
                    - actionbar "<&gradient[from=#B148BC;to=#93419B]><bold>KATANA KRESU <dark_gray>» (<gray>Odnowi się za: <white><[countdown_time]>s<dark_gray>) | <&gradient[from=#43A727;to=#54D231]><bold>ZATRUTY MIECZ <dark_gray>» (<gray>Odnowi się za: <white><[countdown_time]>s<dark_gray>)" targets:<player>
                    - define countdown_time <[countdown_time].sub[1]>
                    - wait d:1s
                - actionbar "<&gradient[from=#B148BC;to=#93419B]><bold>KATANA KRESU <dark_gray>» (<gray>Odnowi się za: <white>TERAZ<dark_gray>) | <&gradient[from=#43A727;to=#54D231]><bold>ZATRUTY MIECZ <dark_gray>» (<gray>Odnowi się za: <white>TERAZ<dark_gray>)" targets:<player>

### MIECZ ZATRUCIA
        on player damages player with:mieczzatrucia:
        - flag <context.damager> mieczzatrucia_last_hit:<context.entity>
        - if <util.random_chance[10]>:
            - if !<player.has_flag[mieczcooldownzatrucia]>:
                - if !<player.has_flag[mieczcooldown]>:
                    - define countdown_time2 60
                    - flag <player> mieczcooldownzatrucia expire:<[countdown_time2]>s
                    - itemcooldown netherite_sword d:<[countdown_time2]>s
                    - inject skill_mieczzatrucia
                    - repeat <[countdown_time2]>:
                        - if <player.has_flag[mieczcooldown]>:
                            - stop
                        - else:
                            - actionbar "<&gradient[from=#43A727;to=#54D231]><bold>ZATRUTY MIECZ <dark_gray>» (<gray>Odnowi się za: <white><[countdown_time2]>s<dark_gray>)" targets:<player>
                            - define countdown_time2 <[countdown_time2].sub[1]>
                            - wait d:1s
                - else if <player.has_flag[mieczcooldown]>:
                    - define countdown_time2 60
                    - flag <player> mieczcooldownzatrucia expire:<[countdown_time2]>s
                    - itemcooldown netherite_sword d:<[countdown_time2]>s
                    - inject skill_mieczzatrucia
                    - repeat <[countdown_time2]>:
                        - actionbar "<&gradient[from=#B148BC;to=#93419B]><bold>KATANA KRESU <dark_gray>» (<gray>Odnowi się za: <white><[countdown_time2]>s<dark_gray>) | <&gradient[from=#43A727;to=#54D231]><bold>ZATRUTY MIECZ <dark_gray>» (<gray>Odnowi się za: <white><[countdown_time2]>s<dark_gray>)" targets:<player>
                        - define countdown_time2 <[countdown_time2].sub[1]>
                        - wait d:1s
                    - actionbar "<&gradient[from=#B148BC;to=#93419B]><bold>KATANA KRESU <dark_gray>» (<gray>Odnowi się za: <white>TERAZ<dark_gray>) | <&gradient[from=#43A727;to=#54D231]><bold>ZATRUTY MIECZ <dark_gray>» (<gray>Odnowi się za: <white>TERAZ<dark_gray>)" targets:<player>



skill_mieczendermana:
    type: task
    script:
        - shoot ENDER_PEARL height:0.1 speed:2

skill_mieczzatrucia:
    type: task
    script:
        - cast poison <context.entity> amplifier:1 duration:5s