<?xml version="1.0" encoding="UTF-8"?>
<mod name="OWNED" version="1.0" author="Slaktaren" contact="my ass" enabled="yes">
<event type="login" name="OWNEDZ" event="script"><![CDATA[
registerCreatureEvent(cid, "OWNED")
return TRUE
]]></event>
<event type="prepareDeath" name="OWNED" event="script"><![CDATA[
if isPlayer(cid) then
doPlayerSendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "O W N E D !")
end
return TRUE
]]></event>
</mod>
ServerDirectory/mods/OWNED.xml
LUA:<?xml version="1.0" encoding="UTF-8"?> <mod name="OWNED" version="1.0" author="Slaktaren" contact="my ass" enabled="yes"> <event type="login" name="OWNEDZ" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "OWNED") return TRUE end ]]></event> <event type="prepareDeath" name="OWNED" event="script"><![CDATA[ function onPrepareDeath(cid, deathList) if isPlayer(cid) then doPlayerSendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "O W N E D !") end return TRUE end ]]></event> </mod>
Not tested!
Test it and tell me if it worked or not![]()
Oh, right
is it ok now? Like first time using mods![]()
<?xml version="1.0" encoding="UTF-8"?>
<mod name="OWNED" version="1.0" author="Slaktaren" contact="my ass" enabled="yes">
<event type="login" name="OWNEDZ" event="script"><![CDATA[
registerCreatureEvent(cid, "OWNED")
return true
]]></event>
<event type="prepareDeath" name="OWNED" event="script"><![CDATA[
if isPlayer(deathList[1]) or isMonster(deathList[1]) and isPlayer(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O W N E D !")
local corpse, killers = doCreateItem(corpse_ids[getPlayerSex(cid)], 1, getThingPos(cid)), ""
for i = 1, math.min(getConfigInfo('deathAssistCount') + 1, #deathList) do
killers = killers .. (i == 1 and "" or ", ") .. (isMonster(deathList[i]) and "a " or "") .. getCreatureName(deathList[i])
end
doItemSetAttribute(corpse, "specialdescription", "You recognize " .. getCreatureName(cid) .. ". " .. (getPlayerSex(cid) == 0 and "She" or "He") .. " was killed by " .. killers .. ".")
end
return true
]]></event>
</mod>
Code:<?xml version="1.0" encoding="UTF-8"?> <mod name="OWNED" version="1.0" author="Slaktaren" contact="my ass" enabled="yes"> <event type="login" name="OWNEDZ" event="script"><![CDATA[ registerCreatureEvent(cid, "OWNED") return true ]]></event> <event type="prepareDeath" name="OWNED" event="script"><![CDATA[ if isPlayer(deathList[1]) or isMonster(deathList[1]) and isPlayer(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O W N E D !") local corpse, killers = doCreateItem(corpse_ids[getPlayerSex(cid)], 1, getThingPos(cid)), "" for i = 1, math.min(getConfigInfo('deathAssistCount') + 1, #deathList) do killers = killers .. (i == 1 and "" or ", ") .. (isMonster(deathList[i]) and "a " or "") .. getCreatureName(deathList[i]) end doItemSetAttribute(corpse, "specialdescription", "You recognize " .. getCreatureName(cid) .. ". " .. (getPlayerSex(cid) == 0 and "She" or "He") .. " was killed by " .. killers .. ".") end return true ]]></event> </mod>
;d;d not sure also
try this 1 ;SWith this on, you cant die
I tested it, and when I went to demons, it gave me 0 hp after all the hits, it said O W N E D!, then went to 1 health, and over and over again.
<?xml version="1.0" encoding="UTF-8"?>
<mod name="OWNED" version="1.0" author="Slaktaren" contact="my ass" enabled="yes">
<event type="login" name="OWNEDZ" event="script"><![CDATA[
registerCreatureEvent(cid, "OWNED")
return true
]]></event>
<event type="prepareDeath" name="OWNED" event="script"><![CDATA[
if isPlayer(deathList[1]) or isMonster(deathList[1]) and isPlayer(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O W N E D !")
local corpse, killers = doCreateItem(corpse_ids[getPlayerSex(cid)], 1, getThingPos(cid)), ""
for i = 1, math.min(getConfigInfo('deathAssistCount') + 1, #deathList) do
killers = killers .. (i == 1 and "" or ", ") .. (isMonster(deathList[i]) and "a " or "") .. getCreatureName(deathList[i])
end
corpse
doItemSetAttribute(corpse, "specialdescription", "You recognize " .. getCreatureName(cid) .. ". " .. (getPlayerSex(cid) == 0 and "She" or "He") .. " was killed by " .. killers .. ".")
end
return true
]]></event>
</mod>
<?xml version="1.0" encoding="UTF-8"?>
<mod name="OWNED" version="1.0" author="Slaktaren" contact="my ass" enabled="yes">
<event type="login" name="OWNEDZ" event="script"><![CDATA[
registerCreatureEvent(cid, "OWNED")
return true
]]></event>
<event type="kill" name="OWNED" event="script"><![CDATA[
if isPlayer(cid) or isMonster(cid) and isPlayer(target) then
doPlayerSendTextMessage(target, 20, "You got owned.")
end
return true
]]></event>
</mod>
I can't see the message... I think by creaturescripts it's more easy to create this script >.<!
function onKill(cid, target, lastHit)
if isPlayer(cid) or isMonster(cid) and isPlayer(target) then
doPlayerSendTextMessage(target, 20, "Owned.")
end
return true
end
function onKill(cid, target, lastHit)
if isPlayer(cid) or isMonster(cid) and isPlayer(target) then
doSendAnimatedText(cid, target, "OWNED", TEXTCOLOR_PURPLE)
end
return true
end
@OzIcO, im noob at scripting but i think that
doCreatureSay(target, "O W N E D!", TALKTYPE_ORANGE_1)
the guy that died had to be alive to that happens?
cuz a dead body cant say anything xD
registerCreatureEvent(cid, "PWNED")
<event type="preparedeath" name="PWNED" event="script" value="PWNED.lua"/>
local function sendLetter(p)
local pos = p.pos
local letter = p.letter
doSendAnimatedText(pos, letter, TEXTCOLOR_BLUE)
end
function onPrepareDeath(cid, deathList)
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