Postado Maio 1, 2020 5 anos Boas Tibia king Alguem me pode ajudar com o script listado? Gostaria de colocar outra posicao para o player digitar o comando !magic tem essa posicao aqui: if getCreaturePosition(cid).x ~= 841 or getCreaturePosition(cid).y ~= 1438 or getCreaturePosition(cid).z ~= 9 then como coloco outra posicao no mesmo script? posicao: x=842 y=1438 z=9 que eu quero colocar Obrigado! Citar Você tem o código disponível? Se tiver publique-o aqui: function onSay(cid, words, param, channel) if getCreaturePosition(cid).x ~= 841 or getCreaturePosition(cid).y ~= 1438 or getCreaturePosition(cid).z ~= 9 then doPlayerSendTextMessage(cid,25,"You need to step in to digit this comand") doSendMagicEffect(getCreaturePosition(cid),2) return true end if isPlayer(cid) then doSendMagicEffect(getCreaturePosition(cid),2) doTeleportThing(cid,{x=841,y=1435,z=9}) doSendMagicEffect(getCreaturePosition(cid),10) doPlayerSendTextMessage(cid,25,"You have found the secret word") return true end end Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
Postado Maio 1, 2020 5 anos Solução @bellatrikz Boa Tarde, segue o script: local positions = { -- Aqui você coloca todas as posições que você quer que o player esteja para ser teleportado {x=841,y=1438,z=9}, {x=842,y=1438,z=9}, } function onSay(cid, words, param) for i=1, #positions do local player_pos = getCreaturePosition(cid) if (player_pos.x == positions[i].x and player_pos.y == positions[i].y and player_pos.z == positions[i].z) then if isPlayer(cid) then doTeleportThing(cid,{x=841,y=1435,z=9}) doSendMagicEffect(player_pos,10) doPlayerSendTextMessage(cid,25,"You have found the secret word") return true end end end doPlayerSendTextMessage(cid,25,"You need to step in to digit this comand") doSendMagicEffect(getCreaturePosition(cid),2) return true end Editado Maio 1, 2020 5 anos por MatteusDeli (veja o histórico de edições)
Postado Maio 1, 2020 5 anos Autor 1 hora atrás, MatteusDeli disse: @bellatrikz Boa Tarde, segue o script: local positions = { -- Aqui você coloca todas as posições que você quer que o player esteja para ser teleportado {x=841,y=1438,z=9}, {x=842,y=1438,z=9}, } function onSay(cid, words, param) for i=1, #positions do local player_pos = getCreaturePosition(cid) if (player_pos.x == positions[i].x and player_pos.y == positions[i].y and player_pos.z == positions[i].z) then if isPlayer(cid) then doTeleportThing(cid,{x=841,y=1435,z=9}) doSendMagicEffect(player_pos,10) doPlayerSendTextMessage(cid,25,"You have found the secret word") return true end end end doPlayerSendTextMessage(cid,25,"You need to step in to digit this comand") doSendMagicEffect(getCreaturePosition(cid),2) return true end Mais uma vez obrigado MatteusDeli pela ajuda vlw
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.