Hey Guys. This is my First Release so don't Flame me to hard Please.
Ok This script is for an area that you want to protect from the opposite faction. What it does is it Kicks the player out of the area so say a horde comes into alliance area he will get booted out of there when he gets close enough to the Guard or whatever you set the script on.
All You have to do is Change what you want the guy to say when he enters combat and change the EntryID to what you want it as for the mob you want the script on.
One more thing i know this was released by Mager about a month ago but im his brother and im actually the one that wrote that script to... Ive gotten Alot better at LUA since then so this Script is obviously better than my old one lol
Well Here it is!
Code:
-- Bouncer -- Mall.lua
-- This Script was Written by Dartignan of
-- the EclipseWoW Server.
-- Please give proper accredidations
-- when re-releasing or sharing this script
-- with others in the emulation community.
function Bouncer_OnCombat(pUnit, event)
pUnit:RegisterEvent("Bouncer_Spell", 1000, 0)
pUnit:RegisterEvent("Bouncer_Say", 1000, 1)
end
function Bouncer_Spell(pUnit)
local plr = pUnit:GetClosestPlayer()
local spell = math.random(1,2)
if(spell == 1) then
pUnit:CastSpellOnTarget(16716, plr)
end
if(spell == 2) then
pUnit:CastSpellOnTarget(36812, plr)
end
end
function Bouncer_Say(pUnit)
pUnit:SendChatMessage(11, 0, "Put What You want it to Say Here")
end
RegisterUnitEvent(EntryId, 1, "Bouncer_OnCombat")
Please Give Proper Accredidations When re-releasing or shareing this script in the emulator community