Do we have a good loot macro?

Trila

New member
Joined
Feb 11, 2009
Messages
178
Reaction score
0
Points
0
Just looking for something that will loot all the bodies around me when I tell it to.

I usually have 30 or so bodies around me when I am ready to loot and when I press the key I would like it to loot them all without using WARPS or other bad things that can get me banned easily.

Would also like it to loot and destroy garbage so the bodies are cleaned up and gone.

Do we have anything like this?
 
Just looking for something that will loot all the bodies around me when I tell it to.

I usually have 30 or so bodies around me when I am ready to loot and when I press the key I would like it to loot them all without using WARPS or other bad things that can get me banned easily.

Would also like it to loot and destroy garbage so the bodies are cleaned up and gone.

Do we have anything like this?

I do have a good one that is almost ready - it uses mq2advloot which is passive only using my Mac.

Will post it when I get home with a request for help with the small amount of code I am having trouble getting to work (echos amount of actual play looted just or something funky) but it loots perfectly.
 
Never mind I think I got everything I wanted to work, to work!

So it will not only loot, but it will use MQ2AdvLoot (WIKI With instructions and details HERE) which is awesome and allows a INI (example below), that will allow you to Keep (loot), ignore (not loot) or Destroy (loot and destroy obviously).

Not only that, but it will auto load the Plugin for you if it is not already, count the number of corpses you have looted and also tell you how much cash Plat you have looted!

Let me know what you think.

Code:
[Settings]
AllowWarp=False
AllowStealth=False
EchoDestroy=True
EchoKeep=True
EchoLootMSG=True
EchoLoreMSG=True
ItemsDelay=150
CorpseOpenDelay=500
MinValue=0
DefaultAction=Keep
MinValueDefaultAction=Ignore
NoDrop=True
MustStack=False
IgnoreDuplicateLoreCorpse=True

[Items]
Section of Wolf Pancreas=Destroy
Versluierd Fungus=Ignore
Low Quality Wolf Skin=Keep

Loot.mac
Code:
Sub Main

/declare StartPlat int outer ${Me.Platinum}
/declare StartGold int outer ${Me.Gold}
/declare Corpse_Count	int 	outer

/varset Corpse_Count	0

/if (!${Plugin[MQ2AdvLoot].Name.Equal[MQ2AdvLoot]}) {
    /squelch /plugin MQ2AdvLoot load
    /delay 1s
    /if (!${Plugin[MQ2AdvLoot].Name.Equal[MQ2AdvLoot]}) {
        /beep
	/echo Unable to load MQ2AdvLoot, Loot.Mac cannot function
    }
}
	/hidecorpse looted
	/call Loot
/return

Sub Loot
	/if (${Me.State.Equal[Sit]}) /stand
	/if (${SpawnCount[npccorpse los radius 100]} < 1) {
	/echo ${Corpse_Count} Corpses were looted including a total off of ${Math.Calc[${Me.Platinum} - ${StartPlat}].Int} plat!
/end
}
	/delay 1s
	/tar npccorpse radius 100
	/delay 1s
	/face
	/delay 1s
	/moveto ID
:MoveLoop
	/if (${Target.Distance} > 10) {
	/delay 1s
	/goto :MoveLoop
}
	/advloot
	/delay 2
:loot
	/delay 2
	/if (${AdvLoot.Active}) /goto :loot
	/varcalc Corpse_Count (${Corpse_Count}+1)
	/call Loot
/return
 
Last edited:
Nice. Been looking for a loot macro for when I PL. I'll try it out and let you know how it goes.
 
I can't wait to try it out.

Thank you for sharing it.
 
Could loot a little faster. Seems to have a pause in there somewhere. I'll take a look at the code later and take it out for myself and see what happens. Otherwise, seems to work well so far.
 
Code:
sub main



/declare RT_MyXLOC          int outer	${Me.X} 
	/declare RT_MyyLOC          int outer	${Me.Y}
	/declare MyHeading         	int outer 	${Me.Heading.DegreesCCW}


/BC Looting all these corpses
/if (${SpawnCount[npc corpse radius 100]}) /call corpse
/call MoveToLoc ${RT_MyyLOC} ${RT_MyXLOC}
/if (${SpawnCount[npc corpse radius 100]}==0) /endm
/return



sub corpse
/hidecorpse looted
:corpseloop
/if (${SpawnCount[npc corpse radius 100]}>0) {
		/target ${NearestSpawn[corpse]}
		/delay 5
		/moveto ID
		/delay 30s !${Me.Moving}
		/delay 5
		/advloot
		/delay 10s !${Corpse.Open}
		/delay 5
		}
/if (${SpawnCount[npc corpse radius 100]}==0) /return
/goto :corpseloop
/return


Sub MoveToLoc(MoveToY, MoveToX) 
   /declare running int local 
   /declare distanceNow float local 
   /declare distanceBefore float local 
   /declare distanceModifier int local 
   /declare distanceTimer timer 15 
   /varset running 0 
   /varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
   /varset distanceModifier 1 
   /echo Moving to Location: ${MoveToY}, ${MoveToX}. 
   /echo Distance: ${distanceBefore} 
   :moveToLocation  
      /face fast nolook loc ${MoveToY},${MoveToX} 
      /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<10) { 
         /keypress forward 
         /return 
      } 
      /if (${distanceTimer}==0) { 
         /if (${Me.Sneaking}) { 
            /varset distanceModifier 2 
         } else { 
            /varset distanceModifier 1 
         } 
         /varset distanceNow ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
         /if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]}) { 
         /call HitObstacle 
         } 
         /varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
         /varset distanceTimer 15 
      } 
      /if (${running}==0) { 
         /keypress forward 
            /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}>10) { 
               /varset running 1 
               /keypress forward hold 
            } 
      } else { 
         /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<11) { 
            /varset running 0 
            /keypress forward 
         } 
      } 
      /goto :moveToLocation 
/return

one i wrote up that will loot all within a radius of 100 using mq2advloot parameters you have set.
 
Could loot a little faster. Seems to have a pause in there somewhere. I'll take a look at the code later and take it out for myself and see what happens. Otherwise, seems to work well so far.

Yes there is delays in there for latency, just reduce or remove some of the delays to speed it up. Also it isn't just looting everything it is using the INI to destroy, loot or leave. So it does pause for a split second while deciding what to loot, or to loot and destroy.

If you just wanted a loot everything, you could use a different macro to do that but then you will spend the time later deleting the junk you don't want, plus your bags will fill up quicker...
 
isnt MQ2AdvLoot on the very red Active/High risk list of stuff that guaranteed to get you caught?
so wont any macro tht uses MQ2AdvLoot be the same high risk?
 
isnt MQ2AdvLoot on the very red Active/High risk list of stuff that guaranteed to get you caught?
so wont any macro tht uses MQ2AdvLoot be the same high risk?

MQ2AdvLoot is a plugin that facilitates the looting of corpses including INI support fro what to loot/ignore/destroy and some of the commands will warp/stealth (which are the big ones that will get you banned) IF (and only if) you have warp/stealth enabled.

If you don't have those enabled it is passive and really only automates the looting of a corpse that you are near enough to loot in the first place - hence the need for a macro to do the rest for you (target a nearby corpse, move to it and loot).
 
Simple MQ2Navigation looter

Here is a simple loot mac I made a little while ago to clean up some mobs with MQ2Navigation and MQ2Advloot. It is very crude and works well if your not near others. Change "YourOtherCharacterName" or add a waypoint for your toon to move back to after looting. Character will run around looting all corpse in 200 radius, if no mobs move back to group wait 20 seconds, rinse and repeat.

Code:
Sub Main

/declare startzone int outer 
/varset startzone ${Zone.ID}

:lootLoop
    /doevents
    /call ZCHECK
	/call GMCHECK
    /if (${SpawnCount[npccorpse radius 200]} > 0) {
        /targ npccorpse radius 200
    /delay 1s
    /nav target
    /delay 5s
    /if (${Target.ID}) {
        /advloot
    }
    /delay 1s
    /goto :lootLoop
    }
    /targ YourOtherCharacterName
    /nav target
    /delay 20s
    /goto :lootLoop

Sub ZCHECK
    /if ( ${Zone.ID} != ${startzone} ) { 
        /gsay I DIED AND IM OUTA HERE
        /end
    }
/return

Sub GMCHECK
    /if (${Spawn[gm].ID}>0) {
        /beep
        /beep
        /beep
        /say crap afk emergency =/
        /afk be back later, house emergency fml
        /end
    }
/return
 
Another Loot macro
This one will only loot things on the ini. It doesn't pick anything else up and it hides the corpses you've looted. It's a rip of Demon's assist loot macro.

loot.mac
Code:
sub main


	/declare RT_MyXLOC           int outer  ${Me.X} 
  	/declare RT_MyyLOC           int outer  ${Me.Y}
	/call ReadINI AssistLoot.ini "${Zone.Name}" Loot 
	   /if (!${Defined[RV_LootArray]}) { 
 	     /echo No Loot Array Created... 
 		  } 
  
/hidecorpse looted
:mainloop
/if (${SpawnCount[npc corpse radius 100]}>0) /call Loot
/if (${SpawnCount[npc corpse radius 100]}==0) /endm
/goto :mainloop
/return


Sub Loot
	/if (${Me.State.Equal[Sit]}) /stand
	/target npccorpse
	/face fast
	/delay 1s
	/moveto ID
	/delay 3s !${Me.Moving}
	   /call Looting
	/delay 1s
        /doevents

/return

Sub Looting
  /declare LootSlot    int inner  0 
  /declare LootCheck   int inner  0 
  /declare LootTotal   int inner  0 
  /declare LootItem    string inner 0
  /keypress forward 
  /keypress back 
  /fastdrop on 
  /lootn never 
  /echo Looting 
  /loot   
  /delay 5
  /doevents
  /if (!${Corpse.Items}) { 
    /echo NO LOOT! Cheap Bastard! 
    /notify LootWnd DoneButton leftmouseup 
    /return 
  } else { 
    /varset LootTotal ${Corpse.Items} 
    /for LootSlot 1 to ${LootTotal} 
      /varset LootItem ${Corpse.Item[${LootSlot}]}
      /delay 5
      /if (${RV_LootAllItems}) { 
        /autoinventory 
        /delay 5
      } else { 
        /for LootCheck 1 to ${RV_LootArray.Size} 
          /if (${LootItem.Find[${RV_LootArray[${LootCheck}]}]}) { 
            /echo Keeping a ${Corpse.Item[${LootSlot}]}... WOOT! 
		/nomodkey /shift /itemnotify ${Corpse.Item[${LootSlot}].InvSlot} leftmouseup 
            /varcalc RV_LootStats[${LootCheck}] ${RV_LootStats[${LootCheck}]}+1 
		/delay 5
            /autoinventory 
            /delay 5
          } 
        /next LootCheck 
      } 
      /if (${Cursor.ID}) { 
        /echo Destroying a ${Cursor.Name}... 
        /destroy 
        /delay 5
      } 
    /next LootSlot 
    /notify LootWnd DoneButton leftmouseup 
  } 
  /return 

Sub ReadINI(FileName,Loot,ArrayType) 
   /echo Attempting to Read Information from ${FileName}... 
   /declare nValues     int local  1 
   /declare nArray      int local  0 
   /declare KeySet      string local  ${Ini[${FileName}]} 
   /if (${Ini[${FileName},Loot,-1,NO].Equal[NO]}) { 
      /echo "${SectionName}" is not a Valid Section for FILE:${FileName}, ending macro... 
      /delay 1s 
      /return 
   } 
   :CounterLoop 
      /if (${String[${Ini[${FileName},Loot,${ArrayType}${nValues}]}].Equal[null]}) { 
         /varcalc nValues ${nValues}-1 
         /goto :MakeArray 
      } 
      /varcalc nValues ${nValues}+1 
      /goto :CounterLoop 
   :MakeArray 
      /if (!${nValues}) /return 
      /if (${FileName.Equal["AssistLoot.ini"]}&&${nValues}>0) { 
         /echo Declaring Loot Array... 
         /declare RV_LootArray[${nValues}]  string outer 
         /declare RV_LootStats[${nValues}]  string outer 
      } 
      /for nArray 1 to ${nValues} 
      /if (${FileName.Equal["AssistLoot.ini"]}) { 
         /varset RV_LootArray[${nArray}] ${Ini[${FileName},Loot,${ArrayType}${nArray}]} 
         /varset RV_LootStats[${nArray}] 0 
      } 
      /next nArray 
      /echo Information Read Successfully from ${FileName}... 
      /delay 1s 
/return 
Sub MoveToLoc(MoveToY, MoveToX) 

   /declare running int local 
   /declare distanceNow float local 
   /declare distanceBefore float local 
   /declare distanceModifier int local 
   /declare distanceTimer timer 15 
   /varset running 0 
   /varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
   /varset distanceModifier 1 
   /echo Moving to Location: ${MoveToY}, ${MoveToX}. 
   /echo Distance: ${distanceBefore} 
   :moveToLocation  

	
      /face fast nolook loc ${MoveToY},${MoveToX} 
      /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<10) { 
         /keypress forward 
         /return 
      } 
      /if (${distanceTimer}==0) { 
         /if (${Me.Sneaking}) { 
            /varset distanceModifier 2 
         } else { 
            /varset distanceModifier 1 
         } 
         /varset distanceNow ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
         /if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]}) { 
         /call HitObstacle 
         } 
         /varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
         /varset distanceTimer 15 
      } 
      /if (${running}==0) { 
         /keypress forward 
            /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}>10) { 
               /varset running 1 
               /keypress forward hold 
            } 
      } else { 
         /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<11) { 
            /varset running 0 
            /keypress forward 
         } 
      } 
	
      /goto :moveToLocation 
/return

Sub MoveToLoc2(MoveToY, MoveToX) 

   /declare running int local 
   /declare distanceNow float local 
   /declare distanceBefore float local 
   /declare distanceModifier int local 
   /declare distanceTimer timer 15 
   /varset running 0 
   /varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
   /varset distanceModifier 1 
   /echo Moving to Location: ${MoveToY}, ${MoveToX}. 
   /echo Distance: ${distanceBefore} 
   :moveToLocation  
      /face fast nolook loc ${MoveToY},${MoveToX} 
      /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<10) { 
         /keypress forward 
         /return 
      } 
      /if (${distanceTimer}==0) { 
         /if (${Me.Sneaking}) { 
            /varset distanceModifier 2 
         } else { 
            /varset distanceModifier 1 
         } 
         /varset distanceNow ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
         /if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]}) { 
         /call HitObstacle 
         } 
         /varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
         /varset distanceTimer 15 
      } 
      /if (${running}==0) { 
         /keypress forward 
            /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}>10) { 
               /varset running 1 
               /keypress forward hold 
            } 
      } else { 
         /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<11) { 
            /varset running 0 
            /keypress forward 
         } 
      } 
	
      /goto :moveToLocation 
/return

Sub HitObstacle
 
   
   /echo Obstacle hit, moving around it... 
   /keypress forward 
   /keypress back hold 
   /delay 3 
   /keypress back 
   /if (${Math.Rand[2]}) { 
      /keypress strafe_right hold 
   } else { 
      /keypress strafe_left hold 
   } 
   /delay 5 
   /keypress strafe_right 
   /keypress strafe_left 
   /keypress forward hold 
/return

Here is a sample assistloot.ini
Code:
[The Dreadlands]
[Loot]
Loot1= Peridot
Loot2= Bone Chips
Loot3= Defiant

It's not the fastest but works with the little testing I did.