1. GnomeSpy addon

    For all of you gnome lovers, I have made a small addon based on Spy that will detect gnome players near you and announce it. Installation is straight forward, just copy the folder to your /Interface/addons in your game folder and when in game use /gnomespy on or off to toggle it.

    Link for download: https://filebin.net/k2bwqllfy4s8rlyy

  2. For the paranoids from global: here are files to make them yourselves so u dnt need to download anything. Make a folder named GnomeSpy in /interface/Addons.

    Make a new text file and rename it to GameSpy.toc and paste the following text in it:

    Code:
     ## Interface: 30300
    ## Title: GnomeSpy
    ## Notes: Spy-style detection of enemy Gnome players
    ## Author: Dazzertluz
    ## Version: 1.0
    
    GnomeSpy.lua

    Make another text file and rename it to GameSpy.lua and paste the following text in it:

    Code:
    --------------------------------------------------
    -- GnomeSpy - WotLK 3.3.5
    --------------------------------------------------
    
    local ADDON_NAME = "GnomeSpy"
    local DETECT_COOLDOWN = 10 -- seconds
    local detected = {}       -- cache per player
    local lastGlobalAlert = 0
    local enabled = true      -- ON by default
    
    local yellMessages = {
        "GNOME ALERT! %s spotted!",
        "INTRUDER! Enemy GNOME %s detected!",
        "WARNING! %s the GNOME is among us!",
        "GNOME CONFIRMED: %s!",
    }
    
    local frame = CreateFrame("Frame")
    
    --------------------------------------------------
    -- Slash Command
    --------------------------------------------------
    
    SLASH_GNOMESPY1 = "/gnomespy"
    SlashCmdList["GNOMESPY"] = function(msg)
        msg = msg:lower()
    
        if msg == "on" then
            enabled = true
            print("|cff00ff00GnomeSpy enabled.|r")
    
        elseif msg == "off" then
            enabled = false
            print("|cffff0000GnomeSpy disabled.|r")
    
        else
            print("|cffffff00GnomeSpy commands:|r")
            print("  /gnomespy on  - Enable detection")
            print("  /gnomespy off - Disable detection")
        end
    end
    
    --------------------------------------------------
    -- Utility
    --------------------------------------------------
    
    local function IsEnemyPlayer(flags)
        return bit.band(flags, COMBATLOG_OBJECT_TYPE_PLAYER) > 0
           and bit.band(flags, COMBATLOG_OBJECT_REACTION_HOSTILE) > 0
    end
    
    local function PlayAlert()
        PlaySoundFile("SoundInterfaceRaidWarning.wav", "Master")
    end
    
    local function RandomYell(name)
        local msg = yellMessages[random(#yellMessages)]
        return string.format(msg, name)
    end
    
    --------------------------------------------------
    -- Announcement
    --------------------------------------------------
    
    local function Announce(unit)
        if not enabled then return end
        if not UnitExists(unit) then return end
        if not UnitIsPlayer(unit) then return end
        if not UnitIsEnemy("player", unit) then return end
    
        local race = UnitRace(unit)
        if race ~= "Gnome" then return end
    
        local name = UnitName(unit)
        if detected[name] then return end
    
        local now = GetTime()
        if now - lastGlobalAlert < DETECT_COOLDOWN then return end
        lastGlobalAlert = now
        detected[name] = true
    
        local level = UnitLevel(unit) or "??"
        local class = UnitClass(unit) or "Unknown"
        local guild = GetGuildInfo(unit)
    
        local description
        if guild then
            description = string.format(
                "%s || Level %s %s || %s",
                RandomYell(name), level, class, guild
            )
        else
            description = string.format(
                "%s || Level %s %s",
                RandomYell(name), level, class
            )
        end
    
        SendChatMessage(description, "YELL")
        PlayAlert()
    end
    
    --------------------------------------------------
    -- Event Handlers
    --------------------------------------------------
    
    frame:RegisterEvent("PLAYER_TARGET_CHANGED")
    frame:RegisterEvent("UPDATE_MOUSEOVER_UNIT")
    frame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
    frame:RegisterEvent("ARENA_OPPONENT_UPDATE")
    frame:RegisterEvent("UPDATE_BATTLEFIELD_SCORE")
    
    frame:SetScript("OnEvent", function(_, event, ...)
        if not enabled then return end
    
        if event == "PLAYER_TARGET_CHANGED" then
            Announce("target")
    
        elseif event == "UPDATE_MOUSEOVER_UNIT" then
            Announce("mouseover")
    
        elseif event == "ARENA_OPPONENT_UPDATE" then
            local unit, status = ...
            if status == "seen" then
                Announce(unit)
            end
    
        elseif event == "UPDATE_BATTLEFIELD_SCORE" then
            for i = 1, GetNumBattlefieldScores() do
                local name, _, _, _, _, _, _, _, _, class = GetBattlefieldScore(i)
                if name and class and not detected[name] then
                    detected[name] = true
                    SendChatMessage(
                        "ENEMY GNOME DETECTED IN BG: "..name.." ("..class..")",
                        "YELL"
                    )
                    PlayAlert()
                end
            end
    
        elseif event == "COMBAT_LOG_EVENT_UNFILTERED" then
        local timestamp, subevent, _, sourceGUID, sourceName, sourceFlags = ...
    
        if not sourceName or detected[sourceName] then return end
        if not IsEnemyPlayer(sourceFlags) then return end
    
        -- Only announce if WoW has unit data exposed
        if UnitExists(sourceName) then
            Announce(sourceName)
        end
    end
    end)
    --------------------------------------------------
    -- Startup Message
    --------------------------------------------------
    
    print("|cffff0000GnomeSpy loaded.|r Type /gnomespy on or /gnomespy off")
    Place both .toc and .lua files in GnomeSpy folder you made earlier and thats it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •