Simple Loot

redsea

Active Member
This is a trivial script, all I want it to do is 'Loot All' when the window comes up.

Code:
function main()
{
	do
	{
		if ${LootWindow(exists)}
		{
			LootWindow:LootAll
		}
		waitframe
	}
	while ${ISXEQ2(exists)}
}
I'm going back to alot of the grey areas to finish my LnL parts. There would be a dozen bodies on the ground and I hate clicking 'Loot All'. I just want the script to accept the loot.

What happens is, it works fine for the first few bodies or so, then it no longer clicks. The window stays up. I check to make sure the script is still running, it is. Everything seems simple enough right? I'm probably just missing something simple. I have tried LootWindow:RequestAll as well.

What would be ideal, which I can probably add later is to check if I'm in combat, if not, start looting bodies off the ground. But it's not really that big a deal.
 

kumpel100

Active Member
is a copy / paste from "a6patch"




Code:
function main()
{
   announce "AutoLoot" 6.66 1
   eq2echo **AutoLoot 6.66 is now running!

   do
   {
      wait 10
      call DoLoots
      ;echo ${Mouse}
   }
   while 1
}

function DoLoots()
{
    ; CORPSE FIRST
   if "${Actor[corpse](exists)} && ${Actor[corpse].Distance} <= 10"
   {
      Actor[corpse]:DoubleClick
      wait 10
      allitems:set[${LootWindow.NumItems}]
      do
      {
         LootWindow:LootItem[${LootWindow.Item[1].ID}] 
         wait 5
      }
      while ${allitems:dec}>=1
   } 
   
   ; Chest next
   
   if "${Actor[treasure](exists)} && ${Actor[treasure].Distance} <= 10"
   {
      Actor[treasure]:DoubleClick
      wait 10
      allitems:set[${LootWindow.NumItems}]
      do
      {
         LootWindow:LootItem[${LootWindow.Item[1].ID}] 
         wait 5
      }
      while ${allitems:dec}>=1
   }
}

;================================================
function atexit()
{
   eq2echo Ending AutoLoot
}
 
Top Bottom