Ir para conteúdo

Featured Replies

  • Respostas 8
  • Visualizações 1.3k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • function onAttack(cid, target) if(not isCreature(cid)) then return false end if not isSummon(target) and not isMonster (target) and (isPlayer (target)) then if getCreatureSummons(target) ~= 0 then do

  • function onAttack(cid, target) if not isCreature(cid) then return false end if isPlayer(target) then if #getCreatureSummons(target) >= 1 then doMonsterSetTarget(cid, ge

Postado
function onAttack(cid, target)
if(not isCreature(cid)) then
return false
end

if not isSummon(target) and not isMonster (target) and (isPlayer (target)) then
if getCreatureSummons(target) ~= 0 then
doMonsterSetTarget(cid, getCreatureSummons(target)[1])
end
end
return true
end

PS: use onCombat ao invés de onAttack porque daí se o monstro usar uma magia em área vai te acertar. 

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

Amigo o Erro continua, Quando o Monstro atk o Player da o Mesmo Erro:

 

[27/05/2014 10:58:00] [Error - CreatureScript Interface] 
[27/05/2014 10:58:00] data/creaturescripts/scripts/atk.lua:onCombat
[27/05/2014 10:58:00] Description: 
[27/05/2014 10:58:00] (luaDoMonsterSetTarget) Creature not found

 

 

Postado
function onAttack(cid, target)

   if not isCreature(cid) then
   return false
   end

   if isPlayer(target) then
      if #getCreatureSummons(target) >= 1 then
         doMonsterSetTarget(cid, getCreatureSummons(target)[1])
      end
   end

return true
end

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