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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

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