• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

Kill Streak Announcer

slp13at420

Mad Scientist

Grumbo'z Kill Streak Announcer

--Built Tested and Approved for TC2 3.3.5a Eluna ONLY--

This is just a simple Announcer script that will announce to the world when a player reaches each amount of kills.
  • Designed for promoting online activity.
  • if a player logs out then there kill count and title will be wiped when they log in again.
  • if a player dies then there kill count and title will reset to 0.

at each new level of kills the player will receive a simple title that only works within this script ofc.
this will not allow players to farm kill a single character or them selves..

For TrinityCore2 3.3.5a Eluna



Script:
Code:
[COLOR="#808080"]
-- By Slp13at420 of EmuDevs.com --
local Streak = {};
local Ann = {};

print("-----------------------------------")
print("Grumboz Kill Streak loading.")

local Ann = {
	[5] = {"`The Boring`", "has earned 5 kills."},
	[10] = {"`The Annoyance`", "is warming up with 10 kills."},
	[15] = {"`The Bloody`", "now has 15 kills under there belt."},
	[25] = {"`The War Machine`", "has reached 25 kills."},
	[50] = {"`The Widow Maker`", "has caused a blood bath by slaughtering 50 victims."},
	[75] = {"`The WarLord`", "walks thru the battlefield drenched with the blood of 75 victims."},
	[100] = {"`The Chaotic`", "is litteraly standing in his victims blood with 100 kills."},
	[125] = {"`The Reaper`", "has devistated the realm with 125 victims."},
	[150] = {"`The Destroyer of Worlds`", "Stands atop a pile of bodies of 150 victims."}
		};

function StreakKill(event, killer, victim)
local Kguid = killer:GetGUIDLow()
local Vguid = victim:GetGUIDLow()
local Kname = killer:GetName()
local Vname = victim:GetName()

	if((Streak[Kguid].prior~=Vguid)and(Kguid~=Vguid))then
		Streak[Kguid].kills = (Streak[Kguid].kills + 1)
		Streak[Kguid].prior = Vguid
	
		if(Ann[Streak[Kguid].kills])then
			Streak[Kguid].title = Ann[Streak[Kguid].kills][1]
			SendWorldMessage("|cffcc0000"..Kname.." "..Streak[Kguid].title.." "..Ann[Streak[Kguid].kills][2].."|r")
		end
		if(Streak[Kguid].kills)then
			victim:SendBroadcastMessage("|cffcc0000You have fallen to "..Kname.." "..Streak[Kguid].title..".|r")
			Streak[Vguid].kills = 0
		end		
	else
		if(Streak[Kguid].prior==Vguid)then
			killer:SendBroadcastMessage("You cant kill the same player twice.")
		end
		if(Kguid==Vguid)then
			killer:SendBroadcastMessage("Suicide doesnt pay.")
		end
	end
end

function StreakLogin(event, killer)
local Kguid = killer:GetGUIDLow()
	Streak[Kguid] = {title = "`The Noob`", kills = 0, prior = 0}
end

RegisterPlayerEvent(6, StreakKill)
RegisterPlayerEvent(3, StreakLogin)

print("Counter started.")
print("-----------------------------------")
[/COLOR]

 
Last edited:

Rochet2

Moderator / Eluna Dev
[MENTION=717]slp13at420[/MENTION]
I see you using GetName a lot in scripts as table key.
I would be better if you used the player's ID (number)
You can get it with player:GetGUIDLow()
Strings are larger, less efficient and in SQL selects different strings /may/ match the same searched string (case and accent insensitivity).

Make the tables local as well as the functions.
This way they cant screw up or be screwed up by other scripts

I would also suggest using a variable for the guid and the name when using them multiple times.
It is less efficient to get it all the time than to get it once and then store it to a variable..
 
Last edited:

slp13at420

Mad Scientist
Awesome, thanks for sharing! Also, who is Grumbo? Like seriously. :/

ok Grumbo is my main char name when gaming :D
started back in 2011 on AMD's daughter site Bloody . my guild "We Smoke FelWeed" had 90% of the gm's and about 15 to 20 constant online members with a total of 1100+ registered members.
I would handle all our events and farm for ALL the rewards personally.
 

slp13at420

Mad Scientist
[MENTION=717]slp13at420[/MENTION]
I see you using GetName a lot in scripts as table key.
I would be better if you used the player's ID (number)
You can get it with player:GetGUIDLow()
Strings are larger, less efficient and in SQL selects different strings /may/ match the same searched string (case and accent insensitivity).

Make the tables local as well as the functions.
This way they cant screw up or be screwed up by other scripts

I would also suggest using a variable for the guid and the name when using them multiple times.
It is less efficient to get it all the time than to get it once and then store it to a variable..

k updated :D
localized tables and transferred Get values to variables changed keys to guidlow.
along with some other prior projects :D
yea kinda dropped the ball on a few things lol
 
Last edited:
Top