Paste #67540: Untitled Paste

Date: 2020/04/16 06:47:06 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


MoldirBanker:
    type: assignment
    debug: true
    actions:
        on assignment:
        - trigger name: click state:true
        on click:
        - if <player.item_in_hand.script.name||false> == "BankPermit":
            - playsound <player> ENTITY_VILLAGER_CELEBRATE
            - narrate "Seems like you got a <&6>Golden Nugget Bank Permit<&f>."
            - wait 2s
            - playsound <player> ENTITY_VILLAGER_CELEBRATE
            - narrate "Please take the door to your right to enter the vault area!"
            - wait 2s
            - playsound <player> Entity_VILLAGER_CELEBRATE
            - narrate "Make sure to hold it in your hand!"
            - stop
        - if <player.item_in_hand.material.name> == emerald_block:
            - playsound <player> ENTITY_VILLAGER_NO
            - narrate "<&f>Let me count those real quick.<&f>."
            - wait 1s
            - repeat 14:
                - if <player.item_in_hand.material.name> == emerald_block:
                    - playsound <player> ENTITY_EXPERIENCE_ORB_PICKUP
                    - take iteminhand
                    - wait 0.15s
                    - define Count:+:1
                - else:
                    - playsound <player> ENTITY_VILLAGER_NO
                    - narrate "<&f>That's just <&3><[Count]> Emerald Block!"
                    - wait 1
                    - playsound <player> ENTITY_VILLAGER_NO
                    - narrate "Sorry, i can't hand you over one for that."
                    - give <player> Emerald_Block qty:<[Count]> 
                    - define Count:0
                    - stop
            - if <[Count]> == 14:
                - playsound <player> ENTITY_VILLAGER_CELEBRATE
                - narrate "Looks good. Here is your <&6>Golden Nugget Bank Permit<&f>."
                - flag npc counter:+:1
                - adjust <[BankPermit]> nbt:number/<npc.flag[counter]>
                - give BankPermit
                - wait 2s
                - playsound <player> ENTITY_VILLAGER_CELEBRATE
                - narrate "Let me explain this real quick!"
                - wait 2s
                - playsound <player> ENTITY_VILLAGER_CELEBRATE
                - narrate "This permit allows you to enter the vault area!"
                - wait 2s
                - playsound <player> ENTITY_VILLAGER_CELEBRATE
                - narrate "Inside the vault area, you have your own safe vault assigned."
                - wait 2s
                - playsound <player> ENTITY_VILLAGER_CELEBRATE
                - narrate "Inside this vault, you can store whatever you want"
                - wait 2s
                - playsound <player> ENTITY_VILLAGER_CELEBRATE
                - narrate "Most people store their <&5>Enderchest <&f>inside."
                - wait 2s
                - playsound <player> ENTITY_VILLAGER_CELEBRATE
                - narrate "Probably the smartest thing you can do."
                - wait 2s
                - playsound <player> ENTITY_VILLAGER_CELEBRATE
                - narrate "Enough talk! To get to the vault area, take the door to your right!"
        - else:
            - playsound <player> ENTITY_VILLAGER_AMBIENT
            - narrate "<&f>Welcome to the <&6>Gold Nugget Bank<&f>!"
            - wait 2s
            - playsound <player> ENTITY_VILLAGER_AMBIENT
            - narrate "<&f>Nobody else can store your belongings as safe as we do."
            - wait 3s
            - playsound <player> ENTITY_VILLAGER_AMBIENT
            - narrate "<&f>If you want to become a customer, you need to pay <&3>14 Emerald Blocks<&f>."
            - wait 3s
            - playsound <player> ENTITY_VILLAGER_AMBIENT
            - narrate "<&f>Super cheap for a safe place like this right?"
            - wait 2s
            - playsound <player> ENTITY_VILLAGER_CELEBRATE
            - narrate "<&f>If you have the <&3>14 Emerald Blocks <&f>feel free to hand them over to me."

BankPermit:
    type: item
    debug: true
    material: paper
    display name: <&6>Gold Nugget Bank Permit
    lore:
    - Permit to enter a personal
    - vault in <&3>Moldir<&5>. This
    - permit is for room <npc.flag[<counter>]>
    enchantments:
    - silk_touch:1
    mechanisms:
        flags: HIDE_ALL
        nbt:<number/<npc.flag[counter]>