Paste #115746: waling around

Date: 2023/09/28 12:38:30 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


work_pleas:
    type: format
    format: "<&b><npc.name><&f><&co> <&a><[text]>"

my_npc:
    type:  assingment
    actions:
        on assingment:
        - trigger name:click state:true
        - trigger name:chat state:true
    interact scripts:
    - follow_me

follow_me:
    type: interact
    steps:
        1:
            click trigger:
                Script:
                - narrate format:work_pleas "hello woud you like to go an a tour"
                - narrate "/yes/ or /no/"
            chat trigger_:
                1:
                    trigger: /yes/ i love to
                    script:
                    - narrate format:work_pleas "okay great foloow me"
                    - ^create player Mynpc <npc.location> save:mynpc
                    - ^adjust <player> hide_entity:<npc>
                    - ^adjust <server.flag.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: /no/ i dont wand to
                    script:
                    - narrate format:work_pleas okay bye

my_npc_path:
    type: task
    definitions: masternpc
    script:
    - ^flag <npc> step:1
    - define masternpc <npc>
    - walk <[masternpc].anchor[spot1]> auto_range
    - inject my_npc_trypause
    - flag <npc> step:2
    - walk <[masternpc].anchor[spot2]> auto_range
    - inject my_npc_trypause
    - flag <npc> step:3
    - walk <[maternpc].anchor[spot3]> auto_range
    - wait 1
    - adjust <player> show_entity:<[masternpc]>
    - zap 1 script:follow_me

my_npc_trypause:
   type: task
   script:
   - ^while <npc.location.distance[<player.location>].is[or_less].than[5]>:
    - narrate format:work_pleas "try to keep up"
    - wait 1

my_npc_talk:
    type: task
    script:
    - narrate format:work_pleas "hello wellkom"
    - wait 1
    - narrate format:work_pleas "this is a cool place"
    - while <npc.flag[step].is[OR_LESS].than[1]>;
    - narrate format:work_pleas "here you hve somting"