Ir para conteúdo

Featured Replies

Postado

Esse aqui iria só anular os danos(seja de ataque normal ou de magias) entre pessoas da mesma party.

 

function onStatsChange(cid, attacker, type, combat, value)
if type == STATSCHANGE_HEALTHLOSS then
if isPlayer(cid) and isPlayer(attacker) and isInParty(cid) and isInParty(attacker) and getPlayerParty(cid) == getPlayerParty(attacker) then
return false
end
end


return true
end

Até onde sei não tem como identificar se o dano que está a acontecer é proveniente de uma spell ou ataque básico. Teria que fazer uns arranjos de storage em Oncast, mas que não seria 100% funcional.

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



 tumblr_mwfeg45FIV1qk4cb3o4_500.gif

  • Respostas 13
  • Visualizações 687
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Certo, tente desse modo: function onCombat(cid, target)     if isPlayer(target) and isInParty(cid) and isInParty(target) then         if getPlayerParty(target) == getPlayerParty(cid) or getPartyLeade

Postado

Dá pra simplificar com um creature event combat, caso prefira:

function onCombat(cid, target)
    if isPlayer(target) and isInParty(cid) and isInParty(target) and getPlayerParty(target) == getPlayerParty(cid) then return false end
    
    return true
end

The corrupt fear us.

The honest support us.

The heroic join us.

Postado
  • Solução

Apenas os membros da party (os que não são líder) não se atingem.
Mas o líder pode atacar qualquer um.

Certo, tente desse modo:
function onCombat(cid, target)
    if isPlayer(target) and isInParty(cid) and isInParty(target) then
        if getPlayerParty(target) == getPlayerParty(cid) or getPartyLeader(target) == cid then return false end
    end
    
    return true
end

The corrupt fear us.

The honest support us.

The heroic join us.

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.7k

Informação Importante

Confirmação de Termo