Postado Junho 9, 2022 3 anos Solução Fala meus brothers, gostaria de uma ajuda da comunidade. No meu servidor tenho o talkactions de transformações dos personagens, gostaria de conseguir alterar a position X.Y do effect que sai de cada player quando eles dizem ''' transformar''' Será que é possível isso ? alguém tem alguma ideia sobre isso ? alguém consegue me ajudar? Vou deixar o script apenas com 1 transformação para não ficar mt longo. local config = { --[vocation id] = { level, nova voc, looktype, efeito} -- Goku [1] = { 50, 2, 4, 118}, [2] = { 100, 3, 5, 114}, [3] = { 150, 4, 7, 114}, [4] = { 200, 5, 9, 467}, [6] = { 50, 7, 11, 490}, [7] = { 100, 8, 12, 490}, [8] = { 150, 9, 13, 490}, [9] = { 200, 10, 14, 125}, [10] = { 400, 11, 817, 628}, [11] = { 600, 12, 819, 662} } function onSay(cid, words, param, channel) local voc = config[getPlayerVocation(cid)] if voc then if getPlayerLevel(cid) >= voc[1] then doPlayerSetVocation(cid, voc[2]) doCreatureSay(cid, "Transformar", 19) local outfit = {lookType = voc[3]} doCreatureChangeOutfit(cid, outfit) doSendMagicEffect(getCreaturePosition(cid), voc[4]) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Voce precisa estar no level " .. voc[1] .. " para transformar.") end else doPlayerSendCancel(cid, "Nao é possível se transformar.") end return true end doCreatureSay(cid, "Transformar", 19) local outfit = {lookType = voc[3]} doCreatureChangeOutfit(cid, outfit) local position = {x=getCreaturePosition(cid).x+3, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z} doSendMagicEffect(position, 855) doSendMagicEffect(getCreaturePosition(cid), voc[4]) else @Vodkart da um bisu aqi maninho. ---------------------------------------------------------------------------------------------------------------------------- consegui alguma coisa já, adicionei essas funções \/. porém desse jeito fica só esse effect ''''doSendMagicEffect(position, 855)''' para todas as transform do jgoo. quero 1 effect para cada transformação e podendo alterar a position x/y delas. local position = {x=getCreaturePosition(cid).x+3, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z} doSendMagicEffect(position, 855) local config = { --[vocation id] = { level, nova voc, looktype, efeito, position x, y} -- Goku [1] = { 50, 2, 4, 118, x = -1, y = -1}, [2] = { 100, 3, 5, 114}, [3] = { 150, 4, 7, 114}, [4] = { 200, 5, 9, 467}, [6] = { 50, 7, 11, 490}, [7] = { 100, 8, 12, 490}, [8] = { 150, 9, 13, 490}, [9] = { 200, 10, 14, 125}, [10] = { 400, 11, 817, 628}, [11] = { 600, 12, 819, 662} } function onSay(cid, words, param, channel) local voc = config[getPlayerVocation(cid)] if voc then local level = getPlayerLevel(cid) if level >= voc[1] then doPlayerSetVocation(cid, voc[2]) doCreatureSay(cid, "Transformar", 19) local outfit = {lookType = voc[3]} doCreatureChangeOutfit(cid, outfit) local pos = getCreaturePosition(cid) local x = pos.x local y = pos.y local z = pos.z if voc.x then x = x + voc.x end if voc.y then y = y + voc.y end doSendMagicEffect({ x = x, y = y, z = z }, voc[4]) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Voce precisa estar no level " .. voc[1] .. " para transformar.") end else doPlayerSendCancel(cid, "Nao é possível se transformar.") end return true end Editado Junho 9, 2022 3 anos por daniel.braga989 (veja o histórico de edições)
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.