Paste #118348: Message Sequence with a reward that you only get once

Date: 2023/12/09 08:35:23 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


npc_dialogue_script:
  type: task
  script:
    - define npc_id <13>
    - define message_counter <player.flag[npc_message_counter_<[npc_id]>].add[1]||1>
    - choose <[message_counter]>:
        - case 1:
          - narrate "To check out the auction house, just type /ah. It's like walking into a big store where you can see lots of items for sale."
        - case 2:
          - narrate "Got something to sell? Hold it in your hand and type /ah sell <price>. This way, other players can see and buy your item."
        - case 3:
          - narrate "In the auction house, you can search for specific things. Just use the search option to find what you're looking for, like a special sword or a rare block."
        - case 4:
          - narrate "Wondering what items you have up for sale? In the auction house, you can see all your items that are waiting for buyers."
        - case 5:
          - narrate "If your item doesn't sell, use /ah expired to see it, and /ah return to get it back. It's like picking up something that no one bought."
        - case 6:
          - narrate "Buying is easy! Just click on what you want in the auction house and it's yours. It's like shopping in a virtual store."
        - case 7:
          - narrate "Remember, some things you do with typing commands, like selling, and other things you do in the auction house, like buying. It's a mix of both!"
          - if !<player.has_flag[received_reward_<[npc_id]>]>:
            - narrate "Here's some money to get you started on the auction house"
            - execute as_server "eco give <player.name> 2000"  # Reward command
            - flag player received_reward_<[npc_id]>:true
          - else:
            - narrate "Thank you for visiting again!"
          - flag player npc_message_counter_<[npc_id]>:!
    - else:
      - flag player npc_message_counter_<[npc_id]>:<[message_counter].sub[1]>