Paste #54544: Untitled Paste

Date: 2019/06/08 08:11:32 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


"Guard":
    type: assignment
    default constants:
        # List of all weapon ID numbers used in the script for guard recognition
        weapons: i@wooden_sword|i@stone_sword|i@iron_sword|i@golden_sword|i@diamond_sword|i@bow
        originallocation: <npc.location>
    interact scripts:
    - 10 GuardInteract
    actions:
        on assignment:
        - trigger name:click toggle:true
        - trigger name:proximity toggle:true
        - trigger name:damage toggle:true

"GuardInteract":
    type: interact
    steps:
        '1':
            proximity trigger:
                move:
                    script:
                    - run weaponcheck instantly
            click trigger:
                script:
                - random 18
                - chat "Do I look like I want to stand and have a chat with you, <player.name>?"
                - chat "Move along inmate"
                - chat "Scumbag prisoners..."
                - chat "<player.name>, what are you starting at?"
                - chat "Looks like everything's in order here..."
                - chat "Any trouble and you'll be seeing the other side of my baton."
                - chat "Enjoying your stay inmate? Pahaha."
                - chat "Why are you sucking up? There are no reduced sentences for good behaviour here..."
                - chat "Have you learned your lesson yet?"
                - chat "Quit wasting my time"
                - chat "I've got my eye on you"
                - chat "You think you're so slick, like I don't know everything that's going on in this prison."
                - chat "You pleaded innocent? Who were you kidding?"
                - chat "What did I tell you? Move along."
                - chat "You think you've got friends in here? We'll see..."
                - chat "I don't care what this correctional facility is called; we'll have no riots. Got it?"
                - chat "You've got some nerve standing this close to me."
                - chat "You looking for trouble? Cause I'll give it to ya."

"weaponcheck":
    type: task
    script:
    - if <npc.constant[weapons]> contains <player.item_in_hand>:
        - trigger name:proximity toggle:false
        - chat "You've got 5 seconds to put that weapon away."
        - chat "5"
        - follow
        - repeat 4:
            - if <npc.constant[weapons]> contains <player.item_in_hand>:
                - wait 1s
                - chat "<el@5.sub[<def[value]>]>"
            - else:
                - inject thank
                - inject stopweaponcheck
                - queue clear
        - if <npc.constant[weapons]> contains <player.item_in_hand>:
            - wait 1s
            - execute as_server "jail <player.name> jail 1m"
            - inject stopweaponcheck
        - else:
            - inject thank
            - inject stopweaponcheck

"thank":
    type: task
    script:
    - random 4
    - chat "Was that so hard?"
    - chat "Wave that thing at me again and you'll know about it."
    - chat "Darn, that cell had your name on it too."
    - chat "I almost wanted an excuse to throw you in a cell."

"stopweaponcheck":
    type: task
    script:
    - trigger name:proximity toggle:true
    - follow followers:<npc> target:<player> stop
    - narrate <npc>
    - narrate <npc.constant[originallocation]>
    - walk <npc> <npc.constant[originallocation]>