Paste #47695: Untitled Paste

Date: 2018/06/04 16:50:56 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


"Bad Luck NPC":
    type: assignment
    interact scripts:
    - 10 Bad Luck NPC Forging
    actions:
        on assignment:
        - teleport npc <npc.anchor[badlucknpc]>
        - trigger name:proximity toggle:true
        - trigger name:chat toggle:true

"Bad Luck NPC Format":
    type: format
    format: "<dark_green>Bad Luck NPC<white><&co> <text>"

"Bad Luck NPC Forging":
    type: interact
    steps:
        "Player Seen*":
            proximity trigger:
                entry:
                    script:
                    - narrate "format:Bad Luck NPC Format" "Welcome, adventurer! I am a master of extracting magical energies and manipulating them for heroes like yourself. If you collect enough of these items on your adventures, I can help you harness this power."
                    - narrate "format:Bad Luck NPC Format" "The various services I can provide require different amounts of magical energy. Right click me to browse my offerings."
                exit:
                    script:
                    - narrate "format:Bad Luck NPC Format" "Good luck on your adventures! Visit me again when you need my help."
            click trigger:
                script:
                - narrate "format:Bad Luck NPC Format" "Okay, here's what I have to offer."
                - wait 2s
                - inventory open d:in@BadLuckNPCInventoryMenu
"BadLuckNPCInventoryMenu":
    type: inventory
    title: Arcane Forging
    size: 45
    slots:
    - "[] [] [] [] [] [] [] [] []"
    - "[] [] [] [i@VeteranToolForge] [] [i@VeteranWeaponForge] [] [] []"
    - "[] [] [] [] [] [] [] [] []"
    - "[] [] [] [i@EliteToolForge] [] [i@EliteWeaponForge] [] [] []"
    - "[] [] [] [] [] [] [] [] []"

"VeteranToolForge":
    type: item
    material: diamond_pickaxe
    display name: "<&6>Forge a Veteran Tool"

"VeteranWeaponForge":
    type: item
    material: diamond_sword
    display name: "<&6>Forge a Veteran Weapon"

"EliteToolForge":
    type: item
    material: diamond_pickaxe
    display name: "<&d>Forge an Elite Tool"

"EliteWeaponForge":
    type: item
    material: diamond_sword
    display_name: "<&d>Forge an Elite Weapon"

my_inventory_menu_handler:
    type: world
    events:
        on player breaks grass:
        - inventory open d:in@my_inventory_menu
        on player clicks in BadLuckNPCInventoryMenu:
        - determine cancelled
        on player drags in BadLuckNPCInventoryMenu:
        - determine cancelled
        on player clicks my_inventory_menu_slot1 in my_inventory_menu:
        - narrate