Jump to content

I need some help to add a function


Recommended Posts

Hello, dear buddies.
May someone add one function to this LuaScript, please.

local function PvPAnnouncer(event, killer, killed)
    SendWorldMessage("|cFFFF0000[PvP System]:|r |cFFFF0000|Hplayer:"..killer:GetName().."|h"..killer:GetName().."|h |cFF7DFF00has killed|r |cFFFF0000|Hplayer:"..killed:GetName().."|h"..killed:GetName().."|h")

RegisterPlayerEvent(6, PvPAnnouncer)

In-game it looks like: Test has killed  Test

I want to add one simple function, It has to look like

Tet has killed Test with 5 kills in a row 

Tet has killed Test with 10 kills in a row

Tet has killed Test with 15 kills in a row

Tet has killed Test with 20 kills in a row

Well with different words I want the script to have the function when you kill someone says how much you killed...

The script should be displayed only when you make any row.It has not to display every time when you kill someone because you will literally spam the chat :D
Thanks anyways

Regards, Stefan100



Link to comment
Share on other sites

This isn't that trivial to implement. You would need to keep track of every PvP kill on your server made per player, possibly clearing their kill count if they kill someone else.  Also, you may need to clear it out if that player logs out, or possibly keep a timestamp with each kill.  It depends on what your definition of "in a row" means.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use