Paste #75068: Untitled Paste

Date: 2020/08/29 13:18:52 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


HorseCallCommand:
    type: command
    name: horse
    description: Horse Basic Command
    usage: /horse
    permission: icecapade.horse
    script:
    - if <context.args.first> == call && <yaml[horse].contains[<player.uuid>.tamed.<context.args.get[2]>]>:
        - run HorseSpawnTask def:<context.args.get[2]>
    - else if <context.args.first> == away:
        - run HorseDespawnTask
HorseSpawnTask:
    type: task
    definitions: horse
    script:
    - if <player.has_flag[horse]>:
        - narrate "Has_Flag Horse"
        - stop
    - spawn <yaml[horse].read[<player.uuid>.tamed.<[horse]>.horse]> save:Horse
    - wait 1t
    - narrate <entry[Horse].spawned_entity>
    - flag player horse:<[horse]>/<entry[Horse].spawned_entity>
    - narrate "Horse Spawned"