Paste #52180: qwe

Date: 2019/02/06 16:24:10 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


# ████████████████████████████████████████████████████ 
# ██   New Formats 
# ██ 
# ██▓▓▒▒░░ 
# [ These will be removed and placed into a Universal file later, to be used globally through multiple quests later on as quests grow ]
cgf: 
  type: format 
  debug: false 
  format: <&c><npc.name.to_titlecase> Chef Geoph <&co> <&r><&o><text> 

# ████████████████████████████████████████████████████ 
# ██   Procedures 
# ██ 
# ██▓▓▒▒░░ 

# ███ [ NPC_NAME Assignment ] ███ 
# ███ [ Assign "NPC_NAME" to the npc you would like to use ] ███ 
ChefGeoph: 
  type: assignment 
  debug: false 
  actions: 
    on assignment: 
    - trigger name:click state:true 
    on click: 
    - if !<player.has_flag[NpcEngaged]>: 
      - inject locally NPC_init 

# ████████████████████████████████████████████████████ 
# ██   Custom script paths to be injected/run 
# ██              (These do not need changed)
# ██ 
# ██▓▓▒▒░░ 

  opt_loop: 
  - define sig <util.random.uuid> 
  - flag player sig:<def[sig]> 
  - foreach <script.yaml_key[<def[1]>]>: 
    - define value <def[value].split[/].limit[2]> 
    - narrate "<proc[option].context[<def[value].get[2]>|<def[value].get[1]>|<npc>|<def[sig]>]>"

# ████████████████████████████████████████████████████ 
# ██   Initiation Scripts 
# ██ 
# ██▓▓▒▒░░ 

# ███ [ First time a player talks to npc  ] ███ 
  NPC_init: 
  - narrate format:cgf "<script.yaml_key[d1]>" 
  - wait 1s 
  - run locally opt_loop def:o1 instantly 

# ████████████████████████████████████████████████████ 
# ██   Custom script paths to be injected/run 
# ██ 
# ██▓▓▒▒░░ 

# ███ [ Option   1  ] ███ 
# ███ [ Response 1  ] ███ 
  geoph_green_sauce: 
  - narrate format:cgf "<script.yaml_key[d2]>"
  - wait 2s
  - narrate format:cgf "<script.yaml_key[d3]>"
  - wait 2s
  - run locally opt_loop def:o2 instantly 

# ███ [ Option   1  ] ███ 
# ███ [ Response 2  ] ███ 
  geoph_suck_it_up: 
  - narrate format:cgf "<script.yaml_key[d4]>" 
  - wait 2s 
  - narrate format:cgf "<script.yaml_key[d5]>"


# ███ [ Option   2  ] ███ 
# ███ [ Response 1  ] ███ 
  geoph_get_potatos: 
    # Wait until the player has retrieved some potatos
  - narrate format:cgf "<script.yaml_key[d6]>"
    # Give player an emerald

# ███ [ Option   2  ] ███ 
# ███ [ Response 2  ] ███ 
  geoph_no_get_potatos: 
  - narrate format:cgf "<script.yaml_key[d7]>"

# ████████████████████████████████████████████████████ 
# ██   Option Scripts 
# ██ 
# ██▓▓▒▒░░ 

# ███ [ Option 01 | NPC_NAME: "" ] ███ 
  o1: 
  - "geoph_green_sauce/<&a>I think that tomato sauce is green..." 
  - "geoph_suck_it_up/<&a>Here, let me try it... *holding back tears* it tastes fine to me" 

# ███ [ Option 02 | NPC_NAME: "" ] ███ 
  o2: 
  - "geoph_get_potatos/<&a>Alright, I'll go find some potatos" 
  - "geoph_no_get_potatos/<&a>I don't think tomato sauce needs potatos, I'll pass." 

  # ████████████████████████████████████████████████████ 
# ██   Dialog 
# ██ 
# ██▓▓▒▒░░ 

# ███ [ Chef Geoph dialogue ] ███ 
  d1: "AH! I can't seem to get this tomato sauce right! What am I doing wrong? Here, can you help me?" 
  d2: "What? The sauce isn't green, is it? oh..." 
  d3: "You wouldn't mind going and fetching some potatos, would you?"
  d4: "Wow! I've never heard anyone say that about my cooking before! Thanks!" 
  d5: "Here's some gold nuggets, you just made my day!"
  d6: "Thanks for getting those potatos! Here's an emerald."
  d7: "Fine! I didn't want your help anyways..."