• 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!

NPC gives item TO BP

Kedor

New Member
Joined
Mar 3, 2008
Messages
263
Reaction score
0
Location
Poland, Gdynia
i want to ask how to make that.. if i will end quest (bring breads to guy) he gives me amulet.. or necklace.. whatever.. just i want make that, when he is giving me it.. to not put it on neck automatically.. i want put it in BP

i mean i got all script of NPC but when i dont have anythink on my neck, the reward is appearing on my neck.. and thats bad..:p

cuz i got some script on that amulet and i dont want it to be on neck if player dont want that :p
 
Well the thing is, thats how it work in Real Tibia too. It might be with the client that determines it, but I am not sure. If its possible to do it with the server, it would be in the sources.
 
Ya, there's no function to decide where to put the item... Just use doPlayerAddItem(cid,itemid,how many). That way it will put it in the neck slot if it's free, and in BP if the slot isn't.
 
Code:
if getPlayerSlotItem(cid, 2).itemid == 0 then
	doPlayerSendCancel(cid, 'Necklance is empty')
else
	doPlayerSendCancel(cid, 'Necklance is full')
end

Use something like this : )
 
I think you can add item to backpack by doing something like this:
Code:
local container = getPlayerSlotItem(cid, _BACKPACK_SLOT_HERE_)
doContainerAddItem(container, itemid, count)
 
Back
Top