Postado Fevereiro 10, 2013 12 anos Autor Vá em Data>CreatureEvents>Scripts crie uma pasta.lua chamada hearts.lua e coloque isso: function onDeath(cid, corpse, lastHitKiller, mostDamageKiller) local cidpos = getPlayerPosition(lastHitKiller) loot = 5943 item = doPlayerAddItem(lastHitKiller,loot,1) if(isPlayer(lastHitKiller) == TRUE) then hitKillerName = getPlayerName(lastHitKiller) doSetItemSpecialDescription(item,"This is the heart of "..getPlayerName(cid).." killed at Level "..getPlayerLevel(cid).." by "..hitKillerName..".") doPlayerSendTextMessage(lastHitKiller, MESSAGE_STATUS_CONSOLE_ORANGE, "You Killed " .. getCreatureName(cid) .. ".") doSendMagicEffect(cidpos,12) else hitKillerName = getCreatureName(lastHitKiller) doSetItemSpecialDescription(item,"This is the heart of "..getPlayerName(cid).." killed at Level "..getPlayerLevel(cid).." by a "..hitKillerName..".") end setItemName(item, ""..getPlayerName(cid).."\'s Heart") return TRUE end Agora vá em Data>CreatureScripts.xml e Adicione esta Tag la: <event type="death" name="Reward" event="script" value="hearts.lua"/> Assim Tu mata um Player e tu Vai Ganhar um Item Morgaroth Heart, So que com o outro name assim!! Mano já tinha testado esse não funfa tambem \: o problema eh q da os erros na distro e o player morre e some tá ligado ? como c fosse area pvp ! Bom amigo, voce vem pedindo esse script na minha fábrica, tive um tempinho para fazer ele : Teste esse aqui. -> -- Script by: OrochiElf -- function onKill(cid, target, lastHit) local heart = 2160 local add = doPlayerAddItem(lastHit, heart) if isPlayer(target) then doSetItemAttribute(add, "description","The heart is of "..getCreatureName(target).."") end return true end Ondeath not found '-' Ps: Creio q o erro não e na distro pqê testei em outras 2 '-' Mesmo erro .. Procuro Equipe para projeto sério com remuneração, maior necessidade Programador em C\C++.
Postado Fevereiro 10, 2013 12 anos Subistitua o Primeiro Por function onDeath(cid, corpse, deathList) if isPlayer(cid) and isPlayer(deathList[1]) then doSetItemSpecialDescription(doPlayerAddItem(deathList[1],5943, 1),"This is the heart of "..getPlayerName(cid).." killed at Level "..getPlayerLevel(cid).." by "..getPlayerName(deathList[1])..".") doPlayerSendTextMessage(deathList[1], MESSAGE_STATUS_CONSOLE_ORANGE, "You Killed " .. getCreatureName(cid) .. ".") doSendMagicEffect(getPlayerPosition(deathList[1]), 12) end return true end Contato : under12451 (Skype) Meus Tutoriais O Que é DDoS ? como se Proteger Por Tony Criando Servidor Poketibia Sistemas de Vips com [VIP] No Nome Cyclops - Mistrock - 100% AFK Como Editar um NPC 8.6 [ Itens e Preços] Editando Swords 8.6 Como Editar um NPC 8.6 [VENDA]
Postado Fevereiro 10, 2013 12 anos Autor Subistitua o Primeiro Por function onDeath(cid, corpse, deathList) if isPlayer(cid) and isPlayer(deathList[1]) then doSetItemSpecialDescription(doPlayerAddItem(deathList[1],5943, 1),"This is the heart of "..getPlayerName(cid).." killed at Level "..getPlayerLevel(cid).." by "..getPlayerName(deathList[1])..".") doPlayerSendTextMessage(deathList[1], MESSAGE_STATUS_CONSOLE_ORANGE, "You Killed " .. getCreatureName(cid) .. ".") doSendMagicEffect(getPlayerPosition(deathList[1]), 12) end return true end [17:28:10.950] [Error - CreatureScript Interface] [17:28:10.993] data/creaturescripts/scripts/coracao.lua:onDeath [17:28:10.993] Description: [17:28:10.994] data/creaturescripts/scripts/coracao.lua:3: attempt to call globa l 'doSetItemSpecialDescription' (a nil value) [17:28:11.075] stack traceback: [17:28:11.076] data/creaturescripts/scripts/coracao.lua:3: in function <data/cr eaturescripts/scripts/coracao.lua:1> Deu isso ae mais foi uma evolução já q esse pelo menos deu um Morga Hearth kk mano to quase acreditando q seja na distro mesmo por esse valor nulo ai e nem um script funcionar O= Procuro Equipe para projeto sério com remuneração, maior necessidade Programador em C\C++.
Postado Fevereiro 10, 2013 12 anos [17:28:10.950] [Error - CreatureScript Interface] [17:28:10.993] data/creaturescripts/scripts/coracao.lua:onDeath [17:28:10.993] Description: [17:28:10.994] data/creaturescripts/scripts/coracao.lua:3: attempt to call globa l 'doSetItemSpecialDescription' (a nil value) [17:28:11.075] stack traceback: [17:28:11.076] data/creaturescripts/scripts/coracao.lua:3: in function <data/cr eaturescripts/scripts/coracao.lua:1> Deu isso ae mais foi uma evolução já q esse pelo menos deu um Morga Hearth kk mano to quase acreditando q seja na distro mesmo por esse valor nulo ai e nem um script funcionar O= Se alguem resolver ai leva meu rep tbm, tbm quero e se descobrir o que é me passa leva meu rep Editado Fevereiro 10, 2013 12 anos por tiagoduuarte (veja o histórico de edições)
Postado Fevereiro 10, 2013 12 anos /coracao.lua: Subistitua por : hearts.lua Contato : under12451 (Skype) Meus Tutoriais O Que é DDoS ? como se Proteger Por Tony Criando Servidor Poketibia Sistemas de Vips com [VIP] No Nome Cyclops - Mistrock - 100% AFK Como Editar um NPC 8.6 [ Itens e Preços] Editando Swords 8.6 Como Editar um NPC 8.6 [VENDA]
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.