Paste #127968: Unnamed Denizen Script Paste

Date: 2024/11/10 02:48:56 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


geschlecht_tiere:
    type: world
    events:
        on cow|sheep|chicken|rabbit|horse|wolf|donkey|fox|goat|mule|polar_bear|pig spawns:
        - define tier <context.entity>
        - random:
            - flag <[tier]> mannlich:++
            - flag <[tier]> weiblich:++
        on player right clicks entity:
        - ratelimit <player> 10t
        - if <context.entity.has_flag[mannlich]>:
            - narrate "<&6>Gemmeria - LW <&8>| <&7>Dieses Tier ist männlich."
        - else if <context.entity.has_flag[weiblich]>:
            - narrate "<&6>Gemmeria - LW <&8>| <&7>Dieses Tier ist weiblich."
        on entity breeds:
        - if <context.item> == futter:
            - stop
        - determine cancelled passively
        - if <context.mother.has_flag[weiblich]> && <context.father.has_flag[mannlich]>:
            - define kuh cow
            - adjust <[kuh]> age:-24000
            - spawn <[kuh]> <context.mother.location>
            - flag <context.mother> melkbar:++ expire:30h
        - if <context.mother.has_flag[mannlich]> && <context.father.has_flag[weiblich]>:
            - define kuh cow
            - adjust <[kuh]> age:-24000
            - spawn <[kuh]> <context.mother.location>
            - flag <context.mother> melkbar:++ expire:30h
        on player right clicks cow with:bucket:
        - determine cancelled passively
        - ratelimit <context.entity> 10t
        - if <context.entity.has_flag[melkbar]>:
            - ratelimit <context.entity> 8m
            - take item:bucket quantity:1
            - give milk_bucket quantity:1
        - else:
            - narrate "Diese Kuh kann nicht gemolken werden, da sie keine Milch produziert..."