Paste #140019: Unnamed Denizen Script Paste

Date: 2026/04/20 16:29:26 UTC+00:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


explosive_bow:
  type: item
  material: bow
  display name: "<red>Explosive Bow"
  lore:
  - "<gray>20% chance to explode"

explosive_bow_shoot:
  type: world

  events:

    on player shoots bow:

    - if <player.item_in_hand.scriptname||null> != explosive_bow:
        - stop

    # 20% chance
    - if <util.random.int[1].to[100]> > 20:
        - stop

    - flag <context.projectile> explosive_arrow:true

explosive_bow_hit:
  type: world

  events:

    on projectile hits:

    - if !<context.projectile.has_flag[explosive_arrow]>:
        - stop

    - define loc <context.projectile.location>

    - explode power:1 location:<[loc]> fire:false break_blocks:true

    - playeffect effect:explosion_large at:<[loc]> quantity:5
    - playsound sound:entity.generic.explode at:<[loc]>

    - remove <context.projectile>