Your code appears to be cunfuzzled.
Code:
function OrgrimmarGuard_Shoot(Unit, Event)
local plr = Unit:GetMainTank()
if Unit:GetDistanceYards(plr) >= 5 then
Unit:FullCastSpellOnTarget(69710, plr)
end
end
And you do realise ArcEmu already supports ranged attacks? Go into creature_proto table, change can_ranged column to 1 and change min_rangedamage and max_rangedamage values. Give him a bow (.npc equip3 itemid) and there you have it, your personal shooting npc (the shooting animation doesn't have projectiles for some reason).