• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Npc remove bucket of milk

lucastiond

New Member
Joined
Jul 14, 2013
Messages
35
Reaction score
0
Hello guys.
My problem is actually (i think) pretty fast to solve.

I need the npc make the function: if player:removeItem(x, 1) then but with a bucket of milk.

The problem is that the id of a bucket of milk it's 2005,6 and the id of a bucket it's 2005.
So how am i going to make the npc ask for the bucket of milk and not the empty bucket??
 
Solution
The third parameter (which is optional) of
Code:
removeItem(itemId, count[, subType = -1[, ignoreEquipped = false]])
Is subType, check out which sub type number represents the milk fluid, and add that.

Etc:
Code:
if player:removeItem(2005, 1, 6) then

Not quite sure if the milk will be removed, or the entire bucket.
Sorry, but how am i supposed to use this?

My script it's like this:

if player:removeItem(2005, 1) then
npcHandler:say("Hmm, milk. The source of all life! Here is your reward.", cid)
npcHandler.topic[cid] = 0
player:setStorageValue(46125, 2)
 
The third parameter (which is optional) of
Code:
removeItem(itemId, count[, subType = -1[, ignoreEquipped = false]])
Is subType, check out which sub type number represents the milk fluid, and add that.

Etc:
Code:
if player:removeItem(2005, 1, 6) then

Not quite sure if the milk will be removed, or the entire bucket.
 
Solution
Back
Top