Hi guys, i so making every quests, and i have a simple problem.
Look: It is basic function of quests "setPlayerQuest".
( Code )
Ok...
6669 = Storage player.
2000 = Backpack.
1987 = Id Chest.
setPlayerQuest is a function added in global.lua
Look:
( Function )
I need modify any in global.lua? or the code? For add itens inside backpack.
please help me thanks for all
Look: It is basic function of quests "setPlayerQuest".
( Code )
function onUse(cid, item, frompos, item2, topos)
if item.uid == 1987 then
setPlayerQuest(cid, 6669, 2000, 1)
end
return TRUE
end
Ok...
6669 = Storage player.
2000 = Backpack.
1987 = Id Chest.
setPlayerQuest is a function added in global.lua
Look:
( Function )
function setPlayerQuest(ud, stor, itemquest, qnt)
local itemWeight = getItemWeight(itemquest, 1)
local playerCap = getPlayerFreeCap(ud)
if getPlayerStorageValue(ud, stor) == -1 then
if playerCap >= itemWeight then
doPlayerAddItem(ud, itemquest, qnt)
setPlayerStorageValue(ud, stor, 1)
doPlayerSendTextMessage(ud, MESSAGE_INFO_DESCR, 'You have found a ' .. getItemName(itemquest) .. '.')
else
doPlayerSendTextMessage(ud, MESSAGE_INFO_DESCR, 'You have found a ' .. getItemName(itemquest) .. '. It is weighing ' .. itemWeight .. ' oz . It\'s too heavy.')
end
else
doPlayerSendTextMessage(ud, MESSAGE_INFO_DESCR, "It is empty.")
end
end
I need modify any in global.lua? or the code? For add itens inside backpack.
please help me thanks for all

Last edited: