PHP Code:
quest giveitem begin
state start begin
if npcID.chat."Give him 10 Boxes" with pc.count_item("itemID") >= 10 then
say("Thank you")
say("Here i give you a Item")
pc.give_item(itemID2, count)
else
boxes = pc.count_item("itemID")
say("Sorry..")
say("You donīt have 10 Boxes")
say("You have only :"..boxes)
end
end
end
Here , i think that is what you want
npcID : Here comes the ID of the NPC for example 9005.chat."......."
itemID : Here comes the ID of the Item("the boxes")
itemID2: Here comes the ID of the Item that he get
count: That is how much he get the Item