Postado Janeiro 9, 2013 12 anos 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 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++.
Postado Janeiro 10, 2013 12 anos 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 Janeiro 11, 2013 12 anos 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 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 Janeiro 11, 2013 12 anos 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 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.