[TFC-Core] LUA system PvP announce RELEASE!

Erorek

Verified Member
15
2016
1
Im releasing some of my server's scripts because it is paused atm due to a very low number of testers & developer non-consistency in terms of work flow, and I've worked for 1 year+ on this project, payed money to finance the server alone, without getting anything in return, so in the end i realized it wasn't really worth it. Anyway back to topic guys!

PS: I am the owner. I am intentionally sharing these scripts to the public for obvious reasons I suppose.


Script functionality: Displays the following;
-[Killer_Name] has killed [Victim_Name] in [Zone_Name]
-[PvP] [Zone_name] is in fighting!


PHP:
local function CustomMessage(player, victim)
    zoneId = victim:GetZoneId()
    if (zoneId == 33) then 
    SendWorldMessage("|cccFFC433[PVP] ["..player:GetName().."] has killed ["..victim:GetName().."] in Gurubashi")
    elseif ( zoneId == 33) then --gurubashi arena
    SendWorldMessage("|cff".."ff0000".."[PVP] Gurubashi Arena is in Fighting!")
    return
    end
end

-- prevent honor/arena farming
-- [victimGUID] ={ lastKillerGUID }
local AntiFarm = { }

local function HandlePvPKill(event, player, victim)
    if (player:GetGUIDLow() ~= victim:GetGUIDLow()) then -- do not allow suicide reward
        CustomMessage(player, victim)
        if (AntiFarm[victim:GetGUIDLow()] == nil) then
        elseif (AntiFarm[victim:GetGUIDLow()][1] ~= player:GetGUIDLow()) then
        CustomMessage(player, victim)
        end
        AntiFarm = { [victim:GetGUIDLow()] = { player:GetGUIDLow() } }-- set last killer GUID
    end
end

RegisterPlayerEvent(6, HandlePvPKill)

Enjoy free The Forgotten Crusade scripts. Hope this brings some joy or use to whoever comes across it!

Thank you,
Kind Regards,
Nerc
 
Top