niguem?
Resolvi o problema, agora o script ta assim:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 20000 then
if item.itemid == 9825 then
item1pos = {x=253, y=47, z=2, stackpos=255}
item1 = getThingfromPos(item1pos)
item2pos = {x=255, y=46, z=2, stackpos=255}
item2 = getThingfromPos(item2pos)
item3pos = {x=257, y=47, z=2, stackpos=255}
item3 = getThingfromPos(item3pos)
altarpos = {x=255, y=51, z=2, stackpos=255}
playerlevel = getPlayerLevel(cid)
questlevel = 100
if playerlevel >= questlevel then
queststatus1 = getPlayerStorageValue(cid.uid,20000)
if queststatus1 == -1 then
if item1.itemid == 2810 then
if item2.itemid == 2322 then
if item3.itemid == 7184 then
doRemoveItem(item1.uid,1)
doSendMagicEffect(item1pos,13)
doRemoveItem(item2.uid,1)
doSendMagicEffect(item2pos,13)
doRemoveItem(item3.uid,1)
doSendMagicEffect(item3pos,13)
setPlayerStorageValue(cid, 20000, 1)
doCreateItem(8868, 1, altarpos)
else
doPlayerSendCancel(cid,"Wrong Item.")
end
else
doPlayerSendCancel(cid,"Wrong Item.")
end
else
doPlayerSendCancel(cid,"Wrong Item.")
end
else
doPlayerSendCancel(cid,"You can't do this quest 2 times.")
end
else
doPlayerSendCancel(cid,"You need level 100 to do this quest.")
end
elseif item.itemid == 9826 then
acess = getPlayerAccess(cid)
if acess >= 3 then
doTransformItem(item.uid,item.itemid-1)
end
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
end
return 1
end
E carrega normal os scripts (relaod actions ok tbm)
mas quando alguem usa a alavanca da isso = [23/12/2009 17:06:18] data/actions/scripts/questsacrificio.lua:26: attempt to index local 'cid' (a number value)
[23/12/2009 17:06:18] stack traceback:
[23/12/2009 17:06:18] data/actions/scripts/questsacrificio.lua:26: in function <data/actions/scripts/questsacrificio.lua:1>
qual é o problema no cid
Problema na primeira linha. Da o mesmo erro tirando o cid, mas dai com o item, depois com o frompos e etc....
function onUse(cid, item, frompos, item2, topos)