Paste #46892: Untitled Paste

Date: 2018/03/14 21:14:09 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


cchat:
    type: format
    format: "<&6><npc.name><&f><&co> <&f><text>"

ochat:
    type: format
    format: "<&7><text>"

my_npc:
    type: assignment
    actions:
        on assignment:
        - trigger name:click state:true
        - trigger name:chat state:true
        interact scripts:
        - 10 my_npc_interact

my_npc_interact:
    type: interact
    steps:
        1:
            click trigger:
                script:
                - narrate format:cchat "Not here, not now. We can talk at dusk, come find me at the old dragon burrial ground."
                - narrate format:ochat "***/Ok/  | /Goodbye/***"
            chat trigger:
                1:
                    trigger: /Ok/, we will meet then.
                    script:
                    - narrate format:cchat "I will be waiting for you there"
                    - ^create player mynpc <npc.location> save:mynpc
                    - ^adjust <player> hide_entity:<npc>
                    - ^adjust <server.list_online_players.exclude[<player>]  hide_entity:<entry[mynpc].created_npc>
                    - ^run my_npc_path npc:<entry[mynpc].created_npc def:<^npc>
                    - ^run my_npc_talk npc:<entry[mynpc].created_npc>
                    - zap 2
                2:
                    trigger: /Goodbye/
                    script:
                    - narrate format:cchat "Ah.. you are not prepared.."

my_npc_path:
    type: task
    definitions: masternpc
    script:
    - ^flag <npc> step:1
    - ~walk <def[masternpc].anchor[spot1]> auto_range
    - flag <npc> step:2
    - ~walk <def[masternpc].anchor[spot2]> auto_range
    - flag <npc> step:3
    - ~walk <def[masternpc].anchor[spot3]> auto_range
    - wait 1
    - remove <npc>
    - adjust <player> show_entity:<def[masternpc]>
    - zap 1 script:s@my_npc_interact