Postado Janeiro 6, 2015 10 anos 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?
Postado Janeiro 6, 2015 10 anos 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.
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.