Ir para conteúdo

Pq Alavanca Buga?


george100

Posts Recomendados

eu fiz uma quest tpw anihi que o player vai com team de 4 e é teleportado.

Da tudo certo exceto a alavanca que ta assim:

 

os players usam ela desse jeito _\_ dps fika assim _/_ e os players nao conseguem meche ela... soh com a ajuda de um GM mesmo

...

Porque isso

 

meu script é esse:

 

-- castle lever

 

function onUse(cid, item, frompos, item2, topos)

 

if item.uid == 7005 and item.itemid == 1945 then

player1pos = {x=128, y=142, z=5, stackpos=253}

player1 = getThingfromPos(player1pos)

 

player2pos = {x=130, y=142, z=5, stackpos=253}

player2 = getThingfromPos(player2pos)

 

player3pos = {x=128, y=144, z=5, stackpos=253}

player3 = getThingfromPos(player3pos)

 

player4pos = {x=130, y=144, z=5, stackpos=253}

player4 = getThingfromPos(player4pos)

 

 

if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then

queststatus1 = getPlayerStorageValue(player1.uid,7005)

queststatus2 = getPlayerStorageValue(player2.uid,7005)

queststatus3 = getPlayerStorageValue(player3.uid,7005)

queststatus4 = getPlayerStorageValue(player4.uid,7005)

 

if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then

nplayer1pos = {x=214, y=148, z=10}

nplayer2pos = {x=213, y=148, z=10}

nplayer3pos = {x=212, y=148, z=10}

nplayer4pos = {x=211, y=148, z=10}

 

doSendMagicEffect(player1pos,2)

doSendMagicEffect(player2pos,2)

doSendMagicEffect(player3pos,2)

doSendMagicEffect(player4pos,2)

 

doTeleportThing(player1.uid,nplayer1pos)

doTeleportThing(player2.uid,nplayer2pos)

doTeleportThing(player3.uid,nplayer3pos)

doTeleportThing(player4.uid,nplayer4pos)

 

doSendMagicEffect(nplayer1pos,10)

doSendMagicEffect(nplayer2pos,10)

doSendMagicEffect(nplayer3pos,10)

doSendMagicEffect(nplayer4pos,10)

 

doTransformItem(item.uid,item.itemid+1)

else

doPlayerSendCancel(cid,"Somebody in your team has already done this quest.")

end

else

doPlayerSendCancel(cid,"You need four players for this quest.")

end

 

elseif item.uid ==7004 and item.itemid == 1946 then

if getPlayerAccess(cid) > 0 then

doTransformItem(item.uid,item.itemid-1)

else

doPlayerSendCancel(cid,"Sorry, not possible.")

end

else

return 0

end

 

return 1

end

 

Tem algum erro?

Obrigado.[/b]

Link para o comentário
Compartilhar em outros sites

Arrumei o script para vc:

 

-- castle lever

function onUse(cid, item, frompos, item2, topos)

if item.uid == 7005 and item.itemid == 1945 then
player1pos = {x=128, y=142, z=5, stackpos=253}
player1 = getThingfromPos(player1pos)

player2pos = {x=130, y=142, z=5, stackpos=253}
player2 = getThingfromPos(player2pos)

player3pos = {x=128, y=144, z=5, stackpos=253}
player3 = getThingfromPos(player3pos)

player4pos = {x=130, y=144, z=5, stackpos=253}
player4 = getThingfromPos(player4pos)


if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then
queststatus1 = getPlayerStorageValue(player1.uid,7005)
queststatus2 = getPlayerStorageValue(player2.uid,7005)
queststatus3 = getPlayerStorageValue(player3.uid,7005)
queststatus4 = getPlayerStorageValue(player4.uid,7005)

if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then
nplayer1pos = {x=214, y=148, z=10}
nplayer2pos = {x=213, y=148, z=10}
nplayer3pos = {x=212, y=148, z=10}
nplayer4pos = {x=211, y=148, z=10}

doSendMagicEffect(player1pos,2)
doSendMagicEffect(player2pos,2)
doSendMagicEffect(player3pos,2)
doSendMagicEffect(player4pos,2)

doTeleportThing(player1.uid,nplayer1pos)
doTeleportThing(player2.uid,nplayer2pos)
doTeleportThing(player3.uid,nplayer3pos)
doTeleportThing(player4.uid,nplayer4pos)

doSendMagicEffect(nplayer1pos,10)
doSendMagicEffect(nplayer2pos,10)
doSendMagicEffect(nplayer3pos,10)
doSendMagicEffect(nplayer4pos,10)

doTransformItem(item.uid,item.itemid+1)
else
doPlayerSendCancel(cid,"Somebody in your team has already done this quest.")
end
else
doPlayerSendCancel(cid,"You need four players for this quest.")
end

elseif item.uid ==7004 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

 

Espero ter ajudado,

Snowz.

Link para o comentário
Compartilhar em outros sites

if item.uid == 7005 and item.itemid == 1945 then
elseif item.uid ==7004 and item.itemid == 1946 then

2 unique IDs pra um item só não rola. Se não for isso, repare que o == está colado no 7004 (==7004), quando deveria estar separado.

Link para o comentário
Compartilhar em outros sites

Ae consegui

 

Muito obrigado mesmo a todos que me ajudaram!

 

eu coloquei isso no final

 

elseif item.uid == 7005 and item.itemid == 1946 then

doTransformItem(item.uid,item.itemid-1)

doPlayerSendCancel(cid,"Sorry, not possible.")

return 0

end

 

return 1

end

 

 

 

 

Ja pode fechar o topico

Editado por Critico
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...