Paste #19951: Edit of P#19949 - Edit of P#19945 - shadowassignv4

Date: 2015/09/07 19:16:31 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


cchat:
    type: format
    format: "<&b><npc.name><&f><&co><&a><text>"
enderknight1:
    type: assignment
    actions:
        on assignment:
        - flag global masternpc:<^npc>
        - trigger name:click state:true
        - trigger name:proximity state:true
        - trigger name:chat state:true
        - adjust <npc> skin:leonellus
        - narrate <global.flag[masternpc]>
        on click:
        - narrate format:cchat "please do not touch me i am in a hurry i must find someone who can help me!"
    interact scripts:
    - 10 enderquest
enderquest:
    type: interact
    steps:
        1:
            proximity trigger:
                entry:
                    script:
                    - flag <player> active:false
                    - narrate format:cchat "excuse me! i am in a hurry. i must find someone who can help me!"
                exit:
                    script:
                    - if <player.flag[active]> {}
                    else{
                    - narrate format:cchat "Wait your <player.name> you might be able to help me. i have heard of you in the castle. i have an urgent quest can you help me?"
                    - create player EnderKnight <npc.location> save:EnderKnight
                    - flag <player> active:true
                    - ^adjust <player> hide_entity:<npc>
                    - ^adjust <server.list_online_players.exclude[<player>]> hide_entity:"<entry[Ender Knight].created_npc>"
                    - run clonetask npc:<entry[EnderKnight].created_npc> def:<^npc>}
                    - zap 2
clonetask:
    type: task
    script:
    - adjust <npc> skin:leonellus
    - ^while <npc.location.distance[<player.location>].is[or_more].then[5]>{
    - walk <npc> <player.location>
    - wait 5
    - ^if <npc.location.distance[<player.location>].is[or_less].then[6]>{
    - assignment set script:cloneassignment
    - walk <npc> stop}
    - narrate format:cchat "please wait i need to talk to you"}}
cloneassignment:
    type: assignment
    actions:
        on assignment:
        - trigger name:click state:true
        - trigger name:proximity state:true
        - trigger name:chat state:true
        - adjust <npc> skin:leonellus
        - narrate <npc>
        on exit proximity:
        - ^while <npc.location.distance[<player.location>].is[or_more].then[5]>{
        - walk <npc> <player.location>
        - wait 5
        - ^if <npc.location.distance[<player.location>].is[or_less].then[6]>{
        - walk <npc> stop}}
        - narrate format:cchat "please wait i need to talk to you"}}
    interact scripts:
    - 10 clonequest
clonequest:
    type: interact
    steps:
        1:
            chat trigger:
                1:
                    trigger: /help/ me i dont know what you want!
                    script:
                    - narrate format:cchat "my current options are yes,help,leavemealone"
                2:    
                    trigger: /leave/ me alone!
                    script:
                    - narrate format:cchat "very well than i will find someone else"
                    - ^inject ending
ending:
    type: task
    script:
    - adjust <player> show_entity:<global.flag[masternpc]>
    - adjust <global.flag[masternpc]> skin:leonellus
    - flag <player> active:false
    #- run masterpath npc:<global.flag[masternpc]>
    - remove <npc>
    - zap enderquest 1