Paste #39531: Edit of P#39502 - Edit of P#39500 - Edit of P#39498 - Edit of P#39459 - Untitled Paste

Date: 2017/02/01 03:53:38 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


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

Guide:
    type: assignment
    actions:
        on assignment:
        - trigger name:chat state:true
        - trigger name:click state:true
    Interact Scripts:
    - 10 guide_interact

guide_interact:
    type: Interact
    Steps:
        '1':
            click trigger:
                Script:
                - narrate format:cchat "Hello! Would you like a tour?"
                - narrate "Say /yes/ or /no/"
            chat trigger:
                1:
                    trigger: /Yes/ I'd love to
                    script:
                    - narrate format:cchat "Great! Follow me!"
                    - ^create player Guide <npc.location> save:guide
                    - ^adjust <player> hide_entity:<npc>
                    - ^adjust <server.list_online_players.exclude[<player>]> hide_entity:<entry[guide].created_npc>
                    - ^run guide_path npc:<entry[guide].created_npc> def:<^npc>
                    - zap 2

                2:
                    trigger: /No/ I don't want to
                    script:
                    - narrate format:cchat "Okay, bye"

guide_path:
    type: task
    definitions: masterguide
    script:
    - ~walk <def[masterguide].anchor[spot1]> auto_range
    - ~inject guide_talk_welcomeintrorules
    - ^inject guide_trypause
    - ~walk <def[masterguide].anchor[spot2]> auto_range
    - ~inject guide_talk_money
    - ^inject guide_trypause
    - ~walk <def[masterguide].anchor[spot3]> auto_range
    - ~inject guide_talk_land
    - ^inject guide_trypause
    - ~walk <def[masterguide].anchor[spot4]> auto_range
    - ~inject guide_talk_city
    - ^inject guide_trypause
    - ~walk <def[masterguide].anchor[spot5]> auto_range
    - ~inject guide_talk_ranks
    - ^inject guide_trypause
    - ~walk <def[masterguide].anchor[spot6]> auto_range
    - ~inject guide_talk_graveyards
    - ^inject guide_trypause
    - ~walk <def[masterguide].anchor[spot7]> auto_range
    - ~inject guide_talk_shops
    - ^inject guide_trypause
    - ~walk <def[masterguide].anchor[spot8]> auto_range
    - ~inject guide_talk_dnq
    - ^inject guide_trypause
    - wait 1
    - remove <npc>

    - adjust <player> show_entity:<def[masterguide]>
    - zap 1 script:s@guide_interact

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

guide_talk_welcomeintrorules:
    type: task
    script:
    - look <def[masterguide] <player> duration:3
    - ^narrate format:cchat "Hello, this is the first line of the welcome, introduction and basic rule set."
    - wait 3
    - ^narrate format:cchat "And this is the second line of the welcome, introduction and basic rule set."

guide_talk_money:
    type: task
    script:
    - narrate format:cchat "Hello, this is the first line of the money making guide."
    - wait 3
    - narrate format:cchat "And this is the second line of the money making guide."

guide_talk_land:
    type: task
    script:
    - narrate format:cchat "Hello, this is the first line of the land protection guide."
    - wait 3
    - narrate format:cchat "And this is the second line of the land protection guide."

guide_talk_city:
    type: task
    script:
    - narrate format:cchat "Hello, this is the first line of the city creation guide."
    - wait 3
    - narrate format:cchat "And this is the second line of the city creation guide."

guide_talk_ranks:
    type: task
    script:
    - narrate format:cchat "Hello, this is the first line of the ranks guide."
    - wait 3
    - narrate format:cchat "And this is the second line of the ranks guide."

guide_talk_graveyards:
    type: task
    script:
    - narrate format:cchat "Hello, this is the first line of the graveyards guide."
    - wait 3
    - narrate format:cchat "And this is the second line of the graveyards guide."

guide_talk_shops:
    type: task
    script:
    - narrate format:cchat "Hello, this is the first line of the shops guide."
    - wait 3
    - narrate format:cchat "And this is the second line of the shops guide."

guide_talk_dnq:
    type: task
    script:
    - narrate format:cchat "Hello, this is the first line of the dungeons and questing guide."
    - wait 3
    - narrate format:cchat "And this is the second line of the dungeons and questing guide."