Jump to content
Sign in to follow this  
stefan100

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")
end

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

 


 

Edited by stefan100

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

Contact Us

To contact us click here
You can also email us at [email protected]

Privacy Policy | Terms & Conditions

Repositories

The Link to the master list
of MaNGOS repositories:
Copyright © getMaNGOS. All rights Reserved.

This website is in no way associated with or endorsed by Blizzard Entertainment®
×
×
  • 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