I've fixed so my vials disapears after I used em, but now theres coming error in my consoule everytime I use vial.
doChangeTypeItem [Error]
Could anyone upload this quote without that error?
doChangeTypeItem [Error]
Could anyone upload this quote without that error?
local exhaust = createConditionObject(CONDITION_EXHAUSTED)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 1000)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if itemEx.itemid == 1 then
if item.type == 0 then
return 0
else
if itemEx.uid == cid then
if item.type == 7 then
doPlayerAddMana(cid, math.random(80, 160))
doRemoveItem(item.uid)
doSendMagicEffect(toPosition, 12)
doCreatureSay(cid, "Aaaah...", 1)
doAddCondition(cid, exhaust)
elseif item.type == 10 then
doPlayerAddHealth(cid, math.random(40, 80))
doRemoveItem(item.uid)
doSendMagicEffect(toPosition, 12)
doCreatureSay(cid, "Aaaah...", 1)
else
doCreatureSay(cid, "Gulp.", 1)
end
doChangeTypeItem(item.uid, 0)
else
doDecayItem(doCreateItem(2025, item.type, toPosition.x ~= 65535 and toPosition.x ~= 0 and toPosition.y ~= 0 and toPosition.z ~= 0 and toPosition or getPlayerPosition(cid)))
doChangeTypeItem(item.uid, 0)
end
end
elseif itemEx.itemid >= 490 and itemEx.itemid <= 517
or itemEx.itemid >= 618 and itemEx.itemid <= 629
or itemEx.itemid == 1368 or itemEx.itemid == 1369
or itemEx.itemid >= 4820 and itemEx.itemid <= 4825
or itemEx.itemid >= 4828 and itemEx.itemid <= 4831
or itemEx.itemid >= 4608 and itemEx.itemid <= 4666 then
doChangeTypeItem(item.uid, 1)
elseif itemEx.itemid == 103 then
doChangeTypeItem(item.uid, 19)
elseif itemEx.itemid >= 598 and itemEx.itemid < 601
or itemEx.itemid == 1509
or itemEx.itemid >= 518 and itemEx.itemid <= 529 then
doChangeTypeItem(item.uid, 26)
elseif itemEx.itemid >= 351 and itemEx.itemid <= 355 then
doChangeTypeItem(item.uid, 19)
elseif itemEx.itemid >= 602 and itemEx.itemid <= 605
or itemEx.itemid >= 4691 and itemEx.itemid <= 4755
or itemEx.itemid == 4758 then
doChangeTypeItem(item.uid, 28)
elseif itemEx.itemid == 1771 then
doChangeTypeItem(item.uid, 1)
elseif itemEx.itemid == 1772 then
doChangeTypeItem(item.uid, 3)
elseif itemEx.itemid == 1773 then
doChangeTypeItem(item.uid, 15)
elseif itemEx.itemid > 2806 and itemEx.itemid < 3132
or itemEx.itemid >= 4251 and itemEx.itemid <= 4327 then
doChangeTypeItem(item.uid, 2)
else
if item.type == 0 then
return 0
else
doDecayItem(doCreateItem(2025, item.type, toPosition.x ~= 65535 and toPosition.x ~= 0 and toPosition.y ~= 0 and toPosition.z ~= 0 and toPosition or getPlayerPosition(cid)))
doChangeTypeItem(item.uid, 0)
end
end
return 1
end