To usando esse sistema pra dropar o coração do player quando é morto no pvp. Mas quando os jogadores estão duelando em PVP Zone, colocado pelo RME, o coração não dropa. Acho que isso acontece pq o jogador não chega a morrer, ele é teleportado pro temple quando fica sem vida, ai o coração não vem. Alguém sabe como arrumar?
hearts.lua
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
Pergunta
NewAge 0
To usando esse sistema pra dropar o coração do player quando é morto no pvp. Mas quando os jogadores estão duelando em PVP Zone, colocado pelo RME, o coração não dropa. Acho que isso acontece pq o jogador não chega a morrer, ele é teleportado pro temple quando fica sem vida, ai o coração não vem. Alguém sabe como arrumar?
hearts.lua
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 endcreaturescripts.xml
Link para o comentário
https://xtibia.com/forum/topic/199089-heart-system/Compartilhar em outros sites
12 respostass a esta questão
Posts Recomendados