Ir para conteúdo

Featured Replies

Postado

Então o script consiste em quem der o ultimo hit em certo player no pvp leva o coração dele com nome e level :O só q num ta funcionando aqui sei lá pqê Help's :z

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

E aqui o erro q mostra na distro:

[12:59:54.125] [Warning - Event::loadScript] Event onPrepareDeath not found (dat

a/creaturescripts/scripts/coracao.lua)

          Procuro Equipe para projeto sério com remuneração, maior necessidade Programador em C\C++.

  • Respostas 9
  • Visualizações 497
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

Postado
function onPrepareDeath(cid, deathList)


local str = getCreatureName(cid) .. " heart's died at level " .. getPlayerLevel(cid) .. ""


for _, pid in ipairs(deathList) do

     if isCreature(pid) and isPlayer(cid) then

         str = str .. " by " .. (str2 == "" and "" or ",") .. " " .. getCreatureName(pid)

            else

        str = str .. " by ".. (str == "" and "" or ",") .. " a field item"

     end

end


for _, tid in ipairs(deathList) do

   if isPlayer(cid) then

       itemm = doPlayerAddItem(tid, 5943, 1)

           doSetItemSpecialDescription(itemm, str)

              setItemName(itemm, "Heart's of someone")

                 doSendMagicEffect(getThingPos(cid), 49)

                 end

             end

 return true

end 

 

Retirado.

 

Skype: joaoxtibia85.

Postado
  • Autor

function onPrepareDeath(cid, deathList)


local str = getCreatureName(cid) .. " heart's died at level " .. getPlayerLevel(cid) .. ""


for _, pid in ipairs(deathList) do

if isCreature(pid) and isPlayer(cid) then

str = str .. " by " .. (str2 == "" and "" or ",") .. " " .. getCreatureName(pid)

else

str = str .. " by ".. (str == "" and "" or ",") .. " a field item"

end

end


for _, tid in ipairs(deathList) do

if isPlayer(cid) then

itemm = doPlayerAddItem(tid, 5943, 1)

doSetItemSpecialDescription(itemm, str)

setItemName(itemm, "Heart's of someone")

doSendMagicEffect(getThingPos(cid), 49)

end

end

return true

end

Mano nem funfa :O Tipo o player num morre fica com 0 de life mais num morre e da altos erro na distro :C

          Procuro Equipe para projeto sério com remuneração, maior necessidade Programador em C\C++.

Postado
  • Autor

Como você usou a tag?

Mano meu server num tá aqui mais tenho qse ctz q foi OnprepareDeath :x

<event type="preparedeath" name="Coracao" event="script" value="coracao.lua"/>

Acho q tva tipo assim :O

          Procuro Equipe para projeto sério com remuneração, maior necessidade Programador em C\C++.

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.7k

Informação Importante

Confirmação de Termo