Paste #126115: NPC QUEST script, manu doesn't open and found typeless container "EVENTS"

Date: 2024/08/30 07:43:41 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


npc_quest_assignment:
  type: assignment
  actions:
    on assignment:
      - trigger name:click state:true
  interact scripts:
    - 10 quest_gui_interaction

quest_gui_interaction:
  type: interact
  steps:
    1:
      click trigger:
        script:
          - inventory open d:in@quest_menu

quest_menu:
  type: inventory
  title: "Quest Selection"
  size: 9
  slots:
    0:
      - item i:diamond_sword display_name:"Start Quest 1" lore:<&co>Click to start Quest 1!
      - trigger: on click:
          - if !<player.flag[quest_1_started]>:
              - narrate "<gold>You've started Quest 1!"
              - flag player quest_1_started
              - execute as_player "give <player> diamond_sword 1"
              - announce "<player.name> has started Quest 1!"
          - else:
              - narrate "<red>You have already started Quest 1."
    1:
      - item i:iron_pickaxe display_name:"Start Quest 2" lore:<&co>Click to start Quest 2!"
      - trigger: on click:
          - if !<player.flag[quest_2_started]>:
              - narrate "<gold>You've started Quest 2!"
              - flag player quest_2_started
              - execute as_player "give <player> iron_pickaxe 1"
              - announce "<player.name> has started Quest 2!"
          - else:
              - narrate "<red>You have already started Quest 2."
    2:
      - item i:book display_name:"Start Quest 3" lore:<&co>Click to start Quest 3!"
      - trigger: on click:
          - if !<player.flag[quest_3_started]>:
              - narrate "<gold>You've started Quest 3!"
              - flag player quest_3_started
              - execute as_player "give <player> book 1"
              - announce "<player.name> has started Quest 3!"
          - else:
              - narrate "<red>You have already started Quest 3."