Code:
--Scripted by Lorre, Supporter Nightfall-WoW
--This script is still under development, This means it may not work yet.
local VERSION = "1.0"
local SERVER_NAME = "WoW Knights" --Change to your server name
local GUARD_FEATURE = "Enabled" --[ Define wether the Guard is Enabled or Disabled. ]]
local NPC_ENTRYID = 50099
local type, pairs = type, pairs;
local function Death_Finger(pUnit, Player)
pUnit:FullCastSpellOnTarget(31984, Player) -- Change (5) to your spell <ID> 'Death touch may not work on all servers'.
end
--Do not edit below, Only if you know what your doing.
function Anti_Pvp_Guard_OnSpawn(pUnit, Event)
if (GUARD_FEATURE == "Enabled") then
pUnit:RegisterEvent("Check_PvP", 1200, 0)
end
end
function Check_PvP(pUnit, Event, Player)
local Player_W = pUnit:GetInRangePlayers()
if (Player_W ~= nil) and (type(Player_W) == "table") then
for index, player in pairs(Player_W) do
if (player:IsPlayerAttacking() == true) then
player:SendAreaTriggerMessage("PvP is not allowed in this area") --When some PvP in the not allowed area this messager will be send in Screen.
pUnit:RegisterEvent("Death_Finger", 1500, 4)
Death_Finger(pUnit, player)
end
end
end
end
RegisterUnitEvent(NPC_ENTRYID, 18, "Anti_Pvp_Guard_OnSpawn")
--Never edit Below this
print (" ====================================================")
print (" Loaded: Anti-Pvp-Guard (V"..VERSION..")")
print (" Made by Lorre")
print (" This script is Original released for Nightfall WoW")
print (" This script now works on: ("..SERVER_NAME..")")
print (" ====================================================")
PVP Guard (Shadow Guard)
Code:
insert into `creature_names` (`entry`, `name`, `subname`, `info_str`, `Flags1`, `type`, `family`, `rank`, `unk4`, `spelldataid`, `male_displayid`, `female_displayid`, `male_displayid2`, `female_displayid2`, `unknown_float1`, `unknown_float2`, `civilian`, `leader`)
values ('50099', "Shadow Guard", "PVP Control", '', '0', '10', '0', '3', '0', '0', '7616', '26540', '27536', '27897', '1', '1', '1', '0');
insert into `creature_proto` (`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `npcflags`, `attacktime`, `attacktype`, `mindamage`, `maxdamage`, `can_ranged`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `respawntime`, `armor`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `combat_reach`, `bounding_radius`, `auras`, `boss`, `money`, `invisibility_type`, `death_state`, `walk_speed`, `run_speed`, `fly_speed`, `extra_a9_flags`, `spell1`, `spell2`, `spell3`, `spell4`, `spell_flags`, `modImmunities`)
values ('50099', '80', '255', '7', '999999', '999999', '99999', '1', '0', '999999', '0', '999999', '999999', '0', '0', '0', '0', '300000', '99999', '999999', '999999', '999999', '999999', '999999', '999999', '0', '0', "0", '0', '99999999', '0', '0', '2.50', '8.00', '14.00', '0', '0', '0', '0', '0', '0', '0');
The LUA script IS NOT my work all credit goes to the name in the script