whiteblXK
Active Member
Hi, I have problem with my script. When a player meets the requirements of the script it still shows up else, this:
I use Devland 0.97B, this is tibia 8.0
This is my script:
Code:
else
doPlayerSendCancel(cid,"You must complete the appropriate quest to receive Buff.")
doSendMagicEffect(frompos, CONST_ME_POFF)
end
This is my script:
Code:
local itemTables = {
[7559] = {buff = 'Test', szukanyZamienicNaId = 7560, storage = 15423, ile = 1}
}
function onUse(cid, item, frompos, item2, topos)
local skillBag = isPlayer(cid) and getPlayerSlotItem(cid,CONST_SLOT_NECKLACE).uid or 0
if skillBag == 0 or not isPlayer(cid) then
return false
end
for itemId, itemTable in pairs(itemTables) do
for i = 0, getContainerSize(skillBag) - 1 do
local skillItem = getContainerItem(skillBag, i)
if skillItem.itemid == itemId and getPlayerStorageValue(cid, itemTable.storage) == itemTable.ile then
doRemoveItem(item.uid, 1)
doTransformItem(skillItem.uid, itemTable.szukanyZamienicNaId)
doPlayerSay(cid, "Congratulations! You received a new Buff[" ..itemTable.buff.. "]", TALKTYPE_ORANGE_1)
else
doPlayerSendCancel(cid,"You must complete the appropriate quest to receive Buff.")
doSendMagicEffect(frompos, CONST_ME_POFF)
end
end
end
return 1
end