• 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 Kill Broadcast J/UJ

Sync

Ø,ø
Joined
May 26, 2009
Messages
1,901
Reaction score
26
Location
Canada
Well i saw this awhile ago, and im not sure if it got made it not but what it does it Broadcasts to the server when you kill a player if the player that killed the target got an Unjustified Frag or Justified Frag.

So here it is.

Code:
<event type="kill" name="Killb" event="script" value="killb.lua"/>

Code:
registerCreatureEvent(cid, "Killb")

Lua:
function onKill(cid, target)
        if isPlayer(target) == TRUE then   
                if ((isInParty(target) and isInParty(cid)) and (getPlayerParty(cid) == getPlayerParty(target))) and isPlayer(target)then
                        broadcastMessage(getCreatureName(cid) .. " just killed ".. getCreatureName(target).." (Justified)",MESSAGE_STATUS_WARNING)
                elseif getCreatureSkullType(cid) == 4 or getCreatureSkullType(cid) == 3 and getCreatureSkullType(target) == 0 and isPlayer(target)then
                        broadcastMessage(getCreatureName(cid) .. " just killed ".. getCreatureName(target).." (UnJustified)",MESSAGE_STATUS_WARNING)
                elseif getCreatureSkullType(target) == 3 or getCreatureSkullType(target) == 4 and isPlayer(target) then
                        broadcastMessage(getCreatureName(cid) .. " just killed ".. getCreatureName(target).." (Justified)",MESSAGE_STATUS_WARNING)      
                end
        end
        return TRUE
end

Code:
00:57 Test Three just killed Test (UnJustified)
01:00 Test just killed Test Three (Justified)

Enjoy
 
Last edited:
When both are in party? And so when they are in another party?

I would I wrote:
Code:
function onKill(cid, target)
	local selfName = getCreatureName(cid)
	local selfSkull = getCreatureSkullType(cid)
	local targetName = getCreatureName(target)
	local targetSkull = getCreatureSkullType(target)

	if ((isInParty(target) and isInParty(cid)) and (getPlayerParty(cid) == getPlayerParty(target))) then
		broadcastMessage(selfName .. " just killed ".. targetName .." (Justified)",MESSAGE_STATUS_WARNING)
	elseif (selfSkull == 4 or selfSkull(cid) == 3 and targetSkull == 0) then
		broadcastMessage(selfName .. " just killed ".. targetName .." (UnJustified)",MESSAGE_STATUS_WARNING)
	elseif (targetSkull == 3 or targetSkull == 4) then
		broadcastMessage(selfName .. " just killed ".. targetName .." (Justified)",MESSAGE_STATUS_WARNING)
	end
	return TRUE
end
 
Chris,
I released scripts with "Unjustified/Justified" and frag rewards+broadcasts.
No copy me plx :confused:

Nice anyway :thumbup:
 
lol....BUG!

when a player have red skull and killing a monster then coming

19:34 Tompsu just killed rotworm (UnJustified)
fixx it -.-
 
Nice script chris ^_^.

lol....BUG!

when a player have red skull and killing a monster then coming

19:34 Tompsu just killed rotworm (UnJustified)
fixx it -.-

@Swimmi:
Lol, Fixed.
Lua:
function onKill(cid, target)
	if isPlayer(target) == TRUE then   
		if ((isInParty(target) and isInParty(cid)) and (getPlayerParty(cid) == getPlayerParty(target))) and isPlayer(target)then
			broadcastMessage(getCreatureName(cid) .. " just killed ".. getCreatureName(target).." (Justified)",MESSAGE_STATUS_WARNING)
		elseif getCreatureSkullType(cid) == 4 or getCreatureSkullType(cid) == 3 and getCreatureSkullType(target) == 0 and isPlayer(target)then
			broadcastMessage(getCreatureName(cid) .. " just killed ".. getCreatureName(target).." (UnJustified)",MESSAGE_STATUS_WARNING)
		elseif getCreatureSkullType(target) == 3 or getCreatureSkullType(target) == 4 and isPlayer(target) then
			broadcastMessage(getCreatureName(cid) .. " just killed ".. getCreatureName(target).." (Justified)",MESSAGE_STATUS_WARNING)      
        	end
	end
	return TRUE
end
 
Possible to do in a special area? etc Position:
[X: 32315] [Y: 31941] [Z: 7].
[X: 32318] [Y: 31947] [Z: 7].
And like, if 20players enter a teleport test one killed, test three [justified] 19players left.
 
@Up,

I have been trying to figure out that problem aswell.
Deaths are spammed when lot's of people die.

I'll figure it out eventually :thumbup:
 
@Up,

I have been trying to figure out that problem aswell.
Deaths are spammed when lot's of people die.

I'll figure it out eventually :thumbup:

Make a channel called PVP, and make all deaths and kills bc'd there.

or the possiblity to make !pvpinfo, with the latest deaths and kills.
 
@Up,

It's better if you make the broadcast wait 5 minutes after the person died.
Then broadcast his death, because then the killer has some time to run/hide!

(Like on Realots.net)
 
i did edit this a bit and it shows also lvls of players ;D
anyway , good script rep+
eloelo.png
 
i tested it on 0.3.6 tfs and it didint worked ? please hellp
edit:
ah it works hehe , how i can make that it shows levels ?
 
Last edited:
Lua:
function onKill(cid, target)
        if isPlayer(target) == TRUE then   
                if ((isInParty(target) and isInParty(cid)) and (getPlayerParty(cid) == getPlayerParty(target))) and isPlayer(target)then
                        broadcastMessage(getCreatureName(cid) .. "[".. getPlayerLevel(cid) .."] just killed ".. getCreatureName(target).."[".. getPlayerLevel(target) .."] (Justified)",MESSAGE_STATUS_WARNING)
                elseif getCreatureSkullType(cid) == 4 or getCreatureSkullType(cid) == 3 and getCreatureSkullType(target) == 0 and isPlayer(target)then
                        broadcastMessage(getCreatureName(cid) .. "[".. getPlayerLevel(cid) .."] just killed ".. getCreatureName(target).."[".. getPlayerLevel(target) .."] (UnJustified)",MESSAGE_STATUS_WARNING)
                elseif getCreatureSkullType(target) == 3 or getCreatureSkullType(target) == 4 and isPlayer(target) then
                        broadcastMessage(getCreatureName(cid) .. "[".. getPlayerLevel(cid) .."] just killed ".. getCreatureName(target).."[".. getPlayerLevel(target) .."] (Justified)",MESSAGE_STATUS_WARNING)      
                end
        end
        return TRUE
end
 
Back
Top