Paste #67628: Untitled Paste

Date: 2020/04/17 19:18:33 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


MoldirBanker:
    type: assignment
    debug: false
    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 16:
                - 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]> == 16:
                - playsound <player> ENTITY_VILLAGER_CELEBRATE
                - narrate "Looks good. Here is your <&6>Golden Nugget Bank Permit<&f>."
                - flag npc counter:+:1
                - give <item[BankPermit].with[nbt=number/<npc.flag[counter]>]>
                - 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 "You can even decorate it if you want."
                - wait 2s
                - playsound <player> ENTITY_VILLAGER_CELEBRATE
                - narrate "Please listen to the Transit Manager. He has some important infos aswell!"
                - 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 your own vault it will cost you <&3>16 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>16 Emerald Blocks <&f>feel free to hand them over to me."
            # RESET TICKETNUMBERS:       /ex flag npc counter:0
            # NARRATE NBT (TICKET ID):   /ex narrate <player.item_in_hand.nbt[number]>

BankPermit:
    type: item
    debug: false
    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]>>

TransitManager:
    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 "<&f>Lets see..."
            - define number <player.item_in_hand.nbt[number]>
            - wait 2s
            - if <player.item_in_hand.lore.contains_text[room]>:
                - playsound <player> ENTITY_VILLAGER_CELEBRATE
                - if <player.item_in_hand.nbt[number]> >= 1 && <[number]> < 20:
                    - define TN1 TowerNumber
                - narrate "<&f>Room <&6><player.item_in_hand.nbt[number]><&f>, thats tower <&6><[TN1]>"
                - wait 2s
                - playsound <player> ENTITY_VILLAGER_CELEBRATE
                - narrate "<&f>I will get you there in no time!"
                - mount <player>|minecart <location[-12448.73,78.50,-13160.43,Project_XX]>
                - if <player.flag[TransitInstructed]>:
                    - wait 2s
                    - playsound <player> ENTITY_VILLAGER_CELEBRATE
                    - narrate "You know the rules! Have a good ride!"
                - else:
                    - wait 2s
                    - playsound <player> ENTITY_VILLAGER_NO
                    - narrate "Please don't leave the minecart while traveling there."
                    - wait 2s
                    - playsound <player> ENTITY_VILLAGER_NO
                    - narrate "If you do, you won't be able to get to your tower!"
                    - wait 2s
                    - playsound <player> ENTITY_VILLAGER_NO
                    - narrate "You also have to walk back the entire way then. No fun!"
                    - flag <player> TransitInstructed

        - else:
            - playsound <player> ENTITY_VILLAGER_NO
            - narrate "Please show me your <&6>Bank Permit"

DoorHandler:
    type: assignment
    actions:
        on assignment:
        - trigger name:proximity state:true radius:2
    interact scripts:
    - DoorHandlerInt

DoorHandlerInt:
    type: interact
    steps:
        1:
            proximity trigger:
                entry:
                    script:
                        - if <player.item_in_hand.script.name||false> == BankPermit:
                            - switch <location[-12439.51,85.00,-13169.34,Project_XX]> state:on
                            - playsound <player> DOOR_OPEN
                        - else:
                            - narrate "You need hold a <&6>Golden Nugget Bank Permit"
                            - narrate "in your hand to enter the Vault Area"
                            - playsound <player> ENTITY_VILLAGER_NO
                exit:
                    script:
                        - switch <location[-12439.51,85.00,-13169.34,Project_XX]> state:off
                        - playsound <player> DOOR_CLOSE

VaultCon:
    type: assignment
    actions:
        on assignment:
        - trigger name:proximity state:true radius:1
    interact scripts:
    - VaultConInt

VaultConInt:
    type: interact
    steps:
        1:
            proximity trigger:
                entry:
                    script:
                        - playsound <player> ENTITY_VILLAGER_CELEBRATE
                        - narrate "Hello, the transit to your vault is ahead."
                        - wait 2s
                        - playsound <player> ENTITY_VILLAGER_CELEBRATE
                        - narrate "Please go downstairs."
                        - cooldown 5m script:VaultConInt