Ir para conteúdo

Featured Replies

Postado

@ADM Lucas OTBR Pronto :D agr vai funcionar testei aqui.

function onKill(cid, target)
	
	if isPlayer(cid) and isPlayer(target) == true then
		local heart = doPlayerAddItem(cid, 5943, 1)
		doItemSetAttribute(heart, "description", "Killed at " .. getPlayerLevel(target) .. " by " .. getPlayerName(cid) .. ".")	
    end
	return true
end

@zipter98 Depois de 30 minutos fazendo cagada aqui olhei um script e vi isso msm hahaha, só que percebi que essa função doSetItemSpecialDescription(uid, descri) fica adicionando item infinitamente ao player  :hum: 

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

EQD4Qy4.gif

  • Respostas 29
  • Visualizações 1.1k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • function onKill(cid, target) if isPlayer(cid) and isPlayer(target) then doSetItemSpecialDescription(doPlayerAddItem(cid, 5943, 1), "name", "" ..getPlayerName(target).. " Heart's")

  • doSetItemSpecialDescription só tem 2 parâmetros: uid e description E desse jeito adicionaria 2 items ao jogador. O correto seria criar uma variável com valor de doPlayerAddItem(cid, 5943, 1). Depois

  • @ADM Lucas OTBR Pronto agr vai funcionar testei aqui. function onKill(cid, target) if isPlayer(cid) and isPlayer(target) == true then local heart = doPlayerAddItem(cid, 5943, 1) doItemSetAtt

Postado
  • Autor

@ADM Lucas OTBR Pronto :D agr vai funcionar testei aqui.

function onKill(cid, target)
	
	if isPlayer(cid) and isPlayer(target) == true then
		local heart = doPlayerAddItem(cid, 5943, 1)
		doItemSetAttribute(heart, "description", "Killed at " .. getPlayerLevel(target) .. " by " .. getPlayerName(cid) .. ".")	
    end
	return true
end

@zipter98 Depois de 30 minutos fazendo cagada aqui olhei um script e vi isso msm hahaha, só que percebi que essa função doSetItemSpecialDescription(uid, descri) fica adicionando item infinitamente ao player  :hum: 

 

Summ a script funcionou perfeitamente, só uma dúvida.

 

 Será que tem como mudar o nome do item para o nome do player ? Tipo:

 

 Ao invés de :

18:27 You see the Morgaroth's heart.
It weighs 35.00 oz.
Killed at 8 by Tester.
 
 Ficaria:
 
18:27 You see the Funalo's heart.
It weighs 35.00 oz.
Killed at 8 by Tester.
Postado
  • Solução
function onKill(cid, target)
    if isPlayer(cid) and isPlayer(target) == true then
        local heart = doPlayerAddItem(cid, 5943, 1)
        doItemSetAttribute(heart, "description", "Killed at " .. getPlayerLevel(target) .. " by " .. getPlayerName(cid) .. ".") 
        doItemSetAttribute(heart, "name", "the "..getCreatureName(target).."'s heart")
    end
    return true
end

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

não respondo pms solicitando suporte em programação/scripting

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