• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

[Script]OWNED When Killed

theroyal

Wassup :)
Joined
Oct 22, 2009
Messages
372
Reaction score
6
hello i want the following script i searched for it couldn't find it
type:CreatureEvent
when you kill a player while pk or killing pk ,red skull,black skull basically in pvp you see a text message pops up from the corpes with the words OWNED! in blue color
so basically it's onkill i think not sure so if player kills player a message pops up from the corpse of the player who got killed and with the text you know the rest
i will rep++ all the helpers
kind regards, theroyal
 
LUA:
local function sendLetter(p)
        local pos = p.pos
        local letter = p.letter
        doSendAnimatedText(pos, letter, TEXTCOLOR_RED)
end

function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
        local letters = {"O", "W", "N", "E", "D", "!"}
        for i = 1, #letters do
                addEvent(sendLetter, i * 150, {pos = getCreaturePosition(cid), letter = letters[i]})
        end
        return true
end[
 
LUA:
local function sendLetter(p)
        local pos = p.pos
        local letter = p.letter
        doSendAnimatedText(pos, letter, TEXTCOLOR_RED)
end

function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
        local letters = {"O", "W", "N", "E", "D", "!"}
        for i = 1, #letters do
                addEvent(sendLetter, i * 150, {pos = getCreaturePosition(cid), letter = letters[i]})
        end
        return true
end[

thanks but can you give me the line for xml?
 
in creaturescripts\scripts add new file name owned.lua than put this

LUA:
local function sendLetter(p)
        local pos = p.pos
        local letter = p.letter
        doSendAnimatedText(pos, letter, TEXTCOLOR_RED)
end
 
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
        local letters = {"O", "W", "N", "E", "D", "!"}
        for i = 1, #letters do
                addEvent(sendLetter, i * 150, {pos = getCreaturePosition(cid), letter = letters[i]})
        end
        return true
end


than open file creaturescripts.xml and put this line

LUA:
<event type="preparedeath" name="owned" event="script" value="owned.lua"/>

than goto creaturescripts\scripts and open file name login.lua than put this line

LUA:
registerCreatureEvent(cid, "owned")

if this help u reb me :P
 
Back
Top