Paste #58538: Untitled Paste

Date: 2019/09/22 12:25:34 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>"

lamo:
  type: assignment
  actions:
    on assignment:
    - trigger name:click state:true
    - trigger name:chat state:true
  interact scripts:
  - 10 lamo_interact

lamo_interact:
  type: interact
  steps:
    1:
      click trigger:
        script:
        - narrate format:cchat "Hello, and welcome to the Sparkzcade. Would you like a tour?"
        - narrate "Say /yes/ or /no/"
      chat trigger:
        1:
          trigger: /Yes/ I'd love to
          script:
          - narrate format:cchat "Okay great, follow me!"
          - ^create player lamo <npc.location> save:mynpc
          - ^adjust <player> hide_entity:<npc>
          - ^adjust <server.list_online_players.exclude[<player>]> hide_entity:<entry[mynpc].created_npc>
          - ^run lamo_path npc:<entry[mynpc].created_npc> def:<^npc>
          - ^run lamo_talk npc:<entry[mynpc].created_npc>
          - zap 2
        2:
          trigger: /No/ I don't want to
          script:
          - narrate format:cchat "Okay, bye!"

lamo_path:
  type: task
  definitions: masternpc
  script:
  - ^flag <npc> step:1
  - ~walk <def[masternpc].anchor[spot1]> auto_range
  - ^inject lamo_trypause
  - flag <npc> step:2
  - ~walk <def[masternpc].anchor[spot2]> auto_range
  - ^inject lamo_trypause
  - 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@lamo_interact

lamo_trypause:
  type: task
  script:
  - ^while <npc.location.distance[<player.location>].is[OR_MORE].than[5]> {
    - narrate format:cchat "try to keep up!"
    - wait 1
    }

lamo_talk:
  type: task
  script:
  - narrate format:cchat "Hello and welcome"
  - wait 2
  - narrate format:cchat "This server is a cool place!"
  - while <npc.flag[step].is[OR_LESS].than[1]> {
    - wait 1
    }
  - narrate format:cchat "Over here is <&9>THE THING"