Jump to content
  • 0
Sign in to follow this  
haniko

Craft multiple items at once using shop

Question

I am currently working on creating a NPC which allows you to craft Eye Patches in exchange of 1 Rusty Bandages and 1 White Potion. Easy enough right? But there is more, I am using the shop and "OnSellItem:" to craft as many Eye Patches based on the items in the sell box.

 

So in essence, if I have 10 Rusty Bandages and 10 White Potions, I would get 10 Eye Patches. Whereas if I have 9 Rusty Bandages and 10 White Potions, I would get 9 Eye Patches etc.

 

I am however stuck on how to check if an item and it's quantity matches the Eye Patch requirement from the sell box. I am quite a beginner in scripting, so it be very helpful 

 

EDIT

 

Fixed it myself.

Edited by haniko

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.