function onDeath(cid, corpse, deathList)
if isPlayer(cid) and isPlayer(deathList[1]) then
doBroadcastMessage(getCreatureName(cid).."["..getPlayerLevel(cid).."] have just been killed by "..getCreatureName(deathList[1]).."["..getPlayerLevel(deathList[1]).."].")
end
return true
end
local str1 = " has been slain by"
local str2 = "getCreatureName(cid)"
local str3 = "getPlayerLevel(cid)"
function onDeath(cid, corpse, deathList)
doBroadcastMessage(name .. str1, str2, str3)
return true
end
<event type="death" name="deathmsg" event="script" value="deathmsg.lua"/>
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
elseif(accountManager == MANAGER_NAMELOCK) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
elseif(accountManager == MANAGER_ACCOUNT) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
end
if(not isPlayerGhost(cid)) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end
registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")
registerCreatureEvent(cid, "Idle")
if(config.useFragHandler) then
registerCreatureEvent(cid, "SkullCheck")
end
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
return true
end
function onDeath(cid, corpse, deathList)
if isPlayer(cid) and isPlayer(deathList[1]) then
doBroadcastMessage(getCreatureName(cid).."["..getPlayerLevel(cid).."] have just been killed by "..getCreatureName(deathList[1]).."["..getPlayerLevel(deathList[1]).."].")
end
return true
end [code=xml]
registerCreatureEvent(cid, "MessageAfterKill")
<event type="death" name="MessageAfterKill" event="script" value="Script-File.lua"/>
function onKill(cid, target, lastHit)
if isPlayer(cid) and isPlayer(target) then
doBroadcastMessage(getCreatureName(cid)..'['..getPlayerLevel(cid)..'] has just been killed by '..getCreatureName(target)..'['..getPlayerLevel(target)..']!'
end
return true
end
<event type="death" name="[COLOR="red"]Killmsg[/COLOR]" event="script" value="[COLOR="red"]Killmsg.lua[/COLOR]"/>
registerCreatureEvent(cid, "[COLOR="red"]Killmsg[/COLOR]")
Script:
Lua Code:
function onKill(cid, target, lastHit)
if isPlayer(cid) and isPlayer(target) then
doBroadcastMessage(getCreatureName(cid)..'['..getPlayerLevel(cid)..'] has just been killed by '..getCreatureName(target)..'['..getPlayerLevel(target)..']!'
end
return true
end
@creaturescripts.xml
Code:
<event type="death" name="Killmsg" event="script" value="Killmsg.lua"/>
@login.lua
Code:
registerCreatureEvent(cid, "Killmsg")
Be sure to restart your server, not just reload.