Ninjaloot.inc

A forum for macro code snippets to be used in writing other macros. Post routines or .inc files here only, completed macros go to the Macro Depot. MQ2Data format only!

Moderator: MacroQuest Developers

BlackOp
a lesser mummy
a lesser mummy
Posts: 30
Joined: Mon Feb 27, 2006 2:21 am

Post by BlackOp » Sun Dec 28, 2008 6:19 pm

Thanks ieatacid!

I can't test it right now but I think that will fix the problem. I haven't played in a while so I figured I was missing something obvious.

I also noticed there is a newer version call advanced ninja loot so I may check that one out later.

Paradigm68
a hill giant
a hill giant
Posts: 275
Joined: Wed Dec 08, 2004 4:37 pm

Post by Paradigm68 » Tue Feb 17, 2009 6:55 pm

I'm currently using Ninjaloot.inc and it works perfectly, except for a freezing problem during the actual looting of items when the instance is not the active window (front instance). The corpse is opened, then four item description boxes open and it just sits there. If I switch back to this window while it's stuck, it will sometimes continue to actually loot the items. If not, it completely locks up the instance and I get a 'You have been disconnected' message.

Has anyone run into the above problem with Ninjloot.inc? Also, do people still use this loot inc, or have they switched over to Ninjadvloot.inc and Loot.inc?

mystikule
a snow griffon
a snow griffon
Posts: 353
Joined: Sat Jul 17, 2004 9:23 pm

Post by mystikule » Tue Feb 17, 2009 8:30 pm

My 2cents..... use Ninjadvloot...
[quote="fearless"]A macro is not psychic.[/quote]

Paradigm68
a hill giant
a hill giant
Posts: 275
Joined: Wed Dec 08, 2004 4:37 pm

Post by Paradigm68 » Tue Feb 17, 2009 11:57 pm

Will do. Thanks for the response.

Tangeleno
a hill giant
a hill giant
Posts: 193
Joined: Fri Feb 20, 2004 6:00 pm

Post by Tangeleno » Wed Feb 18, 2009 6:58 am

Ninjadvloot will more than likely have the same problem. This was happening to me for the longest time also with ninjadvloot, quick and easy fix for it is to not press the alt key while switching windows as the alt key stays pressed in on the window in the background and alt+right click brings up the item description window.

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Wed Feb 18, 2009 7:50 am

/nomodkey
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

Tangeleno
a hill giant
a hill giant
Posts: 193
Joined: Fri Feb 20, 2004 6:00 pm

Post by Tangeleno » Wed Feb 18, 2009 8:14 am

That would work, but I have it holding down the shift key while it right clicks that way the quantity window doesn't pop up.

Paradigm68
a hill giant
a hill giant
Posts: 275
Joined: Wed Dec 08, 2004 4:37 pm

Post by Paradigm68 » Wed Feb 18, 2009 3:12 pm

hmmm - guess I can map the different WinEQ instances without using the ALT key. I currently switch between them with Alt + 1, Alt + 2 and Alt + 3. Can map it to something else.

With the /nomodkey command, is there a way to pick up stacks of items?

Tangeleno
a hill giant
a hill giant
Posts: 193
Joined: Fri Feb 20, 2004 6:00 pm

Post by Tangeleno » Wed Feb 18, 2009 3:23 pm

Should be possible to get it to click the accept on the quantity window, just have to get the name of the window and the name of the button... I was just too lazy to do it when all I needed to do was not press alt :)

Edit:

Code: Select all

/nomodkey /notify QuanityWnd QTYW_Accept_Button leftmouseup
should do the trick

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Wed Feb 18, 2009 9:42 pm

/nomodkey /shift
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

Paradigm68
a hill giant
a hill giant
Posts: 275
Joined: Wed Dec 08, 2004 4:37 pm

Post by Paradigm68 » Thu Feb 19, 2009 6:16 pm

So, the following change should fix it then?

Code: Select all

Sub LootItem(int lootslot, string handling) 
  /if (${handling.Equal[KEEP]}) /echo Autoloot:  Keeping a ${InvSlot[loot${lootslot}].Item.Name}... WOOT! 
  /if (${handling.Equal[DESTROY]}) /echo Autoloot:  Destroying a ${InvSlot[loot${lootslot}].Item.Name}... Bubbye! 
  :retryloot 
  [color=red][b]/nomodkey [/b][/color]/shiftkey /itemnotify loot${lootslot} leftmouseup 
  /if (!${Cursor.ID} && ${NLlootmode.Equal[DROP]}) { 
    /if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox No_Button leftmouseup 
    /goto :retryloot 
  } 
  /if (!${Cursor.ID} && ${NLlootmode.NotEqual[DROP]}) { 
    /if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox Yes_Button leftmouseup 
    /goto :retryloot 
  } 
  :NLLootItem 
  /if (${handling.Equal[KEEP]}) /autoinventory 
  /if (${handling.Equal[DESTROY]}) /destroy 
  /if (${Cursor.ID}) /goto :NLLootItem 
/return 
Or, would I also need the /nomodkey for the Confirmation boxes?

Code: Select all

Sub LootItem(int lootslot, string handling) 
  /if (${handling.Equal[KEEP]}) /echo Autoloot:  Keeping a ${InvSlot[loot${lootslot}].Item.Name}... WOOT! 
  /if (${handling.Equal[DESTROY]}) /echo Autoloot:  Destroying a ${InvSlot[loot${lootslot}].Item.Name}... Bubbye! 
  :retryloot 
  [color=red][b]/nomodkey [/b][/color]/shiftkey /itemnotify loot${lootslot} leftmouseup 
  /if (!${Cursor.ID} && ${NLlootmode.Equal[DROP]}) { 
    /if (${Window[ConfirmationDialogBox].Open}) [color=red][b]/nomodkey [/b][/color]/notify ConfirmationDialogBox No_Button leftmouseup 
    /goto :retryloot 
  } 
  /if (!${Cursor.ID} && ${NLlootmode.NotEqual[DROP]}) { 
    /if (${Window[ConfirmationDialogBox].Open}) [color=red][b]/nomodkey [/b][/color]/notify ConfirmationDialogBox Yes_Button leftmouseup 
    /goto :retryloot 
  } 
  :NLLootItem 
  /if (${handling.Equal[KEEP]}) /autoinventory 
  /if (${handling.Equal[DESTROY]}) /destroy 
  /if (${Cursor.ID}) /goto :NLLootItem 
/return
Thanks for the assistance.

User avatar
Bad Karma
a snow griffon
a snow griffon
Posts: 346
Joined: Sat Nov 22, 2003 9:34 pm
Contact:

Post by Bad Karma » Thu Feb 19, 2009 6:30 pm

The first one.

Code: Select all

/nomodkey /shift /itemnotify loot${lootSlot} leftmouseup
[b]- Bad Karma
________________________________________[/b]

In our own quest for excellence, we should strive to take the time to help those who help themselves.

All others should [b]RTFM[/b]!!!!!!!!!

Paradigm68
a hill giant
a hill giant
Posts: 275
Joined: Wed Dec 08, 2004 4:37 pm

Post by Paradigm68 » Thu Feb 19, 2009 6:43 pm

Works like a charm =) thanks so much!

Albert
decaying skeleton
decaying skeleton
Posts: 7
Joined: Thu Feb 12, 2009 7:20 am

Post by Albert » Sun Feb 22, 2009 3:40 am

Very nice macro.

But I'm having some random stuff happening with the macro. It sometimes loots stuff it shouldn't, and sometimes I get an item that should not have been looted on my cursor.

From my debugging attempts I seems like it happens somewhere between it looting the last item it should loot and closing the loot window. The loot window gets closed before time and one of the remaining items either gets looted or ends up on the cursor. If that item was the last item, I end up with an empty corpse that don't decay....

Paradigm68
a hill giant
a hill giant
Posts: 275
Joined: Wed Dec 08, 2004 4:37 pm

Post by Paradigm68 » Sun Feb 22, 2009 4:30 pm

Try increasing the /delay #'s