Page 2 of 2

Posted: Mon Jun 18, 2007 2:59 am
by dont_know_at_all
I can't see any reason it would work. What happens if /target isn't done instantly (because it isn't)?

Posted: Mon Jun 18, 2007 8:22 am
by mrwhionyx
I was under the imprestion that the 2nd macro would target npc corpse, open loot window, then loot all the items off a corpse, close window. As long as it was in the 120 range, and there was a corpse on the ground, it would not matter if it was a fresh kill or one that had been sitting.

Here is my problem, I cast a few AoE DD on about 20 mobs and kill them outright. Now, looting them is a problem. /target npc corpse has been a saving grace.

So please stop me right here if I'm wrong (Always willing to admit defeat) But this macro was designed to do that, even if you have to run it for each corpse. If not is there anything close to do that? I've tryed to do it myself, after trolling the forums for hours, But have spent a fair few hours getting it wrong. Scapped all works in progress in dissguist.

Posted: Thu Jun 28, 2007 11:13 pm
by noober
I modified the original code to work for me, this loots any corpse(s) near the radius set on nc.

***Edit:Made a change to set the loot radius in the variable of the same name. This macro does not make any checks so beware. ***

Code: Select all

Sub LootCorpses
    /declare nc int local 0
    /declare cslot int local 0
    /declare nitems int local 0
    /declare radius int local 0
    /varset radius 100
    /varset nc ${SpawnCount[los corpse radius ${radius}]}
    /if (!${nc}) /return
    /delay 1s
    /hidecorpses none
:lootit
    /target corpse
    :movetocorpse
    /if (${Math.Distance[${Me.Y},${Me.X}:${Target.Y},${Target.X}]}>6) {
        /face fast nolook
        /keypress forward hold
        /goto :movetocorpse
    }
    /keypress forward
    /face fast nolook
    /loot
    /if (${Corpse.Open}) {
        /delay 1s
        /if (${Corpse.Items}) {
            /varset nitems ${Corpse.Items}
            /for cslot 1 to ${nitems}
                /delay 1s
                /echo Corpse has ${nitems} items left
                /echo Looting slot ${cslot}
                /itemnotify Loot${cslot} leftmouseup 
                /delay 1s 
                /if (${Window[ConfirmationDialogBox].Open}) { 
                    /notify ConfirmationDialogBox Yes_Button leftmouseup 
                    /delay 1s 
                }
                /autoinventory
                /delay 1s
            /next cslot
        }
        /notify LootWnd DoneButton leftmouseup
    }
    /if (${SpawnCount[los corpse radius ${radius}]}) /goto :lootit
/return