Caetan,
I believe that you will just need to add some lines to the top.
Lua Code:
if not IsInGuild() then return end -- Checks to see if you're in a guild, if not does nothing further.
local myGuildName = "My Guild Name" -- Replace "My Guild Name" with the name you are looking for. Capitalisation matters!
local guildName, guildRankName, guildRankIndex = GetGuildInfo("player")
if not (guildName == myGuildName and guildRankIndex == 3) then return end -- Check if your guild name and rank is what you are looking for, if not does nothing further.
This has only been drycoded, but I think this is all you should need.
Ekat