Postado Janeiro 5, 2015 10 anos 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 Janeiro 5, 2015 10 anos por Danves (veja o histórico de edições)
Postado Janeiro 5, 2015 10 anos 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 Janeiro 6, 2015 10 anos Autor #Danves, O seu não funcionou. #Suicide, Seu script deu mais ou menos certo. 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. Editado Janeiro 6, 2015 10 anos por Frenesy (veja o histórico de edições)
Postado Janeiro 7, 2015 10 anos 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.