• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

CreatureEvent Broadcast killer on death for TFS 0.4

Gesior.pl

Mega Noob&LOL 2012
Senator
Joined
Sep 18, 2007
Messages
2,979
Solutions
100
Reaction score
3,423
Location
Poland
GitHub
gesior
Add it to creaturescripts.xml as "kill" event. Remember to 'register' it in login.lua!

After kill it will show:
Someone [123] killed Somebody [321] !
Lua:
function onKill(cid, target, damage, flags)
	if(isPlayer(cid) and isPlayer(target)) then
		if(flags % 2 == 1) then
			doBroadcastMessage(getCreatureName(cid) .. " [" .. getPlayerLevel(cid) .. "] killed " .. getCreatureName(target) .. " [" .. getPlayerLevel(target) .. "] !")
		end
	end
	return true
end
Friend requested it on MSN, he said that all scripts from otland are bugged [on 0.4].
Script tested on rev. 3777

That code check if 'cid' did 'last hit' is 0.4:
Lua:
if(flags % 2 == 1) then
 
Last edited:
Last edited:
Back
Top Bottom