Postado Janeiro 14, 2015 10 anos eu acho que apenas 1 script n vai fazer isso acho que ta meio incompleto Meus Trabalhos Tudo em Desenvolvimento mais att em breve Estou parado Tudo Removido
Postado Janeiro 14, 2015 10 anos Olá amigo, conheço um Sistema que está postado aqui no fórum, não sei se te interessa, porque ele te da o coração automaticamente. Pode verificar, e espero que goste! Data>CreatureScripts>scripts crie um arquivo .lua chamado hearts.lua e poe dentro: 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 Depois volta para creaturescripts.xml e adiciona a tag: <event type="death" name="Reward" event="script" value="hearts.lua"/> Crédito do script: TonyHalk xBlackWolf THX @Storm Night Best Avatar Ever
Postado Janeiro 14, 2015 10 anos Olá amigo, conheço um Sistema que está postado aqui no fórum, não sei se te interessa, porque ele te da o coração automaticamente. Pode verificar, e espero que goste! Data>CreatureScripts>scripts crie um arquivo .lua chamado hearts.lua e poe dentro: 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 Depois volta para creaturescripts.xml e adiciona a tag: <event type="death" name="Reward" event="script" value="hearts.lua"/> Crédito do script: TonyHalk Tem que ve o id do item pra ve se não tem nenhuma função no ot dele quando postar tutorias assim defina algumas coisas com 1 outra cor e explique como ele editar para ajudar ele e ganhar seu rep com mais facilidade Meus Trabalhos Tudo em Desenvolvimento mais att em breve Estou parado Tudo Removido
Postado Janeiro 14, 2015 10 anos Mas já levo em consideração que ele entende do ot dele né... E o item utilizado é o mesmo o script dele e.e Por isso não precisa mudar nada. xBlackWolf THX @Storm Night Best Avatar Ever
Postado Janeiro 14, 2015 10 anos function onKill(cid, target) local config = { Kname = getPlayerName(cid), Tname = getPlayerName(target), Tlevel = getPlayerLevel(target), heart = doPlayerAddItem(cid, 5943, 1) } if isPlayer(cid) and isPlayer(target) then if getPlayerIp(cid) ~= getPlayerIp(target) then doSetItemSpecialDescription(config.heart, "name", "" ..config.Tname.. " Heart's") doSetItemSpecialDescription(config.heart, "description", "Killed at Level "..config.Tlevel.." by "..config.Kname..". " .. (getCreatureSkullType(cid) <= SKULL_GREEN and "(Unjustified)" or "(Justified)")) elseif getPlayerIp(cid) == getPlayerIp(target) then doPlayerAddExp(cid, -10000) end end return true end <event type="kill" name="hearts" event="script" value="nomedoarquivo.lua"/> Não se esqueça de alterar o value"nomedoarquivo.lua" com o que você colocar. em data/creaturescripts/login.lua antes do ultimo "return true" adicione : registerCreatureEvent(cid, "hearts")
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.