Help Scripting
Erro console: luaTeleport: thing not found
LUA:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 8005 and item.itemid == 1945 then
player1pos = {x=1135, y=988, z=10, stackpos=253}
player1 = getThingfromPos(player1pos)
player2pos = {x=1134, y=989, z=10, stackpos=253}
player2 = getThingfromPos(player2pos)
player3pos = {x=1136, y=989, z=10, stackpos=253}
player3 = getThingfromPos(player3pos)
if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 then
nplayer1pos = {x=1135, y=970, z=10}
nplayer2pos = {x=1134, y=971, z=10}
nplayer3pos = {x=1136, y=971, z=10}
doTeleportThing(player1,nplayer1pos)
doTeleportThing(player2,nplayer2pos)
doTeleportThing(player3,nplayer3pos)
doSendMagicEffect(player1pos,2)
doSendMagicEffect(player2pos,2)
doSendMagicEffect(player3pos,2)
doSendMagicEffect(nplayer1pos,10)
doSendMagicEffect(nplayer2pos,10)
doSendMagicEffect(nplayer3pos,10)
doTransformItem(item.uid,item.itemid+1)
else
doPlayerSendCancel(cid,"You need three players four this quest.")
end
elseif item.uid == 8005 and item.itemid == 1946 then
if getPlayerAccess(cid,1) then
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
else
return 0
end
return 1
end
Erro console: luaTeleport: thing not found