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

onKill Broadcast Message

aioriusox

New Member
Joined
Apr 8, 2009
Messages
70
Reaction score
0
I need a script that the killing a creature called Kristanium, there is a broadcast to the server, saying that the Player's Guild (guild name) broke the Kristanium.


HELP ME PLX!
 
Lua:
function onKill(cid, target, lastHit)

	local enemy = getCreatureTarget(cid)
	local guild = getPlayerGuildName(cid)
	
	if getCreatureName(enemy) == 'Kristanium' then
		broadcastMessage(guild .. ' broke the Kristanium!', 19)
	end
	
	return true
end

Haven't tested it as I'm at school, let me know if it works =)
 
Lua:
function onKill(cid, target)
	if(getCreatureName(target):lower() == "kristanium") then
		doBroadcastMessage((getPlayerGuildId(cid) ~= 0 and "Guild " .. getPlayerGuildName(cid) or "Player " .. getCreatureName(cid)) .. " broke the Kristanium!")
	end
	return true
end
 
Back
Top