Ir para conteúdo

Featured Replies

Postado

Tenho esse Script aqui que não permite que eu ataque meu próprio Summon:

 

function onTarget(cid, target)
if(attacker and isMonster(target) and isSummon(attacker) and (type == STATSCHANGE_HEALTHLOSS)) then
return false
end
return true
end


function onStatsChange(cid, attacker, type, combat, value)
if(attacker and isMonster(target) and isSummon(attacker) and (type == STATSCHANGE_HEALTHLOSS)) then
if combat ~= COMBAT_HEALING then
return false
end 
end
return true
end


function onCast(cid, target)
if(attacker and isMonster(target) and isSummon(attacker) and (type == STATSCHANGE_HEALTHLOSS)) then
if combat ~= COMBAT_HEALING then
return false
end 
end
return true
end

No entanto, acabei de perceber que esse script também não me deixa atacar summons de monstros.

Como resolver?

cms1-pr%C3%AAmio.png

Resolvido por Danves

Ir para solução
Postado
  • Solução
function onTarget(cid, target)
if isSummon(target) and isPlayer(cid) and getCreatureMaster(target) == cid then
return false
end
return true
end




function onStatsChange(cid, attacker, type, combat, value)
if type == STATSCHANGE_HEALTHLOSS and isSummon(cid) and isPlayer(attacker) and getCreatureMaster(cid) == attacker  then
return false
end
return true
end

Acredito que não precisa do Oncast, vendo que você não poderá targetar ele e nem tirar dano com AOE por causa do statschange.



 tumblr_mwfeg45FIV1qk4cb3o4_500.gif

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

Informação Importante

Confirmação de Termo