Dantarrix
Member
Well, i need 2 creaturescripts. The first conssists in a script that if you kill a player you win his/her heart.
And the second is that you kill a player with a higher level than yours you win a trophy.
For now, i have this, but they dont work....
I need them with the same texts, the texts are in spanish because i am chilean and my native lenguage is spanish, and my server's lenguage is spanish
And the second is that you kill a player with a higher level than yours you win a trophy.
For now, i have this, but they dont work....
Lua:
function onKill(cid, target, lastHit)
local hearth = doPlayerAddItem(cid, 10552, 1)
if (isPlayer(cid) and isPlayer(target)) then
doItemSetAttribute(hearth.uid, 'name', "Es el corazón de "..getCreatureName(target)..".")
doItemSetAttribute(hearth.uid, 'aid', 75000)
doPlayerSendTextMessages(cid, 24, "Le has sacado el corazon a "..getCreatureName(target)..".")
return hearth
end
return true
end
Lua:
function onKill(cid, target, lastHit)
local trophy = doPlayerAddItem(cid, 7369, 1)
if (isPlayer(cid) and isPlayer(target)) then
if getPlayerLevel(cid) < getPlayerLevel(target) then
doItemSetAttribute(trophy.uid, 'description', "Trofeo por matar a "..getPlayerName(target)..".")
doPlayerSendTextMessage(cid, 24, "Te ganaste un trofeo por matar un player con lvl más alto que el tuyo.")
return trophy
end
end
return true
end
I need them with the same texts, the texts are in spanish because i am chilean and my native lenguage is spanish, and my server's lenguage is spanish