• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua CreatureScripts

Dantarrix

Member
Joined
Aug 27, 2010
Messages
546
Reaction score
18
Location
Stgo, Chile
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....
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
 
Back
Top