Bug with first quest.

I made a quest and you have to give the NPC exactly 1 sword,but you can give the NPc nothing and can still get the rewards.
How do i fix this? Also i wanted to provide a video but wasnt able to.

Also i want to say I use RMMV but made a mistake:[
@MegaStupidBulgarian1 Hi and welcome! I merged your posts for you.

In order to see what went wrong, can you please take screenshots of all event pages (make sure to include the whole event window, not just the commands section) and add them to this thread? Thanks.
@MegaStupidBulgarian1 Hi and welcome! I merged your posts for you.

In order to see what went wrong, can you please take screenshots of all event pages (make sure to include the whole event window, not just the commands section) and add them to this thread? Thanks.
Here you go. All of the script for the event
You need a conditional branch after "did you find the sword?" Inside the "yes" choice: If (player has item Sword) remove the sword and then put the success messages. You'll also want to add an "else" branch to that conditional for when the player comes back without it, so the NPC can say something like, "okay...so where is it?"
additionally, you misunderstood how select item works.
the variable given is filled with the ID of the item selected.
but you never checked which item the player selected - that would have to be something like
"if item selected = 15" (if the sword has the ID 15) or so.

Just a tip so that you don't get into that again:
NEVER name the variable used in select item for the item you want the player to select.
Always give it a name like "item selected" so that you remember to check what the player selected.
You need a conditional branch after "did you find the sword?" Inside the "yes" choice: If (player has item Sword) remove the sword and then put the success messages. You'll also want to add an "else" branch to that conditional for when the player comes back without it, so the NPC can say something like, "okay...so where is it?"
I am sorry,but i didnt understand. English isnt my first language. Can you reply with a video or a screenshot of what to do.
English isnt my first language
then why did you profile claim for english to be your first language?
that setting is there specifically so we know when someone needs more visual help.

example.png
First off,thanks for the event screenshot and second I am bulgarian as my name says but chose english since I thought it will change something.And I have no idea how to change my primary languige
then why did you profile claim for english to be your first language?
that setting is there specifically so we know when someone needs more visual help.

View attachment 229620
Excuse,but even doe i made the script still doesnt work.
The sword is still in my inv. Is it because its a item and not a weapon?
Please someone respond.
then why did you profile claim for english to be your first language?
that setting is there specifically so we know when someone needs more visual help.

View attachment 229620
no, it is most likely because your "villager's sword" does not have the ID =1
The default sword has the ID 1, which ID has your item?
Because that is what you have to check for in the selected item

EDIT:
please rename the variable used in select key item. As I explained above that variable should be named "selected item" and NOT "villagers sword" if you want to understand what the command does.
Once again,It doesnt work.
I made the code but he still doesnt take the sword,doesnt give me the gold and key:\
If possible can you show more info?
no, it is most likely because your "villager's sword" does not have the ID =1
The default sword has the ID 1, which ID has your item?
Because that is what you have to check for in the selected item

EDIT:
please rename the variable used in select key item. As I explained above that variable should be named "selected item" and NOT "villagers sword" if you want to understand what the command does.
As I asked you before: what is the ID of the "villager's sword".

That is the number you need to check, NOT NUMBER 1!!!

The player selects an item to give, and you need to check if the item selected is the one the event needs.
here is an example where different items can be used:
select item.png
As I asked you before: what is the ID of the "villager's sword".

That is the number you need to check, NOT NUMBER 1!!!

The player selects an item to give, and you need to check if the item selected is the one the event needs.
here is an example where different items can be used:
View attachment 229696
I finally did it. I completed the quest,got the gold and key! Thank you so much.

Original thread: https://forums.rpgmakerweb.com/threads/bug-with-first-quest.148629/