Paste #76437: taurus

Date: 2020/10/15 02:37:16 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


taurus_against_player:
    type: task
    definitions: taurus|offender
    script:
        - follow followers:<[taurus]> target:<[offender]> lead:0
        - while <[taurus]>.is_spawned && <[taurus].location.distance[<[offender].location>]> < 5:
            - if <[taurus].location.distance[<[offender].location>]> < 2:
                - hurt 5 <[offender]> cause:<[taurus]>
                - wait 2s
        - if <[taurus]>.is_spawned:
            - follow followers:<[taurus]> stop

hitting_bulls:
    type: world
    events:
        on player damages cow:
        - if <context.entity.name> == cow:
            - define test <util.random.int[1].to[100]>
            - if <[test]> < 26:
                - rename taurus t:<context.entity>
                - run taurus_against_player <context.entity> <player>
            - else:
                - rename truecow t:<context.entity>
        - else if <context.entity.name> == taurus:
                - run taurus_against_player <context.entity> <player>