Elitist Jerks
Register
Blogs
Forums


Go Back   Elitist Jerks » Public Discussion » User Interface and AddOns

Reply
 
LinkBack Thread Tools
Old 11/26/07, 1:18 PM   #1
Astrylian
Rawr
 
Astrylian's Avatar
 
Night Elf Monk
 
Stormrage
Script for Rapidly Marking Targets

I looked around and couldn't find an addon that satisfied my needs in marking targets, so I wrote a script for it myself. I figure that more people may be interested in this, so here it is... It probably wouldn't be too hard to turn it into a decent addon, with the mark order graphically customizable, and a feature to use a modifier to reset it or something... But whatever, that's up to you, anyone is free to make an addon from this, just credit me on it, and let me know if you do.


I've got a small addon that I toss scripts in, so it's in that, but you could add it to any addon's .lua file:

lastMark = 0;
currentMarkIndex = 0;
AstrylMarks = {8, 4, 3, 6, 0}; --My guild's normal kill order is skull, triangle, diamond, and square is the normal sheep target
function Astryl_Mark()
  if (UnitExists('mouseover')) then
    if ((GetTime() > lastMark + 5) or (currentMarkIndex >= table.getn(AstrylMarks))) then
      currentMarkIndex = 0;
    end
    lastMark = GetTime();
    currentMarkIndex = currentMarkIndex + 1;
    SetRaidTarget('mouseover', AstrylMarks[currentMarkIndex]);
  end
end
You can change the contents of AstrylMarks at runtime during the instance to whatever marks you will typically be using. In my default case, my guild typically kills Skull, then Triangle, then Diamond, then Square (sheeped). So, my defauly AstrylMarks is {8, 4, 3, 6, 0}, the numbers associated with each of those marks (and 0 is no mark), but I can change AstrylMarks at any time, usually at the beginning of a run to match what tank targets I'll need, and what CCs I have available.

Anyway, how it works: Make a macro, /script Astryl_Mark(), and drop that on a bar somewhere, or use some other addon to bind that to a key, or whatever. Somehow, make it activate that macro via a keypress. I use the ` key. Then, when you come to a pack of mobs, hover your cursor over the first mob (no need to target it), hit the key, move to the 2nd mob, hit the key, etc. Just move your cursor over the mobs in the order you want to mark them, and tap the key. It'll cycle through the marks in AstrylMarks, and then start over. It'll also start over if you haven't marked anything within 5 sec (ie, for the next pack of mobs).

It's not perfect, but figured someone could make use of it. Enjoy.

Offline
Reply With Quote
Old 11/26/07, 1:52 PM   #2
Erzy
Von Kaiser
 
Blood Elf Paladin
 
Dentarg (EU)
Looks really nice. Although I'm not a raidleader myself, I could always suggest this to my raidleaders and see if they want it.

Offline
Reply With Quote
Old 11/26/07, 2:33 PM   #3
Modhne
Von Kaiser
 
Tauren Paladin
 
Mal'Ganis
I'm not sure if this is a discussion on how to speed up marking targets or just a macro you made, so if my post is useless go ahead and delete it, but I've been using Simple Raid Target Icons found here: WoWInterface Downloads : Simple Raid Target Icons
Double click brings up a circular portrait of the mob with the 8 raid icons surrounding it. Click on one and it gets marked. There are other triggers but I haven't customized it further since it already made my marking time in SSC go down substantially.

Offline
Reply With Quote
Old 11/26/07, 2:43 PM   #4
Astrylian
Rawr
 
Astrylian's Avatar
 
Night Elf Monk
 
Stormrage
Right, and that takes a double click, a mouse movement, and a click, for each mob, a total of 8 mouse movements and 12 clicks to mark 4 mobs, whereas my solution takes 4 mouse movements and 4 keypresses.

Offline
Reply With Quote
Old 11/26/07, 2:51 PM   #5
Endahl
Piston Honda
 
Endahl's Avatar
 
Draenei Priest
 
Nordrassil (EU)
If you're just interested in the amount of user interface actions, yes. But the solutions aren't really mutually exclusive. Your script solution is faster for repetitive and mechanical marking of mob packs, but the mod allows some flexibility for re-marking and changing things on the fly. No real reason you couldn't use both.

As an aside, SRTI doesn't require a double click to bring up the menu ring. You can use a modified click or a keybinding. I have my mouse button 5 set to it.

Offline
Reply With Quote
Old 11/26/07, 3:18 PM   #6
Astrylian
Rawr
 
Astrylian's Avatar
 
Night Elf Monk
 
Stormrage
Aye, quite true. I found that 90% of my marking was the same symbols over and over, in the same/similar sequence, so made this script to automate that 90%.

Offline
Reply With Quote
Old 11/26/07, 3:49 PM   #7
Baloril
Von Kaiser
 
Baloril's Avatar
 
Dwarf Death Knight
 
Proudmoore
I just bound the various raid target icons to my F1-F8 keys, because I don't need them for anything else, which makes it easy to assign arbitrary targets in the middle of a fight or in other situations where targets need to be marked quickly. It works quite well.

Offline
Reply With Quote
Old 11/26/07, 3:58 PM   #8
Astrylian
Rawr
 
Astrylian's Avatar
 
Night Elf Monk
 
Stormrage
Aye, that works quite well for those who have 8 spare keybindings.

Offline
Reply With Quote
Old 11/26/07, 4:20 PM   #9
Modhne
Von Kaiser
 
Tauren Paladin
 
Mal'Ganis
Originally Posted by Astrylian View Post
Right, and that takes a double click, a mouse movement, and a click, for each mob, a total of 8 mouse movements and 12 clicks to mark 4 mobs, whereas my solution takes 4 mouse movements and 4 keypresses.
True, but I know for a fact that I'll mismark at least once every 3-4 pulls on one mob which makes me have to go back and use the normal marking features or reset the macro. With STRI I can just remark the one mob, not the entire pack. The packs of Broken in SSC are horrible to mark, especially the first group after Lurker near the console.

And to the people who have 8 extra keybindings laying around, I am jealous.

Offline
Reply With Quote
Old 11/26/07, 4:43 PM   #10
chase
Piston Honda
 
Dwarf Priest
 
Malygos
Originally Posted by Modhne View Post

And to the people who have 8 extra keybindings laying around, I am jealous.
At least 104 keys on your keyboard. You have shift/alt/ctrl modifers.

The only keybindings I "run out of" are ones that are easy/comfortable to reach. This is for something done out of combat with no real rush, so it does not really need to be comfortable or in easy reach.

Doesn't take away from the utility of the script. Personally I'm used to using my numpad to mark targets and that can all be done in the standard keybinding menu.

Last edited by chase : 11/26/07 at 5:01 PM.

Offline
Reply With Quote
Old 11/26/07, 5:09 PM   #11
mutagen
Don Flamenco
 
mutagen's Avatar
 
Dwarf Priest
 
Proudmoore
Originally Posted by Modhne View Post
And to the people who have 8 extra keybindings laying around, I am jealous.
I bound mine to CTRL-Numpad 1-8 (9 clears the raid mark). This was easier when I could extend the tab range and just tab through and hotkey the marks up on the mobs but even now it isn't hard to put them up.

Offline
Reply With Quote
Old 11/26/07, 11:53 PM   #12
Axelrod
Von Kaiser
 
Troll Hunter
 
Mannoroth
There was an addon I used to use (forget what it was called) pre-BC where I'd hit one key, then slide my mouse over the mobs one by one and it would mark them sequentially. If we were in the middle of a fight and some marking needed to be done, I'd hit the same key and just scribble my mouse all over the screen and it would mark them all. It was my favorite raid marking addon because it was so quick and easy (especially in AQ and Naxx where mobs all stood in a line), but you'd have to have patience in sliding your mouse in the correct order if you want to mark them in a certain order.

Offline
Reply With Quote
Old 11/27/07, 11:59 AM   #13
Revv
Glass Joe
 
Orc Hunter
 
Destromath
Being a non-healer, I also bind my raid symbols to F2-F9 (F1 was already doing something else before Blizzard gave us raid symbols).

I wrote my own mod to mouse over and paint multiple targets. Here it is for those interested. (Note, it's part of a small group of tools I use, and I pulled only the target painting code out of the mod, my apologies if this doesn't work out of the box.)

/pt begins or toggles the painting of targets. After 7 seconds, it stops checking for new targets.

RaidTools = AceLibrary("AceAddon-2.0"):new("AceConsole-2.0", "AceEvent-2.0")

local paintRaidSymbolId = 1

function RaidTools:OnInitialize()
    -- Paint targets with raid icons; /pt
    self:RegisterChatCommand({"/pt"}, {
        type = "execute",
        name = "paint targets with raid icons",
        desc = "Mouse over enemy mobs, and place a raid target on each.",
        func = "paintTargets",
    })
end

function RaidTools:UPDATE_MOUSEOVER_UNIT()
    -- Handle painting.
    if self:IsEventScheduled("Stop Painting") == true then
        if (not UnitExists("mouseover")) or (not UnitIsEnemy("player", "mouseover")) or
          UnitIsCorpse("mouseover") or UnitPlayerControlled("mouseover") then
            return      -- Not a valid target to paint.
        end

        local raidIconId = GetRaidTargetIndex("mouseover")

        if raidIconId and (raidIconId > 0) then
            return      -- Target has a raid icon set already.
        end

        SetRaidTarget("mouseover", paintRaidSymbolId)

        paintRaidSymbolId = paintRaidSymbolId + 1

        if paintRaidSymbolId > 8 then
            paintRaidSymbolId = 1
        end
    end

    return
end

function RaidTools:stopPainting()
    RaidTools:UnregisterEvent("UPDATE_MOUSEOVER_UNIT")

    UIErrorsFrame:AddMessage("--- Done Painting Targets ---", 1, 1, 1, 1, UIERRORS_HOLD_TIME)

    return
end

function RaidTools:paintTargets()
    if RaidTools:IsEventScheduled("Stop Painting") == true then
        -- Turn off painting.
        RaidTools:CancelScheduledEvent("Stop Painting")
        RaidTools:stopPainting()
        return
    end

    paintRaidSymbolId = 1

    -- Register the mouseover event, if we haven't already.
    if RaidTools:IsEventRegistered("UPDATE_MOUSEOVER_UNIT") == false then
        RaidTools:RegisterEvent("UPDATE_MOUSEOVER_UNIT")
    end

    UIErrorsFrame:AddMessage("--- Begin Painting Targets ---", 1, 1, 1, 1, UIERRORS_HOLD_TIME)

    -- Start the timer to end the painting.  (7 seconds)
    RaidTools:ScheduleEvent("Stop Painting", RaidTools.stopPainting, 7)

    return
end

Offline
Reply With Quote
Old 11/29/07, 11:55 PM   #14
Calantus
Custom User Title
 
Calantus's Avatar
 
Dwarf Paladin
 
Frostmourne
nvm

Offline
Reply With Quote
Old 11/30/07, 6:32 AM   #15
Tehehe
Von Kaiser
 
Tehehe's Avatar
 
Gnome Warlock
 
Black Dragonflight
The following macro has been invaluable to me over the past couple months of raid leading, it really speeds things up.

/script local ri = 8; if GetRaidTargetIndex("mouseover") ~= ri then SetRaidTarget("mouseover",ri) else SetRaidTarget("mouseover",0) end
It will place a skull on the mouseover target, if there is already a skull, it will remove it. I have 8 of these macros, one for each icon.

Offline
Reply With Quote
Reply

Go Back   Elitist Jerks » Public Discussion » User Interface and AddOns

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Perfect Targets update/replacement? Melador User Interface and AddOns 19 03/06/08 12:27 PM
Party Targets Kiklion User Interface and AddOns 9 06/15/07 4:29 AM
Recoloring the minimap targets to class colors. Lust Public Discussion 7 02/16/07 2:53 AM
Patchwerks: Hateful strike targets Celest Public Discussion 14 07/15/06 7:22 AM