• 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!

Death -Owned

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
I would like a scripter so when the player dies, the script says:
O W N E D
rep+:peace:
 
owned.lua
Code:
function onDeath(cid, corpse, deathList)
	return doSendAnimatedText(getCreaturePosition(cid), 'O W N E D', TEXTCOLOR_RED)
end
login.lua
Code:
	registerCreatureEvent(cid, "Owned")
creaturescripts.xml
Code:
	<event type="death" name="Owned" event="script" value="owned.lua"/>
 
date/creaturescripts/script
create archive lua name:
preparedeath.lua
PHP:
  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

Creaturescripts.xml
PHP:
<event type="preparedeath" name="onPrepareDeath" event="script" value="preparedeath.lua"/>

Login.lua
PHP:
registerCreatureEvent(cid, "onPrepareDeath")
I know your missing credits to the author.
 
Back
Top