Kippetjee
Member
Hello I have a error in my pick
Some one know the problem??
Using 0.4 dev
Some one know the problem??
Using 0.4 dev
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(itemEx.uid <= 65535 or itemEx.actionid ~= 0) and (itemEx.itemid == 354 or itemEx.itemid == 355) then
doTransformItem(itemEx.uid, 392)
doDecayItem(itemEx.uid)
elseif itemEx.uid == 53118 and itemEx.itemid == 6299 then
doTeleportThing(cid, newPosition)
doSendMagicEffect({x=32566, y=31338, z=10}, CONST_ME_TELEPORT)
doSendMagicEffect({x=32566, y=31338, z=10}, CONST_ME_POFF)
elseif toPosition.x == 32551 and toPosition.y == 31379 and toPosition.z == 15 and 99 < getPlayerLevel(cid) then
local a, b = getTileItemById({x=32551, y=31379, z=15}, 1304).uid, getTileItemById({x=32551, y=31379, z=15}, 9341).uid
if a ~= 0 and b ~= 0 then
doRemoveItem(a)
doRemoveItem(b)
for x = 32550, 32551 do
for y = 31373, 31379 do
if x == 32551 and 31373 < y then
doSendMagicEffect({x=x, y=y, z=15}, CONST_ME_POFF)
end
doCreateItem(5815, 1, {x=32560, y=31404, z=15})
end
end
doItemSetAttribute(doCreateItem(1387, 1, {x=32551, y=31376, z=15}), 'aid', 60126)
else
return false
end
elseif itemEx.itemid == 7200 then
doTransformItem(itemEx.uid, 7236)
doSendMagicEffect(toPosition, CONST_ME_BLOCKHIT)
elseif itemEx.uid == 3623 and getCreatureStorage(cid,42324) == 2 then
doTeleportThing(cid, {x=33356, y=31180, z=8})
doSendMagicEffect({x=33356, y=31180, z=8}, CONST_ME_POFF)
elseif itemEx.itemid == 12257 and getCreatureStorage(cid,42826) == 1 then
doPlayerAddItem(cid,12256,1)
setPlayerStorageValue(cid, 42826, 1)
doCreatureSay(cid, 'The cracked part of the table lets you cut out a large chunk of wood with your pick.', TALKTYPE_ORANGE_1)
elseif itemEx.uid == 3623 and getCreatureStorage(cid, 42324) >= 2 then
doTeleportThing(cid, {x=33356, y=31180, z=8})
doSendMagicEffect({x=33356, y=31180, z=8}, CONST_ME_POFF)
elseif itemEx.uid == 3633 and getCreatureStorage(cid, 42324) >= 3 then
doTeleportThing(cid, {x=33223, y=31100, z=8})
doSendMagicEffect({x=33223, y=31100, z=8}, CONST_ME_POFF)
else
return false
end
return true
end