-
[Minor] Safely get alerted when a unit spawns in a predictable location
Not so much an exploit, but probably not intended this way. This addon is a simple mouseover script to check for a particular unit name. I'm posting this because it's a safe way of camping a unit and gives you a better reaction time without having to look over your shoulder constantly. You could send messages to the client or use a keyboard macro to not be limited to a mouseover, but that could get you banned for automation. Something like Rarescanner will detect spawns based on the icon showing up on your map, but this attached addon works for any unit and not just rares. Obviously, it works best for units that are idle or walk in predictable locations. I recommend running this on an alternate PC preferably a nearby laptop since the mouse needs to stay in place.
I searched OC for similar stuff, but mainly just found outdated scanners or targeting macro type things. To use, enter the unit's name and it will alert you with a popup and sound.
UD.jpg
UnitDetector.zip
addon.lua
Code:
local run = false
local playSound = false
local ticker = nil
local TICK_RATE = 0.1
local initialized = false
local targetUnit = ""
function reset()
playSound = false
end
function unitFound()
return UnitExists('mouseover') and UnitName('mouseover') == targetUnit and not UnitIsDead('mouseover')
end
function checkUnit()
if not run then
return
end
if initialized and not playSound and unitFound() then
playSound=true
PlaySound(SOUNDKIT.UI_RAID_BOSS_WHISPER_WARNING)
StaticPopup_Show("RD_UNIT_RESET")
end
end
StaticPopupDialogs["RD_UNIT_INPUT"] = {
text = "Enter the unit's name",
button1 = "Confirm",
button2 = "Cancel",
OnShow = function (self, data)
self.editBox:SetText("")
end,
OnAccept = function (self)
run = true
local input = self.editBox:GetText()
targetUnit = input
initialized = true
C_Timer.NewTicker(TICK_RATE, checkUnit)
end,
hasEditBox = true,
OnCancel = function (self)
run = false
print('Scanner stopped.')
end,
timeout = 0,
whileDead = true,
hideOnEscape = true,
preferredIndex = 3, -- avoid some UI taint, see http://www.wowace.com/announcements/how-to-avoid-some-ui-taint/
}
StaticPopupDialogs["RD_UNIT_RESET"] = {
text = "Unit found! Click 'Ok' to reset the scanner",
button1 = "Ok",
button2 = "Cancel",
OnShow = function (self, data)
self.editBox:SetText("")
end,
OnAccept = function (self)
C_Timer.After(2.0, reset)
end,
OnCancel = function (self)
run = false
print('Scanner stopped.')
end,
timeout = 0,
whileDead = true,
hideOnEscape = true,
preferredIndex = 3, -- avoid some UI taint, see http://www.wowace.com/announcements/how-to-avoid-some-ui-taint/
}
StaticPopup_Show("RD_UNIT_INPUT")
print('UnitDetector loaded successfully')
edit: The addon will just auto-load and it's still running in the background if you click cancel, just not alerting you. So edit the code with ticker::cancel or disable the addon if you care about those precious cpu cycles.
Last edited by GlittPrizes; 08-06-2020 at 03:41 PM.
Reason: blip
-
Post Thanks / Like - 4 Thanks
-
Member
Thanks for sharing, but how can i run this addon on bfa? i have already unzipped the addon into my addons folder
-
Originally Posted by
Kellerbier1991
Thanks for sharing, but how can i run this addon on bfa? i have already unzipped the addon into my addons folder
It should work as long as you have the addon enabled. I've been away from WoW, but when I was using this I just had to drop it in the addons folder. Make sure the game is closed the first time you add the addon. Let me know if that helps.
-
Contributor
What's the advantage of using this over the SilverDragon addon? SD can detect mobs instantly via mouseover, target, vignette (minimap icon), or nameplates and all it requires you to do is add the mob's ID to the custom list, if it's not already provided.
The one exception are Voidtalon portals, which can't be detected by anything other than mouseover, but for just a single instance, a macro is fine.
I'm just curious as to why I'd ever use this. Is there something I'm not thinking of?
-
Originally Posted by
Limes
What's the advantage of using this over the SilverDragon addon? SD can detect mobs instantly via mouseover, target, vignette (minimap icon), or nameplates and all it requires you to do is add the mob's ID to the custom list, if it's not already provided.
The one exception are Voidtalon portals, which can't be detected by anything other than mouseover, but for just a single instance, a macro is fine.
I'm just curious as to why I'd ever use this. Is there something I'm not thinking of?
Thanks for providing that name I would have just used that, but I made the above because I couldn't find anything for mouseovers. That addon is probably more robust, this one was just to fulfill a simple need. Probably the best use of it is just an example of what can be done for writing a custom addon that uses dialogs since its a short use case.
-
Active Member
look same as npcscan and rarescanner . What diff?
-
Legendary
Originally Posted by
delkin
look same as npcscan and rarescanner . What diff?
Did you read the post?
"Something like Rarescanner will detect spawns based on the icon showing up on your map, but this attached addon works for any unit and not just rares."
-
Active Member
Originally Posted by
jimmys96
Did you read the post?
"Something like Rarescanner will detect spawns based on the icon showing up on your map, but this attached addon works for any unit and not just rares."
npcscan alarm by mouseover too and allow adding custom npc, i using it for some npcs and 1 lvl critter in nazjatar and mechagon.
and fixing npcscan if it not works easy:
\World of Warcraft\_retail_\Interface\addons\NPCScan\Preferences\
Start at line 108 in alerts.lua
Replace the sound lines with this:
LibSharedMedia:Register("sound", "NPCScan Killed", 567394) -- Sound\Interface\RaidBossWarning.ogg
LibSharedMedia:Register("sound", "NPCScan Chimes", 1489461) -- Sound\Interface\UI_Legendary_Item_Toast.ogg
LibSharedMedia:Register("sound", "NPCScan Gruntling Horn", 598196) -- Sound\Events\gruntling_horn_bb.ogg
LibSharedMedia:Register("sound", "NPCScan Ogre War Drums", 567275) -- Sound\Event Sounds\Event_wardrum_ogre.ogg
LibSharedMedia:Register("sound", "NPCScan Scourge Horn", 567386) -- Sound\Events\scourge_horn.ogg