Public Macros AE Loot mac
Reply
AE Loot mac
I am looking around for an AE Loot macro. My butt is getting real broke from muramite armor upgrades. I would like to see a feature in it to filter by selling price of the item and stackable. Is there a way to trigger off these two compares?
Mon Jan 12, 2015 6:54 am
Listen to This Guy
What do you mean by "filter by?"

MQ2 has access to stackablility and sell price so it should be doable.

What's your current loot macro/include?
Mon Jan 12, 2015 11:50 pm
Senior Project Member
I think he means he wants to ignore the 2 sp items and decide what items (of higher value) to include in his auto loot routine. I have an old ninja loot macro that allows for that but it's borked and never really worked well to begin with.

I'll post it here if needed.
Tue Jan 13, 2015 12:26 am
I have NinjaLoot 1.2 and Autoloot 1.2 but havnt played with them.
I am also looking at the MQ2 Documentation for item.

I want to keep items that are stackable and have a price higher than 3pp.
It looks like I will have to use bool Stackable and int SellPrice.

This is what I have. It is work in progress.
Macro
More +

| loots all items in a radius

#turbo

Sub Main


:Mainloop
/call LootCorpses
/delay 1s

/goto :Mainloop





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 6
        /if (${Corpse.Items}) {
            /varset nitems ${Corpse.Items}
            /for cslot 1 to ${nitems}
                /delay 6
                /echo Corpse has ${nitems} items left
                /echo Looting slot ${cslot}
                /itemnotify Loot${cslot} leftmouseup
                /delay 6
                   
                /if (${Window[ConfirmationDialogBox].Open}) {
                    /notify ConfirmationDialogBox yes_Button leftmouseup
                    /delay 6
                 
                }

                |||| auto invnentory or destroy here ||||

                /destroy
                |/autoinventory
                /delay 6
            /next cslot
        }
        /notify LootWnd DoneButton leftmouseup
    }
    /if (${SpawnCount[los corpse radius ${radius}]}) /goto :lootit
/return











/return
/endmacro





Tue Jan 13, 2015 7:44 am
Listen to This Guy
I'd use NinjaLoot based subroutine(s) and add to it.

For the "filter by" parts, I'd add a snippit that checks corpse' items for those criteria you mentioned. If an item passes, the new snippit will either update Loot.ini automatically or it will tell your macro to loot the item anyway (without writing to an ini). You get the benefit of a pre-written, pre-tested and pre-approved looting macro without having to write item after item after item in an ini.

Macro
More +


| rough draft - I'd add a few more logic checks in the final version

/declare somenumber int local ${Ini[Loot.ini,Settings,LootAnywayPrice]}
   | make sure to add LootAnywayPrice to your ini
/if (${Corpse.Item[${i}].Stackable} && ${Corpse.Item[${i}].SellPrice} > ${somenumber}) {
   | add the item to your ini file with the sell parameter if it's not already set for Keep or Sell
   /if (${Ini[Loot.ini,${Corpse.Item[${i}].Name.Left[1]},${Corpse.Item[${i}].Name}].NotEqual[Sell]} && ${Ini[Loot.ini,${Corpse.Item[${i}].Name.Left[1]},${Corpse.Item[${i}].Name}].NotEqual[Keep]}) {
      /ini "Loot.ini" "${Corpse.Item[${i}].Name.Left[1]}" "${Corpse.Item[${i}].Name}" Sell
   }
}
/varset CurrIni ${Ini["${LootIni}","${Corpse.Item[${i}].Name.Left[1]}","${CurrentItem}"]}


or...

Macro
More +


| rough draft - I'd add a few more logic checks in the final version

/varset CurrIni ${Ini["${LootIni}","${Corpse.Item[${i}].Name.Left[1]}","${CurrentItem}"]}
/declare somenumber int local ${Ini[Loot.ini,Settings,LootAnywayPrice]}
   | make sure to add LootAnywayPrice to your ini
/if (${Corpse.Item[${i}].Stackable} && ${Corpse.Item[${i}].SellPrice} > ${somenumber}) {
   /if (${CurrIni.NotEqual[Keep]} && ${CurrIni.NotEqual[Sell]}) {
      /varset CurrIni Sell
   }
}



My loot macro (modloot.inc from ModBot - it's NinjaLoot based) has a line:
/varset CurrIni ${Ini["${LootIni}","${Corpse.Item[${i}].Name.Left[1]}","${CurrentItem}"]}

Just a few lines added before or after that line will create a rules based approach.

The first snippit adds items to Loot.ini with the Sell parameter (since you want to sell them) unless the item is already marked as Keep. Then the macro will look for the appropriate entry, which you conveniently just created. This is the method I'd use since those items will automatically be sold to a vendor when you issue the sell command.

The second snippit won't change Loot.ini but it will tell the macro to proceed as if it's flagged to Sell. It won't automatically sell the item for you later, but it will loot stuff without clogging up Loot.ini.
Tue Jan 13, 2015 7:32 pm
Senior Project Member
Thanks! I will see what I can do with this. May not have time to work on it until next week.
Wed Jan 14, 2015 2:53 pm
Listen to This Guy
instead of
Macro
More +
/echo ${Corpse.Item[1].SellPrice}


it needs to be
Macro
More +
/echo ${Corpse.Item[1].Value}
Thu Jan 22, 2015 2:53 pm
Listen to This Guy
Macro
More +
| loots all items in a radius
| 1500 = 1.5pp


#turbo
Sub Main
/declare MinPrice int outer 1499
/declare NonStackMinPrice int outer 34000

/echo STARTING RADIUS LOOT

:Mainloop
/call LootCorpses
/target ID ${Me.ID}
/delay 1s
/goto :Mainloop

Sub LootCorpses
    /declare nc int local 0
    /declare cslot int local 0
    /declare nitems int local 0
    /declare radius int local 0
    /varset radius 60
    /varset nc ${SpawnCount[los corpse radius ${radius}]}
    /if (!${nc}) /return
    /delay 1s
    /hidecorpses none
:lootit
    /target corpse
        /delay 7
        /if (${Target.ID} == NULL) {
                /goto :lootit
        }
               
    :movetocorpse
    /if (${Math.Distance[${Me.Y},${Me.X}:${Target.Y},${Target.X}]}>6) {
        /face fast nolook
        /keypress forward hold
        /goto :movetocorpse
    }
        /delay 2
    /keypress forward
    /face fast nolook
    /loot
    /if (${Corpse.Open}) {
        /delay 7
        /if (${Corpse.Items}) {
            /varset nitems ${Corpse.Items}
            /for cslot 1 to ${nitems}
                /delay 3
                /echo Corpse has ${nitems} items left
                                /echo Looting slot ${cslot}
                                /itemnotify loot${cslot} leftmouseup
                                /delay 7
                               
                                /if (${Window[ConfirmationDialogBox].Open}) {
                                        /notify ConfirmationDialogBox Yes_Button leftmouseup
                                        /delay 7
                                }
                               
                                ||Destroy NoDrops
                                /if (${Cursor.NoDrop}) {
                                        /delay 7
                                        /destroy
                                        /if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox Yes_Button leftmouseup
                                        /delay 7
                                }
                                ||Destroy Lores
                                /if (${Cursor.Lore}) {
                                        /delay 7
                                        /destroy
                                        /if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox Yes_Button leftmouseup
                                        /delay 7
                                }
                                ||Keep Stackable and min price items
                                /if (${Cursor.Stackable} && ${Cursor.Value} > ${MinPrice} ) {
                                        /delay 7
                                        /call InventoryCheck
                                        /autoinventory
                                        /if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox Yes_Button leftmouseup
                                        /delay 7
                                }
                                ||Keep Not Stackable and new min price items
                                /if (!${Cursor.Stackable} && ${Cursor.Value} > ${NonStackMinPrice} ) {
                                        /delay 7
                                        /call InventoryCheck
                                        /autoinventory
                                        /if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox Yes_Button leftmouseup
                                        /delay 7
                                }
                                ||Destroy what ever is on it
                                /if (${Cursor.ID}) {
                                        /delay 7
                                        /destroy
                                        /if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox Yes_Button leftmouseup
                                        /delay 7
                                }
            /next cslot
        }
        /notify LootWnd DoneButton leftmouseup
                /delay 15
    }
    /if (${SpawnCount[los corpse radius ${radius}]}) /goto :lootit
/return

Sub InventoryCheck
|- Check for full inventory
    /if (!${Me.FreeInventory}) {
      /beep
          /delay 5
          /beep
          /delay 5
          /beep
          /delay 5
      /bca Autoloot:  ** INVENTORY FULL !
      /bca Autoloot:  ** AutoLooting is now OFF!
          /destroy
          /delay 5
          /notify LootWnd DoneButton leftmouseup
          /delay 5
      /endmacro
    }
/return
       
/return
/endmacro





Thu Jan 22, 2015 8:57 pm
Listen to This Guy
Public Macros AE Loot mac
Reply