Ir para conteúdo

Featured Replies

Postado
  • Autor

tenta me explicar oque a magia faz sem tentar me ensinar como fazer ela... em outras palavras, me diz oque vc quer que a magia do shield faça. A area é feita de uma vez só ou é por event?

 

Somente quando clicar no shield, será lançada uma magia com aquela posição. Pode ser por event ou por uma vez só.

Oi

  • Respostas 9
  • Visualizações 372
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • vai em actions e cria um arquivo qualquer e coloca isso nele: local arr = { {0, 1, 1, 1, 0}, {1, 1, 1, 1, 1}, {1, 1, 2, 1, 1}, {1, 1, 1, 1, 1}, {0, 1, 1, 1, 0} } local area = createCombatArea(arr)

  • local up = { {0, 1, 1, 1, 0}, {0, 0, 1, 0, 0}, {0, 0, 2, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}          }  local area1 = createCombatArea(up) local down = { {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0,

Postado

vai em actions e cria um arquivo qualquer e coloca isso nele:

local arr = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0}
}


local area = createCombatArea(arr)
local tempo = 1
local storage = 19481


function onUse(cid, item, frompos, item2, topos)
if getPlayerSlotItem(cid, 5).itemid == item.itemid or getPlayerSlotItem(cid, 6).itemid == item.itemid then
if not exhaustion.get(cid, storage) then
doAreaCombatHealth(cid, 1, getThingPos(cid), area, -(getPlayerLevel(cid) * 2 / 3), -(getPlayerLevel(cid) * 4 / 3), 15)
exhaustion.set(cid, storage, tempo)
else
doPlayerSendCancel(cid, "You are exhausted.")
end
end
return true
end

depois vai em actions.xml e coloca: 

<action itemid="7460" script="flamethrower.lua"/>

Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá!

"Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

Postado
  • Autor

 

vai em actions e cria um arquivo qualquer e coloca isso nele:

local arr = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0}
}


local area = createCombatArea(arr)
local tempo = 1
local storage = 19481


function onUse(cid, item, frompos, item2, topos)
if getPlayerSlotItem(cid, 5).itemid == item.itemid or getPlayerSlotItem(cid, 6).itemid == item.itemid then
if not exhaustion.get(cid, storage) then
doAreaCombatHealth(cid, 1, getThingPos(cid), area, -(getPlayerLevel(cid) * 2 / 3), -(getPlayerLevel(cid) * 4 / 3), 15)
exhaustion.set(cid, storage, tempo)
else
doPlayerSendCancel(cid, "You are exhausted.")
end
end
return true
end

depois vai em actions.xml e coloca: 

<action itemid="7460" script="flamethrower.lua"/>

 

Pelo que vi cara, o script ao clicar no shield lança uma magia em área em volta do player, não é bem assim que seria, se o player estivesse virado pra direita lançaria uma rajada para a direita, se o player estivesse para a esquerda lançaria uma rajada para a esquerda e assim por diante, não seria uma área como o do seu script, seria assim:

Cima:

{0, 1, 1, 1, 0},

{0, 0, 1, 0, 0},

{0, 0, 2, 0, 0},

{0, 0, 0, 0, 0},

{0, 0, 0, 0, 0}         

}

 

baixo:

{0, 0, 0, 0, 0},

{0, 0, 0, 0, 0},

{0, 0, 2, 0, 0},

{0, 0, 1, 0, 0},

{0, 1, 1, 1, 0}

}

 

esquerda:

{0, 0, 0, 0, 0},

{1, 0, 0, 0, 0},

{1, 1, 2, 0, 0},

{1, 0, 0, 0, 0},

{0, 0, 0, 0, 0}

}

 

direita:

{0, 0, 0, 0, 0},

{0, 0, 0, 0, 1},

{0, 0, 2, 1, 1},

{0, 0, 0, 0, 1},

{0, 0, 0, 0, 0}

}

Oi

Postado
  • Solução
                   {1, 1, 1, 1, 1, 1, 1},  e assim por diante, em todas as direções

                   {0, 0, 1, 1, 1, 1, 1},  seguindo esse exemplo.

                   {0, 0, 0, 2, 1, 1, 1},

                   {0, 0, 1, 1, 1, 1, 1},

                   {1, 1, 1, 1, 1, 1, 1},

 

 

local up = {
{0, 1, 1, 1, 0},
{0, 0, 1, 0, 0},
{0, 0, 2, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0}         
}


 local area1 = createCombatArea(up)


local down = {
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 2, 0, 0},
{0, 0, 1, 0, 0},
{0, 1, 1, 1, 0}
}


 local area2 = createCombatArea(down)


local left = {
{0, 0, 0, 0, 0},
{1, 0, 0, 0, 0},
{1, 1, 2, 0, 0},
{1, 0, 0, 0, 0},
{0, 0, 0, 0, 0}
}


 local area3 = createCombatArea(left)


local right = {
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 1},
{0, 0, 2, 1, 1},
{0, 0, 0, 0, 1},
{0, 0, 0, 0, 0}
}


local area4 = createCombatArea(right)




local tempo = 1
local storage = 19481


function onUse(cid, item, frompos, item2, topos)
if getPlayerSlotItem(cid, 5).itemid == item.itemid or getPlayerSlotItem(cid, 6).itemid == item.itemid then
if not exhaustion.get(cid, storage) then
exhaustion.set(cid, storage, tempo)
if getPlayerLookDirection(cid) == 0 then
doAreaCombatHealth(cid, 1, getThingPos(cid), area2, -(getPlayerLevel(cid) * 2 / 3), -(getPlayerLevel(cid) * 4 / 3), 15)
elseif getPlayerLookDirection(cid) == 1 then
doAreaCombatHealth(cid, 1, getThingPos(cid), area3, -(getPlayerLevel(cid) * 2 / 3), -(getPlayerLevel(cid) * 4 / 3), 15)
elseif getPlayerLookDirection(cid) == 2 then
doAreaCombatHealth(cid, 1, getThingPos(cid), area1, -(getPlayerLevel(cid) * 2 / 3), -(getPlayerLevel(cid) * 4 / 3), 15)
elseif getPlayerLookDirection(cid) == 3 then
doAreaCombatHealth(cid, 1, getThingPos(cid), area4, -(getPlayerLevel(cid) * 2 / 3), -(getPlayerLevel(cid) * 4 / 3), 15)
end
else
doPlayerSendCancel(cid, "You are exhausted.")
end
end
return true
end

a unica coisa ruim do meu trabalho é que as pessoas pedem uma coisa pensando em outra e depois reclamam que oque eu fiz tá errado --'.  Nos próximos pedidos seja extremamente detalista noque vc quer se não eu não vou ajudar.

Editado por xWhiteWolf (veja o histórico de edições)

Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá!

"Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

Postado
  • Autor

 

local up = {
{0, 1, 1, 1, 0},
{0, 0, 1, 0, 0},
{0, 0, 2, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0}         
}


 local area1 = createCombatArea(up)


local down = {
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 2, 0, 0},
{0, 0, 1, 0, 0},
{0, 1, 1, 1, 0}
}


 local area2 = createCombatArea(down)


local left = {
{0, 0, 0, 0, 0},
{1, 0, 0, 0, 0},
{1, 1, 2, 0, 0},
{1, 0, 0, 0, 0},
{0, 0, 0, 0, 0}
}


 local area3 = createCombatArea(left)


local right = {
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 1},
{0, 0, 2, 1, 1},
{0, 0, 0, 0, 1},
{0, 0, 0, 0, 0}
}


local area4 = createCombatArea(right)




local tempo = 1
local storage = 19481


function onUse(cid, item, frompos, item2, topos)
if getPlayerSlotItem(cid, 5).itemid == item.itemid or getPlayerSlotItem(cid, 6).itemid == item.itemid then
if not exhaustion.get(cid, storage) then
exhaustion.set(cid, storage, tempo)
if getPlayerLookDirection(cid) == 0 then
doAreaCombatHealth(cid, 1, getThingPos(cid), area2, -(getPlayerLevel(cid) * 2 / 3), -(getPlayerLevel(cid) * 4 / 3), 15)
elseif getPlayerLookDirection(cid) == 1 then
doAreaCombatHealth(cid, 1, getThingPos(cid), area3, -(getPlayerLevel(cid) * 2 / 3), -(getPlayerLevel(cid) * 4 / 3), 15)
elseif getPlayerLookDirection(cid) == 2 then
doAreaCombatHealth(cid, 1, getThingPos(cid), area1, -(getPlayerLevel(cid) * 2 / 3), -(getPlayerLevel(cid) * 4 / 3), 15)
elseif getPlayerLookDirection(cid) == 3 then
doAreaCombatHealth(cid, 1, getThingPos(cid), area4, -(getPlayerLevel(cid) * 2 / 3), -(getPlayerLevel(cid) * 4 / 3), 15)
end
else
doPlayerSendCancel(cid, "You are exhausted.")
end
end
return true
end

a unica coisa ruim do meu trabalho é que as pessoas pedem uma coisa pensando em outra e depois reclamam que oque eu fiz tá errado --'.  Nos próximos pedidos seja extremamente detalista noque vc quer se não eu não vou ajudar.

 

 

Muito obrigado cara, irei testar, desculpe o incômodo!

Oi

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.8k

Informação Importante

Confirmação de Termo