Paste #111267: Unnamed Denizen Script Paste

Date: 2023/06/16 15:32:25 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


blessing:
    type: world
    debug: false
    events:
        on entity damaged by player flagged:blessing:
        - determine <context.final_damage.mul[2]>

enterblessing:
    type: world
    debug: false
    events:
        on player right clicks lectern in:blessing:
        - if !<player.has_flag[blessingcooldown]>:
          - flag <player> blessing expire:3h
          - flag <player> blessingcooldown expire:12h
          - permission add faria.blessing
          - runlater removeblessing delay:3h def.target:<player>
          - narrate "<n><&f><&6>Azura's Blessing<n><n><&7> <&a>You have been blessed for 3 hours<n>"
          - playsound <player> custom sound:itemsadder:music_disc.blessing pitch:2 volume:1
          - cast darkness <player> amplifier:3 duration:3
        - else:
          - ratelimit <player> 5s
          - narrate "<n><&f><&6>Azura's Blessing<n><n><&7> <&c>You have already been blessed in the past 12 hours<n>"


removeblessing:
  type: task
  debug: false
  script:
  - permission remove faria.blessing
  - narrate "<n><&f><&6>Azura's Blessing<n><n><&7> <&c>Your blessing has expired<n>"