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

broadcast player killer of demodras (not working)

CheatsBCN

New Member
Joined
Mar 6, 2012
Messages
131
Reaction score
1
helllo after i did demodras quest i only have one missing thing, how can i make it broadcast the name of the killer? now it says "demodras was killed by 0" and also idk why on the console it says:

[03/10/2012 11:56:55] > Broadcasted message: "Demodras was killed by 0!".

but its not shown ingame =O


PHP:
--- Created by Darkhaos
 
function onDeath(cid, corpse, killer)
 
registerCreatureEvent(cid, "Demodras")
 
local creaturename = getCreatureName(cid)
local in_pos = {x=1146, y=1101, z=6, stackpos=2} --- Position where tp is created
local checkIID = getThingfromPos(in_pos)
local to_pos = {x=1146, y=1101, z=7, stackpos=1} --- To position tp leads player
local time_to_pass = 10 -- in seconds
local tpID = 1387 --- Don't change
 
if creaturename == 'Demodras' then
 
teleport = doCreateTeleport(tpID, to_pos, in_pos)
 
doSendMagicEffect(in_pos, CONST_ME_TELEPORT)
doCreatureSay(cid, "You have " .. time_to_pass .. " seconds to go downstairs!", TALKTYPE_ORANGE_1)
broadcastMessage("Demodras was killed by " ..getCreatureTarget(cid).. "!", type)
addEvent(removeTeleport, (1000*time_to_pass))
 
 
end
end
 
function removeTeleport()
if getThingfromPos({x=1146, y=1101, z=6, stackpos=1}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=1146, y=1101, z=6, stackpos=1}).uid,1)
doSendMagicEffect({x=1146, y=1101, z=6, stackpos=15}, CONST_ME_POFF)
return TRUE
end
end
 
Back
Top