galera,na hora de abrir o ot... aparece isso
[13/12/2009 15:17:14] [Error - LuaScriptInterface::loadFile] data/actions/scripts/chest02.lua:3: 'end' expected (to close 'function' at line 1) near 'elseif'
[13/12/2009 15:17:14] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/chest02.lua)
Script aqui
function onUse(cid, item, frompos, item2, topos)
elseif item.uid == 1002 then
queststatus = getPlayerStorageValue(cid,1002)
if queststatus == -1 then
if getPlayerFreeCap(cid) >= 50.00 then
doPlayerSendTextMessage(cid,22,"You found a Backpack With Weapon Set.")
container = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(container, 8601, 1)
doAddContainerItem(container, 2383, 1)
doAddContainerItem(container, 2190, 1)
doAddContainerItem(container, 2456, 1)
doAddContainerItem(container, 2544, 1)
setPlayerStorageValue(cid,1002,1)
else
doPlayerSendTextMessage(cid,22,"You have found a Backpack With Weapon Set. Weighing 50.00 oz it is too heavy.")
end
else
doPlayerSendTextMessage(cid,22,"The chest is empty.")
end
return 0
end
return 1
end
Uq eu faço
ou este erro tb
09 15:17:14] [Error - LuaScriptInterface::loadFile] data/actions/scripts/leveldoor.lua:46: ')' expected near 'passar'
[13/12/2009 15:17:14] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/leveldoor.lua)
function onUse(cid, item, frompos, item2, topos)
if getPlayerLevel(cid) >= item.actionid - 1000 then
doTransformItem(item.uid, item.itemid + 1)
playerpos = getPlayerPosition(cid)
doorpos = {x = frompos.x, y = frompos.y, z = frompos.z, stackpos = 253}
if playerpos.y == doorpos.y + 1 and playerpos.x == doorpos.x then
doMoveCreature(cid, 0)
elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y then
doMoveCreature(cid, 1)
elseif playerpos.y == doorpos.y - 1 and playerpos.x == doorpos.x then
doMoveCreature(cid, 2)
elseif playerpos.y == doorpos.y and playerpos.x == doorpos.x + 1 then
doMoveCreature(cid, 3)
elseif playerpos.x == doorpos.x + 1 and playerpos.y == doorpos.y - 1 then
doMoveCreature(cid, 4)
elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y - 1 then
doMoveCreature(cid, 5)
elseif playerpos.x == doorpos.x + 1 and playerpos.y == doorpos.y + 1 then
doMoveCreature(cid, 6)
elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y + 1 then
doMoveCreature(cid, 7)
end
else
doPlayerSendTextMessage(cid, 22, "Você precisa estar no level"..(item.actionid - 1000)..para passar nesta porta" .")
end
return 1
end