hay all please help its easy

04/14/2013 18:34 salehnussirat#1
hay all
can you gave me a quest does that please


1-if pc have 10 boxes or items of somthing
then gave him a gift like new sord or any thing

and if pc dont have 10 boxes
then say ( sorry you dont have 10 boxes .... what ever )

pleaaase help :handsdown:


sorry for my bad english
thanx
04/14/2013 18:47 xXKimariXx#2
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(itemID2count)
        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
04/14/2013 18:50 salehnussirat#3
thanx very much :)

hay can you gave me a simple one like this



if pc.count_item("itemID") >= 10 then
pc.give_item(itemID2, count)
else
say("Sorry..")
say("You donīt have 10 Boxes")
end


is that right?