Jump to content

  •  

Photo

Craft multiple items at once using shop

onsellitem shop script multiple


  • Please log in to reply
1 reply to this topic

#1 haniko

haniko

    Member

  • Members
  • PipPip
  • 15 posts
  • Github:Haniko

Posted 28 January 2017 - 01:17 PM

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, 29 January 2017 - 12:03 AM.


#2 haniko

haniko

    Member

  • Members
  • PipPip
  • 15 posts
  • Github:Haniko

Posted 29 January 2017 - 12:03 AM   Best Answer

Solved.







Also tagged with one or more of these keywords: onsellitem, shop, script, multiple

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users


This topic has been visited by 18 user(s)