PikaMug / Quests

Easy-to-use, open-source plugin for the creation and execution of quests on Minecraft servers.
https://modrinth.com/plugin/quests.classic
MIT License
147 stars 108 forks source link

Quests completing upon logging out and back in #2172

Closed xeonatlas closed 9 months ago

xeonatlas commented 9 months ago

What is your Quests version / build number (do not say "latest")?

5.0.0-rc.3-b440

Describe the problem and how to replicate it.

Create a quest with four stages, the first three are to talk to the NPC, the final is to bring the NPC some items. The final stage in the quest is to deliver 10x of an item to the NPC. Not a repeat quest

Take the quest Get to stage 4 with the objective of collecting 10 of an item Log out Log in

Quest completed and all rewards given to the player without having to deliver the items.

Any console errors to share?

None

If applicable, can you provide an example quest from quests.yml?

'000007':
    name: The Keeper
    ask-message: You approach a dark hooded figure, you notice the closer you get
      the less life appears to be present around the figure, it's cold, each step
      taken gets colder as you approach, "Do not fear spirit, I have a offer to make
      you.."
    finish-message: §cReturn to The Keeper tomorrow with 10 more tabs for another
      reward.
    npc-giver-uuid: 356d46d2-3b9d-43ec-b58b-ab0ff9bed37d
    stages:
      ordered:
        '1':
          npc-uuids-to-talk-to:
          - 356d46d2-3b9d-43ec-b58b-ab0ff9bed37d
          start-message: Talk to "The Keeper" (right click or punch)
          complete-message: '&cI have a proposition to make you, I am.. let''s say
            in a very specialised line of work, I help process all the spirits that
            arrive in this land like yourself, but I have.. misplaced, yes lets say
            misplaced some &dDeath Tabs'
        '2':
          npc-uuids-to-talk-to:
          - 356d46d2-3b9d-43ec-b58b-ab0ff9bed37d
          delay: 3
          start-message: Continue talking to "The Keeper" (right click or punch)
          complete-message: '&cWhat &dDeath Tabs&c are is not really your concern,
            all you need to know is I have.. misplaced them and I need you to bring
            them back to me, now, on the mortal plane my face alone would force you
            to say yes, however, here, well, there aren''t many fears.'
        '3':
          npc-uuids-to-talk-to:
          - 356d46d2-3b9d-43ec-b58b-ab0ff9bed37d
          delay: 3
          start-message: Continue talking to "The Keeper" (right click or punch)
          complete-message: '&cFear really rather dissapears when you''re dead.. anyway,
            collect them for me as you roam the world, they could be anywhere, but
            you''ll mostly find them on the bodies of hostile enemies I will reward
            you well, &e¥650&c for every 10 you recover.'
        '4':
          items-to-deliver:
          - ==: org.bukkit.inventory.ItemStack
            v: 3578
            type: PAPER
            amount: 10
            meta:
              ==: ItemMeta
              meta-type: UNSPECIFIC
              display-name: '{"extra":[{"bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"light_purple","text":"Death
                "},{"italic":false,"color":"red","text":"Tab"}],"text":""}'
              lore:
              - '{"extra":[{"bold":false,"italic":true,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"red","text":"Never
                has something you can hold"}],"text":""}'
              - '{"extra":[{"bold":false,"italic":true,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"red","text":"felt
                so dark and hollow as this does."}],"text":""}'
              - '{"extra":[{"bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"dark_purple","text":"I
                should take this to "},{"italic":false,"color":"dark_red","text":"The"},{"italic":false,"color":"red","text":"
                Keeper."}],"text":""}'
              enchants:
                PROTECTION_FALL: 6
              ItemFlags:
              - HIDE_ENCHANTS
              - HIDE_ATTRIBUTES
              - HIDE_UNBREAKABLE
              - HIDE_POTION_EFFECTS
              - HIDE_DYE
              - HIDE_ARMOR_TRIM
              Unbreakable: true
              PublicBukkitValues: |-
                {
                    "executableitems:ei-id": "death-tab",
                    "score:usage": 0
                }
          npc-delivery-uuids:
          - 356d46d2-3b9d-43ec-b58b-ab0ff9bed37d
          delivery-messages:
          - '&cGood.. Good, almost 10, only &4<amount>&c more.'
          delay: 3
          start-message: Collect the Death Tabs and return them to the Keeper
          complete-message: '&c"Ah, good, you have 10" &fThe Keeper places the tabs
            in a hollow section of their chest, their chest glows a deep red colour
            for a brief moment and as if by magic, the tabs dissapear &c"Come back
            to me when you have more"'
    rewards:
      money: 650
      exp: 300
    planner:
      override: false
    options:
      allow-commands: true
      allow-quitting: true
      ignore-silk-touch: true
      use-parties-plugin: true
      share-progress-level: 1
      same-quest-only: true
      share-distance: 0.0
      handle-offline-players: false
      ignore-block-replace: true
PikaMug commented 9 months ago

Thanks for the report. Does this happen if you remove the stage delays delay: 3?

xeonatlas commented 9 months ago

Thanks for the report. Does this happen if you remove the stage delays delay: 3?

It does not! - That seems to have resolved it, I just wanted to put some spacing between the text hence adding the delay.

PikaMug commented 9 months ago

@xeonatlas Pretty sure I have delays fixed. Give https://ci.codemc.io/job/PikaMug/job/Quests/442/ a try and let me know!