Paste #120408: Unnamed Denizen Script Paste

Date: 2024/02/20 06:24:27 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link



bee_protector:
  type: entity
  entity_type: bee
  debug: false
  mechanisms:
    anger: 5m
    aggressive: true
    force_no_persist: true

bee_protector_world:
  type: world
  debug: false
  events:
    after bee_protector damages entity:
    - adjust <context.damager> has_stung:false
    after player fishes:
    - if <context.state> !in caught_fish|caught_item:
      - stop
    - spawn <entity[bee_protector].repeat_as_list[4]> <player.location.above[2]> save:bees
    - define bees <entry[bees].spawned_entities>
    - define monsters <player.location.find_entities[monster].within[30]>
    - foreach <[monsters].first[<[bees].size>]> as:entity if:<[monsters].any>:
      - attack <[bees].get[<[loop_index]>]> target:<[entity]>
    - remove <context.hook>
    - wait 15s
    - remove <[bees].filter[is_spawned]>