Ir para conteúdo

Porta Para Knights E Elite Knights, Paladin E Royal Paladin


Posts Recomendados

ta ae kra ...

 


function onUse(cid, item, frompos, item2, topos)
reqvoc = getPlayerVocation(cid)
if item.uid == 8200 then
if reqvoc == 3 or reqvoc == 7 then
pos = getPlayerPosition(cid)

if pos.x == topos.x then
if pos.y < topos.y then
pos.y = topos.y + 1
else
pos.y = topos.y - 1
end
elseif pos.y == topos.y then
if pos.x < topos.x then
pos.x = topos.x + 1
else
pos.x = topos.x - 1
end
else
doPlayerSendTextMessage(cid,22,'Stand in front of the door.')
return 1
end

doTeleportThing(cid,pos)
doSendMagicEffect(topos,12)
else
doPlayerSendTextMessage(cid,22,'Somente Paladins e Royal Paladins entram aqui.')
end
return 1
else
return 0
end
end

 

 


function onUse(cid, item, frompos, item2, topos)
reqvoc = getPlayerVocation(cid)
if item.uid == 8203 then
if reqvoc == 4 or reqvoc == 8 then
pos = getPlayerPosition(cid)

if pos.x == topos.x then
if pos.y < topos.y then
pos.y = topos.y + 1
else
pos.y = topos.y - 1
end
elseif pos.y == topos.y then
if pos.x < topos.x then
pos.x = topos.x + 1
else
pos.x = topos.x - 1
end
else
doPlayerSendTextMessage(cid,22,'Stand in front of the door.')
return 1
end

doTeleportThing(cid,pos)
doSendMagicEffect(topos,12)
else
doPlayerSendTextMessage(cid,22,'Somente Knights e Elite Knights entram aqui.')
end
return 1
else
return 0
end
end

 

vê se funciona , ja modifiquei testa, eu n pude testa esse script , mas qualquer dúvida manda pm..

Editado por Khost

hummm...

 

function onUse(cid, item, fromPosition, itemEx, toPosition)

voc = getPlayerVocation(cid)

if(voc == 3 or voc == 4 or voc == 7 or voc == 8) then

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

doTeleportThing(cid, toPosition, TRUE)

else

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "voce nao pode passar.")

end

 

return TRUE

end

basicamente nao mas caso a pessoa nao esteja em frente a porta ele da erro e pedi pra pessoa ficar de frente com ela ja o meu script ele pode estar na diagonal que sera puxado pra a pos da porta.

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...