I'd like to create an NPC that rewards players with an item after they have provided certain other items. The idea is that all players on the server can collaborate to gather the items and once the NPC has received one of each item any player can receive the reward from the NPC, once.
I'm very new to Denizen so I was hoping that you could point me in the right direction on how to approach this and which commands would come in handy. Is this possible at all with Denizen? How can I keep track of which items the NPC has received? Can I assign tags to players to keep track of whether they received the reward? Are these persistent across server restarts? Thanks!
#(shishigami87) Seeking advice on how to make a quest
31 messages · Page 1 of 1 (latest)
(shishigami87) Seeking advice on how to make a quest
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>
first off, welcome to denizen! second off, reading the guide will definitely give you a better understanding of denizen, it’s syntax, alongside some of what it can do. as far as what you’ve described there, it is certainly possible.
!guide
Guides
View the Denizen Beginner's Guide at https://guide.denizenscript.com/
View the guide page 'Long Term Memory: Flags' at: https://guide.denizenscript.com/guides/basics/flags.html
thanks!
@glass yew how can I run a step if the player has a certain item? I have seen this example using an item defined in denizen:
my_item_quest_item:
type: item
click trigger:
# If the player has the item,
1:
trigger: my_item_quest_item
However Id like to use regular items that the player has found in the world. I tried this but that doesn't seem to work:
click trigger:
1:
trigger: crying_obsidian
script:
- chat "You've obtained the Crying Obsidian! Well done!"
- take item:crying_obsidian
- flag server gave_crying_obsidian:true
2:
script:
- if <server.has_flag[gave_crying_obsidian]>:
- chat "Well done. You have brought all of the materials."
- narrate "Talk to the NPC again to receive your rewards."
- flag server wem_quest_solved:true
- zap all_items_turned_in
- else:
- chat "Looks like you didn't bring me any of the materials that I have requested."
I would expect it to take my crying obsidian if I have it and then advance to all_items_turned_in, but the NPC just says "Looks like you didn't bring me any of the materials that I have requested."
ah I had to hold it in my hand
looks like everything is working, thanks again for pointing me in the right direction :)
you're flagging the server with the player specific quest
thats a huge problem
flag the player instead
thats the point, I want everyone to work on it together and if anyone completes it everyone gets a reward
oo then sorry mb yeah thats the way to go
!t inventorytag.contains_item
Returns whether the inventory contains any item that matches the specified item matcher.
Uses the system behind !language Advanced Object Matching.
Returns
ElementTag(Boolean)
^ you can use this if you want to not make them hold it in their hand
also, no need to use :true when applying flags, that's just the default state
just use
- flag server gave_crying_obsidian if you want to do that
Thread Closing Reminder
Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.
If not yet resolved, please reply below to tell us what you still need.
(Note that if there is no reply for a few days, this thread will eventually close itself.)
@ruby junco