• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver
Ninjadvloot.inc

Release Ninjadvloot.inc 2022-06-23

No permission to download
I'm currently testing this with KA 9 across 5 groups... I'll let you know how it goes.
Already seen some promising results with lore items being passed around :)

Good work guys... Thanks have been sent

- - - Updated - - -

My biggest complaint right now is the hard stop at 3 inventory spots... I want to be in charge of when it stops looting :P
I fixed the problem...

Rich (BB code):
		| End looting if no bag space
		/if (${FreeBagSpace}<=3) {
			/if (!${LootTimer}) {
				/echo NINJADVLOOT: Your bags are almost full, looting aborted until you go sell
				/varset LootTimer ${Math.Calc[${Math.Rand[5]}+23]}s
			}
			/return
		}

This should be moved to an ini value, I just changed it to 0 for now. If I get a chance I'll update it to read from the ini if you guys don't get to it first.
 
The hard stop with 3 slots open is to allow for =quest|xx and nodrop or lore items to still be looted without getting stuck on the curser. Having loot items stuck on the curser has at times interfered with spell casters, especially if they need to open their spellbook and memorize a different spell.
 
My understanding of this .inc is it will manage the assignment of a new looter if the original looter's bags become full. Is this right or did I misread it somewhere? If this happens, can someone very briefly explain how the include file does it?

Reason I ask is I'm about to leave for a few days (3-ish) and haven't had to really worry about bags filling up in shorter periods of time. I'm planning on leaving my dudes playing while I'm gone, so the bag issue and looter swapping might come up.

Thanks ahead of time!
 
It rotates through the group and whoever has looton=1 is a master looter candidate. When group leader fills up, it goes down the group list to the next one and makes them ML until they fill up, and so on. Iirc it's top to bottom in the group window (perspective of leader).
 
My understanding of this .inc is it will manage the assignment of a new looter if the original looter's bags become full. Is this right or did I misread it somewhere? If this happens, can someone very briefly explain how the include file does it?

Reason I ask is I'm about to leave for a few days (3-ish) and haven't had to really worry about bags filling up in shorter periods of time. I'm planning on leaving my dudes playing while I'm gone, so the bag issue and looter swapping might come up.

Thanks ahead of time!
IMPROVMENT #1 - Automatically Select/Replace Group Master Looter
New user selectable setting: GMLSelect=1 0=off/1=on
Allows Ninjadvloot to automatically select a Group Master Looter and replace the Group Master Looter if his/her bags become full.
To exclude a group member from being selected Master Looter turn off looting (LootOn=0) in your KissAssist_CharactorName.ini file. By default all group members are selectable as Master Looter.


By default this is enabled but check your loot.ini file to be sure.
If you are using kissassist make sure that ini file allows looting.
Probable the fastest way to verify it's working for you is... first start your group without picking a looter, it should select one for you the first time looting is nessecary. Then fill your looters bags with stuff and it should replace your group looter after bit.

How it works... The number of items in the shared list is tracked. To replace the looter there has to be over certain number of items (eight, I think) AND the number of items has to increase a certain number of times consecutively (3 or 5, can't remember). BTW it selects master looter in reverse group order. So look at the order the group is listed in your group window of the group leader, that's the order in reverse. It should detect and skip any mercs.

- - - Updated - - -

It rotates through the group and whoever has looton=1 is a master looter candidate. When group leader fills up, it goes down the group list to the next one and makes them ML until they fill up, and so on. Iirc it's top to bottom in the group window (perspective of leader).

Close, it actually goes in reverse... my group leader is always the tank or puller, and I'm usually active watching/playing them... if they are looting it's because everyone is full and I need to go sell.
 
I have one toon running autocleric and one running afnuke2. I'm not sure how they'll react to looting... I may need to test that. I know KISS works well.
 
I have one toon running autocleric and one running afnuke2. I'm not sure how they'll react to looting... I may need to test that. I know KISS works well.

So far both autocleric and afnuke2 work for me with this. Just had to make sure to add in the code listed and the include listed in the inc itself. I'm not sure that it hands off ML to them, but perhaps!
 
It should work the same regardless what macro is including it.

I didn't alter/edit the stock macros, so I'd have to check to make sure the include file is called somewhere in it. I'm not home at the moment or I'd do it now.
 
The hard stop with 3 slots open is to allow for =quest|xx and nodrop or lore items to still be looted without getting stuck on the curser. Having loot items stuck on the curser has at times interfered with spell casters, especially if they need to open their spellbook and memorize a different spell.


Yep... That makes sense, been playing around with it.
 
I didn't alter/edit the stock macros, so I'd have to check to make sure the include file is called somewhere in it. I'm not home at the moment or I'd do it now.

It's not included in autocleric or afnuke2, but it's very easy to insert and works smoothly.

- - - Updated - - -

edited.

- - - Updated - - -

Was messing around with a group in The Grounds and really wanted to filter items to the right people. So one thing I noticed in the macro is that quest items default to NEED and other items set to either nothing or keep default to GREED. What I did was this:

1 - set up loot ini files for each character with the appropriate items that I want for them in the grounds set to Keep.
2 - set all characters to have nodropdefault=quest
3 - set NULL items to be greed in the inc file
4 - swap Quest and Keep values of Need and Greed in the INC file so that quest items default to Greed and Keep items default to Need.
5 - set Recondite drops to Quest|1 (or 2 for bracer) for all characters

This is perfectly filtering my drops to the characters I want to have them. It takes upkeep, but at least I can walk away from time to time and not feel like a no drop is going to the wrong toon.

- - - Updated - - -

Still may have a slight bug with items marked "keep" for the ML. May have to mark all ML items as Quest|1 or else they autodistribute to the group I think.
 
It's not included in autocleric or afnuke2, but it's very easy to insert and works smoothly.

- - - Updated - - -

edited.

- - - Updated - - -

Was messing around with a group in The Grounds and really wanted to filter items to the right people. So one thing I noticed in the macro is that quest items default to NEED and other items set to either nothing or keep default to GREED. What I did was this:

1 - set up loot ini files for each character with the appropriate items that I want for them in the grounds set to Keep.
2 - set all characters to have nodropdefault=quest
3 - set NULL items to be greed in the inc file
4 - swap Quest and Keep values of Need and Greed in the INC file so that quest items default to Greed and Keep items default to Need.
5 - set Recondite drops to Quest|1 (or 2 for bracer) for all characters

This is perfectly filtering my drops to the characters I want to have them. It takes upkeep, but at least I can walk away from time to time and not feel like a no drop is going to the wrong toon.

- - - Updated - - -

Still may have a slight bug with items marked "keep" for the ML. May have to mark all ML items as Quest|1 or else they autodistribute to the group I think.

Kind of curious about the changes you made. Would you mind sending me your file?

1. Neat idea a separate file for each character, but only the master looter is sorting the shared list.
2. standard default for nodrop items is quest|1
3. greed is or at least was not a flag for ninjadvloot... this confuses me.
4. with separate file for each character this kind of makes sense.

ok... my intended setup:
Lore items - everyone gets one, unless the item is marked =ignore or =destroy in the ini file.
no drop items - user selectable options, unless item is already listed I the ini file. Default is quest|1

Items marked =quest|xx uses the ingame advloot system to allow everyone to autoroll for the item, if they actually need/want it. It should have each character check the quantity they already have, compare it the quantity they should have and choose either need or no. I used need because the ingame system actually makes two random rolls. The first is for need, the second for greed. Problem - if any character has the particular item filter by the ingame advloot system, the ingame filter is more likely to be used then what the macro is looking up in the ini file. Result - dofus has sparkly filtered in game to need, but it's marked =quest in the ini file. Unless everyone also selects "need" dofus will collect the item every time. Need >Greed to the ingame system.
The only time you should see Greed used by the macro is when the Master Looter has the item filtered ingame to "Never". The only real purpose to this is to alert you that the Master Looter will NEVER loot that particular item. It is also suppose to SPAM the problem, but looking at the code I see that is likely not happening correctly... sigh, another update soon as get a break from overwork.

Actually the intent is for only items marked =quest|xx to have any selection being done. Problem I ran into is only the Master Looter can detect the autoroll TLO.member. Letting them select on every item was the only way I could ensure quest items were properly distributed.

There is thought to refine the filters by class, level... Problem there are no TLO members to determine those criteria while the item is still I the advloot window. Maybe someday the minor deities over at the mothership will find the time to add members to the TLO.


I hope most of this makes sense tomorrow... I think I work about 37 of the last 24 hours. Good Night, all

note: I'll edit the exhaustion out of this tomorrow if I need too...
 
Totally happy to share my file. My ideal setup is this:

1 - all characters loot based on "greed". If you add a flag to a character that an item is "keep" it goes to them as need ABOVE greed. All items default to greed as you technically want all items, by default, to be looted.

2 - lore items should go to characters with a setting of "keep" over a setting of "quest".

- - - Updated - - -

Rich (BB code):
| Ninjadvloot.inc v5.3 08/16/2015 Redguides.com 
| Author A_Druid_00 12/19/2005
| Based on original looting code of toomanynames
| The following updates were all individually posted and consolidated by Maskoi into the current version.
| Updated: Moeymoejoe added strip out comma in item names when accessing ini file 08/02/2006
| Updated: mystikule added sell option to ini file 01/07/2008
| Updated: drkrain for House of Thule 10/23/2010
| Updated: Maskoi with Sell Routines 11/27/2010
| Updated: Maskoi with /item keep/sell/destroy ini commands 07/21/2011
| Updated: Maskoi with Foraged item handling 08/31/2011
| Updated: Maskoi with Buying item handling 07/31/2012
| Updated: Maskoi with Assign different ini file for item handling 01/01/2013
| Updated: Crystane with Looting while on mount (no overshooting on corpserun), added some conditional checks to skip unecessary delay I found. Announcement routine reworked. 05/13/2014
| Updated: TreeHuginDruid hard coded 1 second delay between loot and corpse item retrieval to resolve loot latency issue.
| Updated: Maskoi added suppot for Advanced Looting system  05/18/2015
| Updated: Hoosierbilly/Incognito reworked Advloot system adding several new features. July 2016
|		1. User selectable to auto assign group master looter and switch master looter when bags are full
|		2. Quest looting: loot any item marked =Quest|xx until everyone in group has xx number then leave on corpse
|		3. Auto distribute LORE items to everyone in group
|		4. User selectable to distribute nodrop items to everyone in the group, similar to quest looting
|		5. User selectable minimum value to mark items =Keep in the loot.ini file
|
| Selling Contributions by
|   drkrain - TLInv item check
|   dewey2461 - Add sold items to ini file Event
|
| Requirements: MQ2Moveutils
|
| Usage: add the following to your macro for looting
|   #include Ninjadvloot.inc
|   /call SetupAdvLootVars
|   /call LootMobs or /call UseAdvLoot
|
| Assign differnent ini files. Default is Loot.ini
|   /call SetupAdvLootVars "MyToonLoot.ini"
|   /call SetupAdvLootVars "LootMesa.ini"
|
| Commands
| Usage. Grab the item and put it on your cursor then use one of the following commands
|     /lootdestroy - Mark item on cursor to Destroy in Loot.ini file
|     /lootignore - Mark item on cursor to Ignore in Loot.ini file
|     /lootkeep - Mark item on cursor to Keep in Loot.ini file
|     /lootsell - Mark item on cursor to Sell in Loot.ini file
|     /lootquest - Mark item on cursor to Quest|default in Loot.ini file
|     /sellstuff - Target a vendor and this command will sell any item in your inventory marked sell. 
|     /depositstuff - Target your guildbanker and this command will deposit any item in your inventory marked keep into the guild bank.

#Event CantLoot         "#*#may not loot this corpse#*#"
#Event Sell             "#*#You receive#*# for the #1#(s)#*#"
#Event EditIniItem      "[MQ2] LootIniItem #1# #2#"
#Event SellStuff        "[MQ2] NinjadvLoot selling items to vendor"
#Event Broke            "#*#you cannot afford#*#" 
#Event Broke            "#*#you can't afford#*#" 
#Event Forage           "Your forage mastery has enabled you to find something else!"
#Event Forage           "You have scrounged up #*#"
#Event InventoryFull    "#*#Your inventory appears full!#*#"
#Event Novalue          "#*#give you absolutely nothing for the #1#.#*#"
#Event NullSlot         "#*#Invalid item slot 'null#*#"
#Event Lore             "#*#You cannot loot this Lore Item.#*#"
#Event UnwantedLoot		"#*#No one was interested in the#*#item(s): #1#. These items#*#"
#Event LockedLoot		"#*#These item(s) are locked#*#"

Sub SetupAdvLootVars(string ChangeIniFile)

    /declare CantLootID							int                 outer 
    /declare NinjadVersion                      string              outer   6.2
    /declare InventoryFull                      int                 outer   0
    /declare NinjaIniFile                       string              outer   Loot.ini
    /declare MasterCorpseList                   string              outer   
    /declare Debugloot                          int                 outer   0
    /declare GlobalCount                        int                 outer   5
    /declare GlobalList[${GlobalCount}]         string              outer  
    /varset GlobalList[1]                       string              outer  empty   
    /declare AutoHater                          int                 outer
	/declare LootTimer							timer				outer
	/declare GMLCounter							int					outer	${Group.Members}
	/declare FreeBagSpace						int					outer	0
	/declare LootCountTrack						int					outer	0
	/declare SCountTrack						int					outer	0
	/declare MLSwitchTimer						timer				outer	0
	
    /if (${ChangeIniFile.Length}) {
        /varset NinjaIniFile ${ChangeIniFile}
    }
    /declare NALVersion                           string             outer   ${Ini[${NinjaIniFile},Settings,Version]}
    /if (!${Ini[${NinjaIniFile},Settings,Version].Length}) {
        /call CreateIni
        /ini "${NinjaIniFile}" "Settings" "Version" "0.0"
    }
    /if (${NALVersion.NotEqual[${NinjadVersion}]}) {
        /echo NINJADVLOOT: Version mismatch detected. Writing aliases.
        /noparse /squelch /alias /lootignore    /echo LootIniItem Ignore ${Cursor.Name}
        /noparse /squelch /alias /lootsell      /echo LootIniItem Sell ${Cursor.Name}
        /noparse /squelch /alias /lootkeep      /echo LootIniItem Keep ${Cursor.Name}
        /noparse /squelch /alias /lootdestroy   /echo LootIniItem Destroy ${Cursor.Name}
		/noparse /squelch /alias /lootquest		/echo LootIniItem Quest|${QuestKeep} ${Cursor.Name}
        /squelch /alias /sellstuff              /echo NinjadvLoot selling items to vendor
        /squelch /alias /depositstuff           /echo NinjadvLoot depositing items to guildbank
        /ini "${NinjaIniFile}" "Settings" "Version" "${NinjadVersion}"
    }

    | Loot ini settings
    /call NALLoadVar Settings AddNewSales        1                   int
    /call NALLoadVar Settings LootForage         1                   int
    /call NALLoadVar Settings LootMobs           TRUE                bool
    /call NALLoadVar Settings CorpseRadius       100                 int
    /call NALLoadVar Settings MobsTooClose       40                  int
    /call NALLoadVar Settings ReportLoot         FALSE               bool
    /call NALLoadVar Settings LootChannel        g                   string
	/call NALLoadVar Settings SpamLootInfo		 1					 int
    /call NALLoadVar Settings LootForageSpam     1                   int
    /call NALLoadVar Settings GlobalLootOn       1                   int
    /call NALLoadVar Settings CombatLooting      1                   int
	/call NALLoadVar Settings GMLSelect			 1					 int
	/call NALLoadVar Settings ExcludeBag1		 Extraplanar Trade Satchel				 string
	/call NALLoadVar Settings ExcludeBag2		 NULL				 string
	/call NALLoadVar Settings QuestKeep			 10					 int
	/call NALLoadVar Settings StackPlatValue	 0					 int
	/call NALLoadVar Settings NoDropDefault		 Quest|Keep|Ignore	 string
	/call NALLoadVar Settings LootLagDelay		 0					 int
    /call FindAutoHate
    /echo NINJADVLOOT: Variables are set. Using ${NinjaIniFile} file.

/return

Sub NALLoadVar(IniSection,IniVar,IniValue,VarType)
    /if (!${Defined[${IniVar}]} && ${Defined[VarType]}) /declare ${IniVar} ${VarType} outer
    /declare IniString string local ${Ini[${NinjaIniFile},${IniSection},${IniVar},NOTFOUND]}
    /varset ${IniVar} ${IniString}
    /if (${IniString.Equal["NOTFOUND"]}) {
        /if (${IniString.Equal["NOTFOUND"]}) /varset ${IniVar} ${IniValue}
        /ini "${NinjaIniFile}" "${IniSection}" "${IniVar}" "${${IniVar}}"
    } 
/return

Sub FindAutoHate
    /declare i int local
    /for i 1 to 10
        /if (${Me.XTarget[${i}].TargetType.Equal[Auto Hater]}) {
            /varset AutoHater ${i}
            /echo NINJADVLOOT: AutoHater set to Xtarget${i}
            /return
        }
    /next i
/return

| ****************  Loot Mobs Section ******************** |

Sub LootMobs
    /declare DeadCount int local ${SpawnCount[corpse radius ${CorpseRadius} zradius 50]}
    /if (${Debugloot}) /echo DEBUGLOOT There are ${DeadCount} corpses in range.
    /if (${Debugloot}) /echo DEBUGLOOT !${LootMobs} || ${SpawnCount[npc radius ${MobsTooClose} zradius 50]} || !${DeadCount} || ${Me.Combat} || !${Me.FreeInventory} || ${Me.XTarget[${AutoHater}].ID} && !${CombatLooting})
    /if (!${LootMobs} || ${SpawnCount[npc radius ${MobsTooClose} zradius 50]} || !${DeadCount} || ${Me.Combat} || !${Me.FreeInventory} || ${Me.XTarget[${AutoHater}].ID} && !${CombatLooting}) /return
    /declare i int local
    /declare CorpseList string local 
    /declare CorpseToLoot int local
    /declare ZDist float local ${Math.Distance[${Target.Z}:${Me.Z}]}
    /declare ClosestCorpse int local
    /declare CorpseCount int local 0
    /for i 1 to ${DeadCount}
        /varset ClosestCorpse ${NearestSpawn[${i},corpse radius ${CorpseRadius} zradius 50].ID}
        /if (!${Spawn[${ClosestCorpse}].Deity.ID}) {
            /varset CorpseList ${CorpseList}${ClosestCorpse}|
            /if (!${MasterCorpseList.Find[${ClosestCorpse}]}) /varset MasterCorpseList ${MasterCorpseList}${ClosestCorpse}|
            /varcalc CorpseCount ${CorpseCount}+1
        }
    /next i
    /if (${Debugloot}) /echo DEBUGLOOT Trying to loot ${CorpseCount} corpses. ID's ${CorpseList}
    /for i 1 to ${CorpseCount} 
    /varset CorpseToLoot ${CorpseList.Arg[${i},|]}
    /if (!${Defined[CorpseLocked${CorpseToLoot}]}) /declare CorpseLocked${CorpseToLoot} timer outer 0
        /if (${Spawn[${CorpseToLoot}].Deity.ID} || !${Spawn[${CorpseToLoot}].ID} || !${Spawn[${CorpseToLoot}].LineOfSight} || ${CorpseLocked${CorpseToLoot}} || ${Me.XTarget[${AutoHater}].ID} && !${CombatLooting}) /goto :SkipCorpse
            /if (${Target.ID}!=${CorpseToLoot}) /target id ${CorpseToLoot}
            /if (!${Me.Standing}) /stand
            /delay 3s ${Target.ID}==${CorpseToLoot} && ${Me.Standing}
            /if (${Target.Distance}>5) {
                /if (${Debugloot}) /echo DEBUGLOOT move to corpse
                /moveto mdist 10
                /moveto loc ${Target.Y} ${Target.X} ${Target.Z} 
        /if (${Me.Mount.ID}) {
            /delay 3s ${Math.Distance[${Target.Y},${Target.X}]}<25
            /keypress back
        }
                /delay 3s ${MoveTo.Stopped} && !${Me.Moving}
                /call ZCheck ${ZDist} 8
                /if (${Target.ID}) /face fast
            }
            /if (${Target.Distance}<12) {
                /if (${Debugloot}) /echo DEBUGLOOT /Call LootCorpse
                /call LootCorpse ${Target.ID}
                /call RemoveCorpseID ${CorpseToLoot}
            }
        :SkipCorpse
    /next i
    /if (${Debugloot}) /echo DEBUGLOOT Leave Sub LootMobs 
/return

Sub LootCorpse(CorpseID)
    /if (${Debugloot}) /echo DEBUGLOOT Enter Sub LootCorpse
    /declare i              int    local
    /declare j              int    local
    /declare LootList       string local
    /declare FirstLetter    string local
    /declare GCheck            string local
    /call CheckCursor
    /varset CantLootID 0
    /if (${Debugloot}) /echo DEBUGLOOT /loot
    | Open Loot window
    /loot
    /if (${Debugloot}) /echo DEBUGLOOT /doevents CantLoot
    /delay 3s ${Window[LootWnd]}
    /delay 1s
    /doevents CantLoot
    /delay 3s ${CantLootID} || ${Window[LootWnd]}
    /if (${Target.ID}==${CantLootID} && !${Window[LootWnd]}) {
        /echo NINJADVLOOT: I can't loot ${Target.CleanName} ID:${CorpseID} right now.
        /if (${Defined[CorpseLocked${CorpseID}]}) /varset CorpseLocked${CorpseID} 150s
        /return
    }
    /if (${Debugloot}) /echo DEBUGLOOT Loot Window Open:${Window[LootWnd]} - # Loot Items:${Corpse.Items}
    /if (${Window[LootWnd].Open} && ${Corpse.Items}) {
        /declare loottotal int  local
        :LootLag
        /varset loottotal ${Corpse.Items}
             /if (${Debugloot}) /echo DEBUGLOOT :LootLag ${loottotal}!=${Corpse.Items} LagCount${LagCount}
        /delay 1s ${loottotal}!=${Corpse.Items}
        /if (${loottotal}!=${Corpse.Items}) /goto :LootLag
        /echo NINJADVLOOT: Looting ${Target.CleanName} ID:${CorpseID}.
        /for i 1 to ${loottotal}
            /if (${Corpse.Item[${i}].Lore} && ${FindItem[=${Corpse.Item[${i}]}].ID}) {
                /varset LootList ${LootList}${Corpse.Item[${i}]},
                /goto :LootedInGlobal
            }
            /if (${Debugloot}) /echo DEBUGLOOT Looting ${Corpse.Item[${i}].Name} ${i} of ${loottotal} 
            | Global loot section
            /if (${GlobalLootOn}) {
                /for j 1 to ${GlobalCount}
                    /varset GCheck ${Ini[${NinjaIniFile},"Global","Global${j}"]}
                    | /echo ${GCheck.Arg[1,|]} ${GCheck.Arg[2,|]}
                    /if (${Corpse.Item[${i}].Name.Find[${GCheck.Arg[1,|]}]}) {
                        /if (${Select[${GCheck.Arg[2,|]},sell,keep]} && (!${Corpse.Item[${i}].Lore} || !${FindItem[=${Corpse.Item[${i}]}].ID}) && (${Me.FreeInventory} || (${FindItemCount[=${Corpse.Item[${i}].Name}]} && ${Corpse.Item[${i}].Stackable} && ${Corpse.Item[${i}].FreeStack}))) /call LootItem ${i} Keep Right
                        /if (${GCheck.Arg[2,|].Equal[Ignore]}) /varset LootList ${LootList}${Corpse.Item[${i}]},
                        /if (${GCheck.Arg[2,|].Equal[Destroy]}) /call LootItem ${i} Destroy left
                        /goto :LootedInGlobal
                    }
                /next j
            }
            /varset FirstLetter ${Corpse.Item[${i}].Name.Left[1]}
            /if (${Corpse.Item[${i}].ID} && !${Select[${Ini[${NinjaIniFile},"${FirstLetter}","${Corpse.Item[${i}]}"]},Ignore,Keep,Destroy,Sell]}) {
                /if (${Corpse.Item[${i}].NoDrop})  /ini "${NinjaIniFile}" "${FirstLetter}" "${Corpse.Item[${i}]}" Ignore
                /if (!${Corpse.Item[${i}].NoDrop}) /ini "${NinjaIniFile}" "${FirstLetter}" "${Corpse.Item[${i}]}" Keep
            }  
            /if (${Ini[${NinjaIniFile},"${FirstLetter}","${Corpse.Item[${i}]}"].NotEqual[Destroy]} && !${Me.FreeInventory} && (!${FindItemCount[=${Corpse.Item[${i}].Name}]} || (${FindItemCount[=${Corpse.Item[${i}].Name}]} && ${Corpse.Item[${i}].Stackable} && !${Corpse.Item[${i}].FreeStack})) || (${Corpse.Item[${i}].Lore} && ${FindItem[=${Corpse.Item[${i}]}].ID}) || ${Ini[${NinjaIniFile},"${FirstLetter}","${Corpse.Item[${i}]}"].Equal[Ignore]}) /varset LootList ${LootList}${Corpse.Item[${i}]},
            /if ((${Ini[${NinjaIniFile},"${FirstLetter}","${Corpse.Item[${i}]}"].Equal[Keep]} || ${Ini[${NinjaIniFile},"${FirstLetter}","${Corpse.Item[${i}]}"].Equal[Sell]}) && (!${Corpse.Item[${i}].Lore} || !${FindItem[=${Corpse.Item[${i}]}].ID}) && (${Me.FreeInventory} || (${FindItemCount[=${Corpse.Item[${i}].Name}]} && ${Corpse.Item[${i}].Stackable} && ${Corpse.Item[${i}].FreeStack}))) /call LootItem ${i} Keep Right
            /if (${Ini[${NinjaIniFile},"${FirstLetter}","${Corpse.Item[${i}]}"].Equal[Destroy]}) /call LootItem ${i} Destroy left
            :LootedInGlobal
        /next i
        /if (${Corpse.Items}) {
            /if (${ReportLoot} && ${LootList.Length}) {
                /keypress /
                /delay 3
                /call Type "${LootChannel}"
                /keypress Space chat
                /notify LootWND LW_BroadcastButton leftmouseup 
                /delay 3
                /call Type " ,left on corpse."
                /keypress Enter chat
                /if (${Defined[CorpseLocked${CorpseID}]}) /varset CorpseLocked${CorpseID} 440s
            }
        }
    }
    :clickdoneffs
        /nomodkey /notify LootWnd LW_DoneButton leftmouseup
        /if (${Debugloot}) /echo DEBUGLOOT :clickdoneffs 
        /delay 5s !${Window[LootWnd].Open}
        /if (${Debugloot}) /echo DEBUGLOOT :clickdoneffs LootWin Open:${Window[LootWnd]}
    /if (${Window[LootWnd].Open}) /goto :clickdoneffs
    /call RemoveCorpseID ${CorpseID}
    /if (${Debugloot}) /echo DEBUGLOOT Leave Sub LootCorpse
/return

Sub Event_CantLoot
   /if (${Debugloot}) /echo DEBUGLOOT Enter Sub Event_CantLoot
   /varset CantLootID ${Target.ID}
   /if (${Debugloot}) /echo DEBUGLOOT  Event_CantLoot Can't loot ${Target.CleanName} ${Target.ID}
   /if (${Debugloot}) /echo DEBUGLOOT Leave Sub Event_CantLoot
/return

Sub RemoveCorpseID(CListID)
    /if (${Defined[CorpseLocked${CListID}]}) {
        /if (!${CorpseLocked${CListID}} && ${MasterCorpseList.Find[${CListID}]}) {
            /deletevar CorpseLocked${CListID}
            /varset MasterCorpseList ${MasterCorpseList.Replace[${CListID}|,]}
        }
    }
/return

Sub LootItem(int i,DoWhat,WhichButton)
    /if (${Debugloot}) /echo DEBUGLOOT Enter Sub LootItem ${i} ${DoWhat} ${WhichButton}
    /declare CorpseItemID int local ${Corpse.Item[${i}].ID}
    /nomodkey /shift /itemnotify ${Corpse.Item[${i}].InvSlot} ${WhichButton}mouseup
    /delay 5s ${Window[ConfirmationDialogBox].Open} || !${Corpse.Item[${i}].NoDrop}
    /if (${Window[ConfirmationDialogBox].Open}) /nomodkey /notify ConfirmationDialogBox Yes_Button leftmouseup
    /delay 5s ${Cursor.ID} || ${WhichButton.NotEqual
} /if (${DoWhat.Equal[Destroy]} && ${Cursor.ID}==${CorpseItemID}) /destroy /delay 5s !${Corpse.Item[${i}].ID} /if (${Cursor.ID}) /call CheckCursor /if (${Debugloot}) /echo DEBUGLOOT Leave Sub LootItem /return Sub CheckCursor /if (${Debugloot}) /echo DEBUGLOOT Enter Sub CheckCursor :ALauto_inv /if (${Cursor.ID}) { /if (${Cursor.NoDrop} && !${Me.FreeInventory}) /return /timed 5 /autoinventory /delay 2s !${Cursor.ID} /goto :ALauto_inv } /if (${Debugloot}) /echo DEBUGLOOT Leave Sub CheckCursor /return | **************** Foraged Items Section ******************** | Sub Event_Forage /if (!${LootForage}) /return /declare ForagedItem string local :MoreToAutoInventory /if (${Cursor.ID}) { /varset ForagedItem ${Cursor.Name} /if (!${Select[${Ini[${NinjaIniFile},"${Cursor.Name.Left[1]}","${Cursor.Name}"]},Ignore,Keep,Destroy,Sell]}) { /if (${Cursor.ID}) /ini "${NinjaIniFile}" "${Cursor.Name.Left[1]}" "${Cursor.Name}" Keep /if (${LootForageSpam}) /echo New foraged item >> ${Cursor.Name} << added to ini file. } /if (${Ini[${NinjaIniFile},"${Cursor.Name.Left[1]}","${Cursor.Name}"].Equal[Destroy]} || ${Ini[${NinjaIniFile},"${Cursor.Name.Left[1]}","${Cursor.Name}"].Equal[Ignore]}) { /if (${Cursor.Name.Equal[${ForagedItem}]}) /destroy /delay 5 !${Cursor.ID} /if (${LootForageSpam}) /echo NINJADVLOOT -- Destroyed foraged ${ForagedItem}. } else /if ((${Ini[${NinjaIniFile},"${Cursor.Name.Left[1]}","${Cursor.Name}"].Equal[Keep]} || ${Ini[${NinjaIniFile},"${Cursor.Name.Left[1]}","${Cursor.Name}"].Equal[Sell]}) && (!${Cursor.Lore} || !${FindItem[=${Cursor.Name}].ID}) && (${Me.FreeInventory} || (${FindItemCount[=${Cursor.Name}]} && ${Cursor.Stackable} && ${Cursor.FreeStack}))) { /if (${LootForageSpam}) /echo NINJADVLOOT ++ Kept foraged ${ForagedItem}. /autoinventory /delay 5 !${Cursor.ID} } } /delay 5 /if (${Cursor.ID}) /goto :MoreToAutoInventory /return | **************** Search Loot Section ******************** | Sub DoLootStuff(LootAction) /declare i int local /declare j int local /declare k int local /declare LootItem string /call NPC "${Target.CleanName}" | Top level inv has its own loop since ${FindItem[=${ItemToSell}].InvSlot} looks at top lev inv slots first in Sub SellToVendor for the item to sell. | Loop through top level inventory slots for sellable items /for k 1 to 10 | Check if top level inv slot is not a container/bag /if (${InvSlot[pack${k}].Item.Container}==0) { | If top level inv slot is empty check for an item marked sell /if (${InvSlot[pack${k}].Item.ID}) { /varset LootItem ${InvSlot[pack${k}].Item} /if (${LootAction.Equal[sell]}) { /if (${Ini[${NinjaIniFile},"${LootItem.Left[1]}","${LootItem}"].Equal[Sell]}) /call SellToVendor "${LootItem}" } /if (${LootAction.Equal[deposit]}) { /if (${Ini[${NinjaIniFile},"${LootItem.Left[1]}","${LootItem}"].Equal[Keep]}) /call DepositToGuildBank "${LootItem}" } } } /next k | Loop through top level inventory slots for containers /for i 1 to 10 | Check if top level inv slot has a bag /if (${InvSlot[pack${i}].Item.Container}==0) /next i | Set j 1 to number of bag slots and loop through slots looking for items marked sell /for j 1 to ${InvSlot[pack${i}].Item.Container} /if (${InvSlot[pack${i}].Item.Item[${j}].ID}) { /varset LootItem ${InvSlot[pack${i}].Item.Item[${j}].Name} /if (${LootAction.Equal[sell]}) { /if (${Ini[${NinjaIniFile},"${LootItem.Left[1]}","${LootItem}"].Equal[Sell]}) /call SellToVendor "${LootItem}" } /if (${LootAction.Equal[deposit]}) { /if (${Ini[${NinjaIniFile},"${LootItem.Left[1]}","${LootItem}"].Equal[Keep]}) /call DepositToGuildBank "${LootItem}" } } /next j /next i | Prevent spam from Sell event after selling items in Sub SellStuff /doevents flush Sell /if (${Window[MerchantWnd].Open}) { /echo Closing merchant window /nomodkey /notify MerchantWnd MW_Done_Button LeftMouseUp } /if (${Window[GuildBankWnd].Open}) { /echo Closing guildbank window /keypress esc } /return Sub NPC(string NPCName) /if (${NPCName.Equal[null]} && ${Target.Type.Equal[npc]}) /varset NPCName ${Target.CleanName} /target npc ${NPCName} /delay 10 /if (!${Select[${Target.Type},npc,pet]} || !${Target.ID} || ${Target.Type.Equal[pet]} && !${Target.CleanName.Find[familiar]}) { /echo Please target a vendor or guildbanker /return } /delay 1s /echo Doing business with ${NPCName} /target id ${Spawn[${NPCName}].ID} /delay 3s ${Target.ID}==${Spawn[${NPCName}].ID} /if (${Target.Distance}>15) { /moveto id ${Spawn[${NPCName}].ID} /delay 250 ${MoveTo.Stopped} } /face nolook /delay 1s /echo Opening merchant/guildbank window /nomodkey /click right target /echo Waiting 5s for merchant/guildbank window to populate /delay 5s /return | **************** Sell Loot Section ******************** | Sub Event_Sell(string soldstr, string ItemName) /if (${Ini[${NinjaIniFile},"${ItemName.Left[1]}","${ItemName}"].Equal[Sell]}) /return /if ( ${AddNewSales} ) { /echo Setting ${ItemName} to sell /ini "${NinjaIniFile}" "${ItemName.Left[1]}" "${ItemName}" Sell } /return Sub SellToVendor(ItemToSell) /if (${Window[MerchantWnd].Open}) { :sell /echo Selling ${ItemToSell} /if (${InvSlot[pack${Select[${FindItem[=${ItemToSell}].ItemSlot},23,24,25,26,27,28,29,30,31,32]}].Item.Container}) { /nomodkey /itemnotify in Pack${Math.Calc[${FindItem[=${ItemToSell}].ItemSlot}-22]} ${Math.Calc[${FindItem[=${ItemToSell}].ItemSlot2}+1]} leftmouseup } else { /nomodkey /itemnotify ${FindItem[=${ItemToSell}].InvSlot} leftmouseup } /delay 5 /nomodkey /shiftkey /notify merchantwnd MW_Sell_Button leftmouseup /doevents /if (${Macro.Return.Equal[TRUE]}) /return /delay 2s /if (${FindItemCount[=${ItemToSell}]}) /goto :sell } /return | **************** Deposit Loot Section ******************** Sub DepositToGuildBank(ItemToDeposit) /if (${Window[GuildBankWnd].Open}) { :deposit /if (${Window[GuildBankWnd].Child[GBANK_DepositCountLabel].Text.Arg[2,:]}==0) { /echo Guildbank Deposited Items is full. /return } /if (${FindItem[=${ItemToDeposit}].InvSlot}<=22) /return /echo Depositing ${ItemToDeposit} /if (!${InvSlot[pack${Float[${Math.Calc[${Select[${FindItem[=${ItemToDeposit}].ItemSlot},22,23,24,25,26,27,28,29,30,31,32]}-1]}].Int}].Item.Container}) { /nomodkey /shift /itemnotify ${FindItem[=${ItemToDeposit}].InvSlot} leftmouseup } else { /nomodkey /shift /itemnotify in Pack${Math.Calc[${FindItem[=${ItemToDeposit}].ItemSlot}-22]} ${Math.Calc[${FindItem[=${ItemToDeposit}].ItemSlot2}+1]} leftmouseup } /delay 5 /nomodkey /notify GuildBankWnd GBANK_DepositButton leftmouseup /delay 2s /if (${FindItem[=${ItemToDeposit}].InvSlot}) /goto :deposit } /return | **************** Item set ini file event ******************** Sub Event_EditIniItem(ItemString,ItemAction,ItemName) /if (${Cursor.ID}) { /echo -- Setting ${ItemName} to ${ItemAction} /ini "${NinjaIniFile}" ${ItemName.Left[1]} "${ItemName}" ${ItemAction} } else { /echo No item on cursor. } /return | **************** Sell Stuff Event ******************** Sub Event_SellStuff /call DoLootStuff sell /return | **************** Deposit Stuff Event ******************* Sub Event_DepositStuff /call DoLootStuff deposit /return | **************** Broke Event ******************** Sub Event_Broke /if (!${Window[MerchantWnd].Open}) /return /echo You are out of money! /endmacro /return | **************** Type Stuff ******************** | Lifted from commonsubs.inc by Armysoldier Sub Type(InStr) /declare char string local /declare loopctr int local /for loopctr 1 to ${InStr.Length} /varset char ${InStr.Mid[${loopctr},1]} /if (!${char.Length}) { /nomodkey /keypress space chat } else { /nomodkey /keypress ${char} chat } /next loopctr /return | **************** Buy Stuff ******************** Sub Buy(string ItemToBuy, int amount) /if (!${Select[${Target.Type},npc,pet]} || !${Target.ID} || ${Target.Type.Equal[pet]} && !${Target.CleanName.Find[familiar]}) /return /declare i int local | /echo Buying ${ItemToBuy}! /declare QTY int local /declare ListItem int local /varcalc QTY ${amount}-${FindItemCount[${ItemToBuy}]} /delay 3 /if (${FindItemCount[${ItemToBuy}]}>=${amount}) { /echo I already have ${FindItemCount[${ItemToBuy}]} ${ItemToBuy}. /return } /varset ListItem ${Window[MerchantWnd].Child[ItemList].List[=${ItemToBuy},2]} /if (!${ListItem}) { /echo couldn't find ${ItemToBuy} /return } else { /notify MerchantWnd ItemList listselect ${ListItem} /delay 5 } i /echo Buying ${ItemToBuy} Till I get ${amount} :Loop /doevents /if (${InventoryFull}) /return /if (${QTY}>0) { /if (${QTY}>19) { /Shiftkey /notify merchantwnd MW_Buy_Button leftmouseup /delay 5 ${FindItemCount[B${ItemToBuy}]}>=${QTY} /echo ${FindItemCount[${ItemToBuy}]}/${amount} ${ItemToBuy} in inventory /varcalc QTY ${amount}-${FindItemCount[${ItemToBuy}]} /if (${QTY}<=0) { /if (${Window[MerchantWnd].Open}) { /echo Closing merchant window /nomodkey /notify MerchantWnd MW_Done_Button LeftMouseUp } /return } /delay 5 /if (${QTY}>19) /goto :Loop } /if (${QTY}>0 && ${QTY}<20) { /for i 1 to ${QTY} /Ctrlkey /notify merchantwnd MW_Buy_Button leftmouseup /delay 1s ${FindItemCount[${ItemToBuy}]}>=${Math.Calc[${FindItemCount[${ItemToBuy}]}+${i}]} /echo Buying ${ItemToBuy} ${i} of ${QTY} /if (${i}>=${QTY}) { /echo ${FindItemCount[${ItemToBuy}]} ${ItemToBuy} in inventory /if (${Window[MerchantWnd].Open}) { /echo Closing merchant window /nomodkey /notify MerchantWnd MW_Done_Button LeftMouseUp } /return } /next i /varcalc QTY ${amount}-${FindItemCount[${ItemToBuy}]} } } /return Sub ZCheck(float Zcur, float Zdiff) | Move down if Z distance more than Zcheck due to levitation /if (${Zcur}>=${Zdiff}) { /keypress end hold /delay 10 /keypress end } /return Sub Event_InventoryFull /echo Your Inventory is full. Turning off looting functions. /varset LootMobs FALSE /varset InventoryFull 1 /return Sub CreateIni /if (${Ini[${NinjaIniFile}].Length}) /return /declare a local Settings|Global|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z /echo Creating ini file ${NinjaIniFile} /declare i int local /declare j int local /for i 1 to 28 /ini ${NinjaIniFile} "${a.Arg[${i},|]}" "|===================================" "==================================|" /if (${i}==2) { /for j 1 to ${GlobalCount} /ini ${NinjaIniFile} "Global" "Global${j}" "Item Name|Ignore/Destroy/Keep/Sell" /next j } /next i /return Sub Event_Novalue(string nvmstring, string nvItem) /declare NVSection ${nvItem.Left[1]} /declare NVTemp string local ${Ini[${NinjaIniFile},${NVSection},${nvItem}]} /if (${NVTemp.Equal[Sell]}) { /ini "${NinjaIniFile}" "${NVSection}" "${nvItem}" KEEP /delay 5 /echo NINJADVLOOT: ${nvItem} is marked SELL but has no value. marking KEEP } /return TRUE Sub Event_NullSlot /echo NINJADVLOOT: Opening all bags to correct null slot /keypress OPEN_INV_BAGS /timed 30 /keypress CLOSE_INV_BAGS /return | **************** AdvLoot Stuff ******************** Sub Event_UnwantedLoot(S0,S1) /if (${Group.MasterLooter.ID}==${Me.ID}) { /echo NINJADVLOOT: no one wants >${S1}< leaving ${AdvLoot.SList[1].Name} on corpse /delay 3s !${AdvLoot.LootInProgress} /advloot shared 1 leave /delay 3s !${AdvLoot.LootInProgress} /if (${LootLagDelay}) /delay ${LootLagDelay} } /return Sub Event_LockedLoot /echo NINJADVLOOT: Loot item is locked, leave it... /doevents flush LockedLoot /delay 3s !${AdvLoot.LootInProgress} /advloot personal 1 leave /delay 3s !${AdvLoot.LootInProgress} /if (${LootLagDelay}) /delay ${LootLagDelay} /return Sub UseAdvLoot /if (!${Me.FreeInventory}) { /varset LootTimer ${Math.Calc[${Math.Rand[5]}+3]}s /return } /if (${Debugloot}) /echo Enter UseAdvLoot /if (${Me.UseAdvancedLooting}) { /if (${Debugloot}) /echo Start Loot Check /delay 30 ${Window[AdvancedLootWnd].Open} /declare g int local /declare i int local /declare j int local /declare k int local /declare ItemsToProcess string local /declare ITSCount int local 0 /declare ITPCount int local 0 /declare ITPName string local /declare ITPList string local /declare IniEntry string local /declare KeepAmount int local 0 /declare ITStack int local 0 /declare ICanLoot int local 1 /declare ITLootCount int local ${AdvLoot.SCount} /declare SubStart int local ${Macro.RunTime} /declare SubEnd int local 0 |kissassist_${EverQuest.Server}_${Me.Name}.ini | Assign group a master looter, if one is not already /if (${AdvLoot.SList[1].ID} && !${Group.MasterLooter.ID} && ${Group.Leader.ID}==${Me.ID}) { /if (${GMLSelect}) { /varset GMLCounter ${Group.Members} /for i ${Group.Members} downto 0 /if (${Ini[KissAssist_${Group.Member[${i}].Name}.ini,General,LootOn].Length}) { /varset ICanLoot ${Ini[KissAssist_${Group.Member[${i}].Name}.ini,General,LootOn]} } else /if (${Ini[KissAssist_${EverQuest.Server}_${Group.Member[${i}].Name}.ini,General,LootOn].Length}) { /varset ICanLoot ${Ini[KissAssist_${EverQuest.Server}_${Group.Member[${i}].Name}.ini,General,LootOn]} } else { /varset ICanLoot 1 } /if (${Group.Member[${GMLCounter}].Type.Equal[mercenary]} || ${ICanLoot}==0) { /varcalc GMLCounter ${GMLCounter}-1 /next i } /if (${GMLCounter}>=0) { /echo NINJADVLOOT: ${Group.Member[${GMLCounter}].Name} has been assigned the Master Looter Role /grouproles set ${Group.Member[${GMLCounter}].Name} 5 /delay 2s ${Group.MasterLooter.ID} } else { /echo NINJADVLOOT: Unable to find valid looter, please assign one or more group members >> LootOn=1 << in kissassist_CharacterName.ini file } } else { /if (!${GMLSelect}) /echo NINJADVLOOT: Please Assign a player the Master Looter Role in the group window } } | Change Master Looter if shared list count increases more than 5x without a decrease /if (${AdvLoot.SList[1].ID} && ${GMLSelect} && ${Group.Leader.ID}==${Me.ID}) { /if (${Debugloot}) /echo NINJADVLOOT: Start check ITLootCount=${ITLootCount}, SCountTrack=${SCountTrack} /if (${ITLootCount} > ${SCountTrack} && ${AdvLoot.SCount}>8) { /varset SCountTrack ${ITLootCount} /varcalc LootCountTrack ${LootCountTrack}+1 /if (${SpamLootInfo}) /echo NINJADVLOOT: ${Math.Calc[6-${LootCountTrack}]} shared list increases until new Master Looter is choosen } /if (${ITLootCount} < ${SCountTrack} && ${AdvLoot.SCount}<8) { /varset SCountTrack ${ITLootCount} /varcalc LootCountTrack ${LootCountTrack}-1 /if (${LootCountTrack}<0) /varset LootCountTrack 0 /if (${SpamLootInfo}) /echo NINJADVLOOT: ${Math.Calc[6-${LootCountTrack}]} shared list increases until new Master Looter is choosen } /if (${Debugloot}) /echo NINJADVLOOT: ML switch check ITLootCount=${ITLootCount}, SCountTrack=${SCountTrack}, LootCountTrack=${LootCountTrack} assign a new looter if over 5 /if (${LootCountTrack}>5 && !${MLSwitchTimer}) { /varcalc GMLCounter ${Group.MasterLooter.Index}-1 /for i ${Group.Members} downto 0 /if (${Ini[KissAssist_${Group.Member[${i}].Name}.ini,General,LootOn].Length}) { /varset ICanLoot ${Ini[KissAssist_${Group.Member[${i}].Name}.ini,General,LootOn]} } else /if (${Ini[KissAssist_${EverQuest.Server}_${Group.Member[${i}].Name}.ini,General,LootOn].Length}) { /varset ICanLoot ${Ini[KissAssist_${EverQuest.Server}_${Group.Member[${i}].Name}.ini,General,LootOn]} } else { /varset ICanLoot 1 } /if (${Group.Member[${GMLCounter}].Type.Equal[mercenary]} || ${ICanLoot}==0) { /if (${Debugloot}) /echo NINJADVLOOT: ${Group.Member[${GMLCounter}].Name} is a mercenary or flagged LootOn=0, try the next group member. /varcalc GMLCounter ${GMLCounter}-1 /next i } /if (${GMLCounter}>=0) { /echo NINJADVLOOT: ${Group.Member[${GMLCounter}].Name} has been assigned the Master Looter Role /grouproles set ${Group.Member[${GMLCounter}].Name} 5 /delay 2s ${Group.MasterLooter.ID} /varset LootCountTrack 0 } else { /varset GMLCounter ${Group.Members} /next i } /if (${LootCountTrack}) /echo NINJADVLOOT: Unable to find a valid looter, Time to go sell or assign more group members LootOn=1. /varset MLSwitchTimer 35s } } | Check Bag Space /varset FreeBagSpace 0 /for k 1 to 10 /if (${InvSlot[Pack${k}].Item.Container} && ${InvSlot[Pack${k}].Item.Name.NotEqual[${ExcludeBag1}]} && ${InvSlot[Pack${k}].Item.Name.NotEqual[${ExcludeBag2}]}) { /varcal FreeBagSpace ${FreeBagSpace}+(${InvSlot[Pack${k}].Item.Container}-${InvSlot[Pack${k}].Item.Items}) } /next k | Everyone select need/no for quest items in shared loot /if (${AdvLoot.SCount} && ${FreeBagSpace}>0) { /if (${Debugloot}) /echo SharedList: Checking for Quest Items /varset i 1 :NextQItem /varset ITSCount ${AdvLoot.SCount} /varset ITPName ${AdvLoot.SList[${i}].Name} /varset IniEntry ${Ini[${NinjaIniFile},"${ITPName.Left[1]}","${ITPName}"].Arg[1,|]} /if (${AdvLoot.SList[${i}].ID} && ${Select[${IniEntry},Quest]}) { /varset KeepAmount ${Ini[${NinjaIniFile},"${ITPName.Left[1]}","${ITPName}"].Arg[2,|]} /if (${Debugloot}) /echo SharedList: item# ${i} ${ITPName} keeping ${KeepAmount} /if (${KeepAmount}==0) /varset KeepAmount ${QuestKeep} /if (${Debugloot}) /echo SharedList: ${ITPName}=${IniEntry}|${KeepAmount} /if (${FindItemCount[=${ITPName}]} < ${KeepAmount} && ${AdvLoot.SList[${i}].Need}==false) { /if (${Debugloot}) /echo SharedList:Quest check - I need ${Math.Calc[${KeepAmount}-${FindItemCount[=${ITPName}]}]} more ${ITPName}(s) selecting Greed /if (${SpamLootInfo} && ${AdvLoot.SList[${i}].Need}==false) /echo SharedList: item#${i} - I need ${Math.Calc[${KeepAmount}-${FindItemCount[=${ITPName}]}]} more ${ITPName}(s) selecting Greed /delay 3s !${AdvLoot.LootInProgress} /if (${AdvLoot.SList[${i}].Need}==false) /advloot shared ${i} gd /if (${LootLagDelay}) /delay ${LootLagDelay} } /if (${FindItemCount[=${ITPName}]} >= ${KeepAmount} && ${AdvLoot.SList[${i}].No}==false) { /if (${${Debugloot}}) /echo SharedList:Quest check - I already have ${FindItemCount[=${ITPName}]} of ${KeepAmount} ${ITPName}(s) selecting No /if (${SpamLootInfo} && ${AdvLoot.SList[${i}].No}==false) /echo SharedList: item#${i} - I already have ${FindItemCount[=${ITPName}]} of ${KeepAmount} ${ITPName}(s) selecting No /delay 3s !${AdvLoot.LootInProgress} /if (${AdvLoot.SList[${i}].No}==false) /advloot shared ${i} no /if (${LootLagDelay}) /delay ${LootLagDelay} } /varcalc i ${i}+1 /if (${i}<${ITSCount}) /goto :NextQItem } | Select greed for items in shared loot the master looter has filtered to never /if (${Me.ID}!=${Group.MasterLooter.ID}) { /if (${${Debugloot}}) /echo SharedList: select greed/no for items if not Master Looter /if (${AdvLoot.SList[${i}].ID} && ${Select[${IniEntry},NULL]}) { /if (${SpamLootInfo} && ${AdvLoot.SList[${i}].Greed}==false && ${AdvLoot.SList[${i}].Need}==false && ${AdvLoot.SList[${i}].No}==false) /echo SharedList: item#${i} - I don't know what a ${ITPName} is selecting Greed /delay 3s !${AdvLoot.LootInProgress} /if (${AdvLoot.SList[${i}].Greed}==false && ${AdvLoot.SList[${i}].Need}==false && ${AdvLoot.SList[${i}].No}==false) /advloot shared ${i} gd /delay 3s !${AdvLoot.LootInProgress} /varcalc i ${i}+1 /if (${i}<${ITSCount}) /goto :NextQItem } /if (${AdvLoot.SList[${i}].ID} && ${Select[${IniEntry},Keep,Sell]}) { /if (${SpamLootInfo} && ${AdvLoot.SList[${i}].Greed}==false && ${AdvLoot.SList[${i}].Need}==false && ${AdvLoot.SList[${i}].No}==false) /echo SharedList: item#${i} - I must have a ${ITPName} selecting Need /delay 3s !${AdvLoot.LootInProgress} /if (${AdvLoot.SList[${i}].Greed}==false && ${AdvLoot.SList[${i}].Need}==false && ${AdvLoot.SList[${i}].No}==false) /advloot shared ${i} nd /delay 3s !${AdvLoot.LootInProgress} /varcalc i ${i}+1 /if (${i}<${ITSCount}) /goto :NextQItem } /if (${AdvLoot.SList[${i}].ID} && ${Select[${IniEntry},Ignore,Destroy]}) { /if (${SpamLootInfo} && ${AdvLoot.SList[${i}].Greed}==false && ${AdvLoot.SList[${i}].Need}==false && ${AdvLoot.SList[${i}].No}==false) /echo SharedList: item#${i} - I don't want a ${ITPName} selecting No /delay 3s !${AdvLoot.LootInProgress} /if (${AdvLoot.SList[${i}].Greed}==false && ${AdvLoot.SList[${i}].Need}==false && ${AdvLoot.SList[${i}].No}==false) /advloot shared ${i} no /delay 3s !${AdvLoot.LootInProgress} /varcalc i ${i}+1 /if (${i}<${ITSCount}) /goto :NextQItem } } } | End looting if no bag space /if (${FreeBagSpace}<=3) { /if (!${LootTimer}) { /echo NINJADVLOOT: Your bags are almost full, looting aborted until you go sell /varset LootTimer ${Math.Calc[${Math.Rand[5]}+23]}s } /return } | Master Looter check Shared loot for Keep,Destroy,Sell and que for Personal List if found /if (${Group.MasterLooter.ID}==${Me.ID} && ${AdvLoot.SCount}) { /if (${${Debugloot}}) /echo SharedList: Master Looter go through the shared list /varset i 1 :NextSItem /varset ITSCount ${AdvLoot.SCount} /varset ITPName ${AdvLoot.SList[${i}].Name} /varset IniEntry ${Ini[${NinjaIniFile},"${ITPName.Left[1]}","${ITPName}"].Arg[1,|]} /if (${${Debugloot}}) /echo SharedList: item# ${i}, Name=${ITPName}, IniFile${NinjaIniFile}, IniEntry=${IniEntry} | add nodrop items to ini file /if (${AdvLoot.SList[${i}].NoDrop} && !${Select[${IniEntry},Ignore,Keep,Destroy,Sell,Quest]}) { /if (${NoDropDefault.Arg[1,|].Equal[Quest]}) { /ini "${NinjaIniFile}" "${ITPName.Left[1]}" "${ITPName}" Quest|1 /varset IniEntry Quest /echo NINJADVLOOT: Adding NoDrop item ${ITPName}=Quest|1 to ${NinjaIniFile} file. } else /if (${NoDropDefault.Arg[1,|].Equal[Keep]}) { /ini "${NinjaIniFile}" "${ITPName.Left[1]}" "${ITPName}" Keep /varset IniEntry Keep /echo NINJADVLOOT: Adding NoDrop item ${ITPName}=Keep to ${NinjaIniFile} file. } else { /ini "${NinjaIniFile}" "${ITPName.Left[1]}" "${ITPName}" Ignore /varset IniEntry Ignore /echo NINJADVLOOT: Adding NoDrop item ${ITPName}=Ignore to ${NinjaIniFile} file. } /delay ${Math.Calc[${LootLagDelay}+10]} } | Set items Master Looter has filtered never to autoroll /if (${AdvLoot.SList[${i}].ID} && ${AdvLoot.SList[${i}].Never}==true) { /if (${Debugloot}) /echo SharedList: Master Looter has advloot filter set to Never. Set item ${ITPName} to AutoRoll. /delay 3s !${AdvLoot.LootInProgress} /if (${AdvLoot.SList[${i}].AutoRoll}==False) /advloot shared ${i} autoroll /delay 3s !${AdvLoot.LootInProgress} /if (${LootLagDelay}) /delay ${LootLagDelay} /varcalc i ${i}+1 /if (${i}<${ITSCount}) /goto :NextSItem } |remove no tag if master looter /if (${AdvLoot.SList[${i}].No}==true && ${AdvLoot.SList[${i}].AutoRoll}==false) /advloot shared ${i} no | Leave items marked ignore on corpse /if (${AdvLoot.SList[${i}].ID} && ${Select[${IniEntry},Ignore]}) { /if (${Debugloot}) /echo SharedList: ${ITPName} is set to Ignore. Leaving item. /delay 3s !${AdvLoot.LootInProgress} /advloot shared ${i} leave /delay 3s !${AdvLoot.LootInProgress} /if (${LootLagDelay}) /delay ${LootLagDelay} /if (${i}<${ITSCount}) /goto :NextSItem } | skip item if its lore and everyone in group has one /if (${AdvLoot.SList[${i}].ID} && (${FindItem[${AdvLoot.SList[${i}].Name}].Lore}||${FindItemBank[${AdvLoot.SList[${i}].Name}].Lore})) { /for g 1 to ${Group.Members} /if (${Debugloot}) /echo SharedList: ${AdvLoot.SList[${i}].Name} is Lore and I have one. Giving to ${Group.Member[${g}].Name} /delay 3s !${AdvLoot.LootInProgress} /if (${AdvLoot.SList[${i}].ID} && ${AdvLoot.SList[${i}].Name.Equal[${ITPName}]}) /advloot shared ${i} giveto ${Group.Member[${g}].Name} /delay 3s !${AdvLoot.LootInProgress} /delay 5 /if (${AdvLoot.SList[${i}].ID} && ${AdvLoot.SList[${i}].Name.Equal[${ITPName}]}) /next g /if (${Debugloot}) /echo SharedList: ${AdvLoot.SList[${i}].Name} is Lore and all group members have one. Skipping item. /delay 3s !${AdvLoot.LootInProgress} /if (${AdvLoot.SList[${i}].ID} && ${AdvLoot.SList[${i}].Name.Equal[${ITPName}]}) /advloot shared ${i} leave /if (${LootLagDelay}) /delay ${LootLagDelay} /if (${i}<${ITSCount}) /goto :NextSItem } | Que items to my personal list /if (${AdvLoot.SList[${i}].ID} && ${Select[${IniEntry},Keep,Sell,Destroy,Null]} && ${AdvLoot.SList[${i}].No}==false) { /if (${Debugloot}) /echo SharedList: ${ITPName} is marked Keep,Sell or Destroy. Que item to personal list. /delay 3s !${AdvLoot.LootInProgress} /advloot shared ${i} giveto ${Me.Name} /delay 3s !${AdvLoot.LootInProgress} /if (${LootLagDelay}) /delay ${LootLagDelay} /if (${i}<${ITSCount}) /goto :NextSItem } | Set items marked quest to autoroll /if (${AdvLoot.SList[${i}].ID} && ${Select[${IniEntry},Quest]}) { /if (${Debugloot}) /echo SharedList: ${ITPName} is set to Quest. Setting item to AutoRoll. /delay 3s !${AdvLoot.LootInProgress} /if (${AdvLoot.SList[${i}].AutoRoll}==False) /advloot shared ${i} autoroll /if (${LootLagDelay}) /delay ${LootLagDelay} /varcalc i ${i}+1 /if (${i}<${ITSCount}) /goto :NextSItem } } | Loot/destroy anything in personal list /if (${AdvLoot.PCount}) { /if (${Debugloot}) /echo start personal list check /varset ITSCount ${AdvLoot.PCount} /for k ${ITSCount} downto 1 /varset ITPName ${AdvLoot.PList[${k}].Name} /varset IniEntry ${Ini[${NinjaIniFile},"${ITPName.Left[1]}","${ITPName}"].Arg[1,|]} /if (${Debugloot}||${SpamLootInfo}) /echo NINJADVLOOT: PList: item# ${k}, Name=${ITPName}, IniFile=${NinjaIniFile}, IniEntry=${IniEntry} | Add item to ini if it not in there /if (${AdvLoot.PList[${k}].NoDrop} && !${Select[${IniEntry},Ignore,Keep,Destroy,Sell,Quest]}) { /if (${NoDropDefault.Arg[1,|].Equal[Quest]}) { /ini "${NinjaIniFile}" "${ITPName.Left[1]}" "${ITPName}" Quest|1 /varset IniEntry Quest /echo NINJADVLOOT: Adding NoDrop item ${ITPName}=Quest|1 to ${NinjaIniFile} file. } else /if (${NoDropDefault.Arg[1,|].Equal[Keep]}) { /ini "${NinjaIniFile}" "${ITPName.Left[1]}" "${ITPName}" Keep /varset IniEntry Keep /echo NINJADVLOOT: Adding NoDrop item ${ITPName}=Keep to ${NinjaIniFile} file. } else { /ini "${NinjaIniFile}" "${ITPName.Left[1]}" "${ITPName}" Ignore /varset IniEntry Ignore /echo NINJADVLOOT: Adding NoDrop item ${ITPName}=Ignore to ${NinjaIniFile} file. } /delay ${Math.Calc[${LootLagDelay}+5]} } /if (${AdvLoot.PList[${k}].ID} && !${Select[${IniEntry},Ignore,Keep,Destroy,Sell,Quest]}) { | Loot item, check its value and add to ini file. /if (!${FindItem[${ITPName}].ID}) { /delay 3s !${AdvLoot.LootInProgress} /advloot personal ${k} loot /delay 3s !${AdvLoot.LootInProgress} /delay ${Math.Calc[${LootLagDelay}+5]} /if (${Window[ConfirmationDialogBox].Open}) { /nomodkey /notify ConfirmationDialogBox Yes_Button leftmouseup /delay ${Math.Calc[${LootLagDelay}+10]} } } /varset ITStack ${FindItem[=${ITPName}].StackSize} /if (${ITStack}>20) /varset ITStack 20 /if (${Math.Calc[${ITStack}*(${FindItem[=${ITPName}].Value}/1000)]} < ${StackPlatValue} && !${FindItem[=${ITPName}].WornSlots}) { /ini "${NinjaIniFile}" "${ITPName.Left[1]}" "${ITPName}" Ignore /echo NINJADVLOOT: Adding worthless ${ITPName}=Ignore to the ${NinjaIniFile} file. } else { /ini "${NinjaIniFile}" "${ITPName.Left[1]}" "${ITPName}" Keep /echo NINJADVLOOT: Adding valuable ${ITPName}=Keep to the ${NinjaIniFile} file. } /goto :NextPItem } | skip item if its lore and i have one /if (${FindItem[${AdvLoot.PList[${k}].Name}].Lore}||${FindItemBank[${AdvLoot.PList[${k}].Name}].Lore}) { /if (${Debugloot}) /echo NINJADVLOOT: PList: ${ITPName} is Lore and I have one. Skipping item. /delay 3s !${AdvLoot.LootInProgress} /advloot personal ${k} leave /delay 3s !${AdvLoot.LootInProgress} /if (${LootLagDelay}) /delay ${LootLagDelay} /goto :NextPItem } | Leave items marked ignore on corpse /if (${Select[${IniEntry},Ignore]}||${AdvLoot.PList[${k}].Never}==true) { /if (${Debugloot}) /echo NINJADVLOOT: PList: ${ITPName} is marked Ignore. Leaving item. /delay 3s !${AdvLoot.LootInProgress} /advloot personal ${k} leave /delay 3s !${AdvLoot.LootInProgress} /if (${LootLagDelay}) /delay ${LootLagDelay} /goto :NextPItem } | Check quantity of Quest items and loot or leave /if (${Select[${IniEntry},Quest]}) { /varset KeepAmount ${Ini[${NinjaIniFile},"${ITPName.Left[${i}]}","${ITPName}"].Arg[2,|]} /if (${KeepAmount}==0) /varset KeepAmount ${QuestKeep} /if (${Debugloot}) /echo NINJADVLOOT: PList: ${ITPName}=${IniEntry}|${KeepAmount} /if (${FindItemCount[=${ITPName}]} < ${KeepAmount}) { /if (${SpamLootInfo}) /echo NINJADVLOOT: PList: I need ${Math.Calc[${KeepAmount}-${FindItemCount[=${ITPName}]}]} more ${ITPName}(s) loot it /delay 3s !${AdvLoot.LootInProgress} /advloot personal ${k} loot /delay ${Math.Calc[${LootLagDelay}+5]} /if (${Window[ConfirmationDialogBox].Open}) { /nomodkey /notify ConfirmationDialogBox Yes_Button leftmouseup /delay ${Math.Calc[${LootLagDelay}+10]} } } else { /if (${${SpamLootInfo}}) /echo NINJADVLOOT: PList: I already have ${FindItemCount[=${ITPName}]} of ${KeepAmount} ${ITPName}(s) leave it /delay 3s !${AdvLoot.LootInProgress} /advloot personal ${k} leave /if (${LootLagDelay}) /delay ${LootLagDelay} } /goto :NextPItem } | Loot remaining items keep/sell/destroy /if (${Select[${IniEntry},Keep,Destroy,Sell]}) { /if (${Debugloot}) /echo NINJADVLOOT: PList: 1 ${ITPName}=${IniEntry} /delay 3s !${AdvLoot.LootInProgress} /advloot personal ${k} loot /delay 3s !${AdvLoot.LootInProgress} /delay ${Math.Calc[${LootLagDelay}+5]} /if (${Window[ConfirmationDialogBox].Open}) { /nomodkey /notify ConfirmationDialogBox Yes_Button leftmouseup /delay ${Math.Calc[${LootLagDelay}+10]} } /if (${Select[${IniEntry},Destroy]}) { /if (${LootLagDelay}) /delay ${LootLagDelay} /call HandleItem "${ITPName}" Destroy } } :NextPItem /next k | Report Bag Space /if (${SpamLootInfo}) { /varset FreeBagSpace 0 /for k 1 to 10 /if (${InvSlot[Pack${k}].Item.Container} && ${InvSlot[Pack${k}].Item.Name.NotEqual[${ExcludeBag1}]} && ${InvSlot[Pack${k}].Item.Name.NotEqual[${ExcludeBag2}]}) { /varcal FreeBagSpace ${FreeBagSpace}+(${InvSlot[Pack${k}].Item.Container}-${InvSlot[Pack${k}].Item.Items}) } /next k /echo NINJADVLOOT: free bag space = ${FreeBagSpace}, looting stops if <=3 } } } /if (${Group.MasterLooter.ID}==${Me.ID}) /varset LootTimer ${Math.Calc[${Math.Rand[5]}+3]}s /if (${Group.MasterLooter.ID}!=${Me.ID}) /varset LootTimer ${Math.Calc[${Math.Rand[5]}+8]}s /if (${Debugloot}) /echo Leaving UseAdvLoot next check in ${Math.Calc[${LootTimer}/10]} seconds /varset SubEnd ${Macro.RunTime} /if (${SpamLootInfo}) /if (${AdvLoot.SCount}!=${ITLootCount}) /echo Looting complete - elasped time to process ${ITLootCount} items = ${Math.Calc[${SubEnd}-${SubStart}]} seconds /return Sub HandleItem(ItemName, DoWhat) /if (${Debugloot}) /echo DEBUGLOOT Enter Sub HandleItem ${ItemName} ${DoWhat} /declare HandleTimer timer local 5s /if (${DoWhat.Equal[Destroy]} && ${FindItem[=${ItemName}].ID}) { :GetItem /nomodkey /ctrl /itemnotify "${ItemName}" leftmouseup /delay 1s ${Cursor.ID} /if (!${Cursor.ID} && ${HandleTimer}) /goto :GetItem /if (${Cursor.ID}==${FindItem[=${ItemName}].ID}) { /echo NINJADVLOOT: Destroying ${Cursor.Name} /destroy /delay ${Math.Calc[${LootLagDelay}+5]} /if (${Window[ConfirmationDialogBox].Open}) { /nomodkey /notify ConfirmationDialogBox Yes_Button leftmouseup /delay ${Math.Calc[${LootLagDelay}+10]} } /delay 1s !${Cursor.ID} } } /if (${Debugloot}) /echo DEBUGLOOT Leave Sub HandleItem /return Sub CheckGlobalList(GItemName,int GListNum, LootSystem) /declare i int local /declare j int local /declare GItem string local | Create global list from ini file /if (${GlobalLootOn} && ${GlobalList[1].Equal[empty]}) { /for i 1 to ${${GlobalCount}} /varset GItem ${Ini[${NinjaIniFile},"Global","Global${i}"]} /if (!${GItem.Find[item name]} && !${GItem}) { /varset GlobalList[${i}] ${GItem} } /next i } | Check if item is in global list /if (${Debugloot}) /echo DEBUGLOOT CheckGlobalList /for j 1 to ${GlobalCount} /if (${GlobalList[${i}].Arg[1,|].Find[${GItemName}]}) { /if (${LootSystem.Equal[${AdvLoot.SCount}]}) { /if (${GlobalList[${i}].Arg[2,|].Equal[Ignore]}) /advloot shared ${GListNum} leave /if (${Select[${GlobalList[${i}].Arg[2,|]},sell,keep,destroy]} ) { /advloot shared ${GListNum} giveto ${Me.Name} /delay 10 } } /if (${LootSystem.Equal[${AdvLoot.PCount}]}) { /if (${GlobalList[${i}].Arg[2,|].Equal[Ignore]}) /advloot shared ${GListNum} leave /if (${Select[${GlobalList[${i}].Arg[2,|]},sell,keep,destroy]} ) { /advloot personal ${GListNum} loot /delay 10 /if (${Window[ConfirmationDialogBox].Open}) { /nomodkey /notify ConfirmationDialogBox Yes_Button leftmouseup /delay 10 } /if (${Select[${IniEntry},Destroy]}) { /call HandleItem "${GItemName}" Destroy } } } } /next j /return​


- - - Updated - - -

I think all items should default to "greed". Keep means it's a "need". That would allow people to very easily split out individual ini files for a toon to loot specifiic items at priority over other characters.​
 
Thank you for sharing. This is part of what makes the community great.... sharing.

One suggestion:
Change the conditions in your need/greed selections, example:
Rich (BB code):
/if (${AdvLoot.SList[${i}].Need}==false) /advloot shared ${i} gd

should be

/if (${AdvLoot.SList[${i}].greed}==false) /advloot shared ${i} gd

This will avoid turning the selection on, then off, then on.... over and over
also avoids a certain amount of spam.

Now... I understand your thinking, but respectfully disagree. The second great thing about this community and macro writing is adjusting macro's to suit individual needs, so if it works for you great.
explanation for disagreeing... all items default to keep, unless coded to something else. When looting items for a quest it is vital that each group member get at least the required number of items, assuming everyone in the group is doing the quest. This is "Need" as you can't complete the quest without them, most quest require the actual looting of the item not simple possession of the item. Everything else is "Greed". This only really matters for nodrop/notrade items: If the item can be traded does it really matter who loots it as long as someone does?

You mentioned lore items. They are sorted only by keep vs ignore. If marked =keep the item is distributed to everyone, when no one can loot the item it is left on the corpse (ignored). Marking lore items with =quest causes ... actually I don't remember the problem it caused. I think it locked up if the winning roll already had one.

The problem is farming nodrop wearable (armor) items. We absolutely need a method for determining who should get the item while it is still in the sharedlist window. This is the next major evolution of ninjadvloot.
The only way I can think of is to get access to the item TLO while it is in the shared list. I have not managed to figure out how.
Some thing like ${AdvLoot.SList[x].Item.member}
 
I guess the only problem I'm having now is that if my ML has an item already and it is LORE the item is then distributed to the group by the ML rather than just opening it up to a roll that their INI files can select need/greed/no. So if I have my SHD looting and he gets an item and then I want that item to go to my BRD next it doesn't happen. I'm working on adjusting the order of my group members to address this.
 
I guess the only problem I'm having now is that if my ML has an item already and it is LORE the item is then distributed to the group by the ML rather than just opening it up to a roll that their INI files can select need/greed/no. So if I have my SHD looting and he gets an item and then I want that item to go to my BRD next it doesn't happen. I'm working on adjusting the order of my group members to address this.

Is the Lore item also nodrop?
 
Typically I would make the character needing the item master looter until they get it. Your idea to is intriguing though.

- - - Updated - - -

I guess the only problem I'm having now is that if my ML has an item already and it is LORE the item is then distributed to the group by the ML rather than just opening it up to a roll that their INI files can select need/greed/no. So if I have my SHD looting and he gets an item and then I want that item to go to my BRD next it doesn't happen. I'm working on adjusting the order of my group members to address this.

I think the area of code you need to change is:

Rich (BB code):
			| skip item if its lore and everyone in group has one
			/if (${AdvLoot.SList[${i}].ID} && (${FindItem[${AdvLoot.SList[${i}].Name}].Lore}||${FindItemBank[${AdvLoot.SList[${i}].Name}].Lore})) {
				/for g 1 to ${Group.Members}
				/if (${Debugloot}) /echo SharedList: ${AdvLoot.SList[${i}].Name} is Lore and I have one. Giving to ${Group.Member[${g}].Name}
				/delay 3s !${AdvLoot.LootInProgress}
				/if (${AdvLoot.SList[${i}].ID} && ${AdvLoot.SList[${i}].Name.Equal[${ITPName}]}) /advloot shared ${i} giveto ${Group.Member[${g}].Name}
				/delay 3s !${AdvLoot.LootInProgress}
				/delay 5
				/if (${AdvLoot.SList[${i}].ID} && ${AdvLoot.SList[${i}].Name.Equal[${ITPName}]}) /next g
				/if (${Debugloot}) /echo SharedList: ${AdvLoot.SList[${i}].Name} is Lore and all group members have one. Skipping item.
				/delay 3s !${AdvLoot.LootInProgress}
				/if (${AdvLoot.SList[${i}].ID} && ${AdvLoot.SList[${i}].Name.Equal[${ITPName}]}) /advloot shared ${i} leave
				/if (${LootLagDelay}) /delay ${LootLagDelay}
				/if (${i}<=${ITSCount}) /goto :NextSItem
			}

I believe if you simple comment out that section it will do as you want. I still need time to study your idea with separate ini files for each character.
 
Commenting out that section seems to have worked. I need to see what happens a little more, but it seems promising.

- - - Updated - - -

I take it back. Once no one is interested in an item the ML seems to get stuck in a loop.
 
Commenting out that section seems to have worked. I need to see what happens a little more, but it seems promising.

- - - Updated - - -

I take it back. Once no one is interested in an item the ML seems to get stuck in a loop.

I got to wondering about that later... at least we are on the right track. I have an idea that might work better. Lore items could possible be treated more like nodrop and =quest marked items, but it involves changes in several places. I'm so busy at work just now it will probable be week or better until I can get this done.
 
And not to pile on with things, but when a LORE augment is equipped it can lead to crashes. Had that issue in the unmodified version and it does persist.
 
I'm now messing around with Quest|0 by disabling the portion of the inc that resets Quest|0 to the default quest keep value. Might be promising!
 
And not to pile on with things, but when a LORE augment is equipped it can lead to crashes. Had that issue in the unmodified version and it does persist.

Crash of the macro or crash of your MQ2/EQ Account??!!??!
 
Crash of the macro or crash of your MQ2/EQ Account??!!??!

I've had it simply hang up forever or even crash MQ2/EQ. Finditem doesn't seem to locate augments that are in items already and it seems to get things stuck in a loop - especially for the ML.

- - - Updated - - -

Should note what it does is clicks over and over trying to select the item. This is in 6.2 with advloot enabled.
 
so you can't loot a lore augment because your toon has equipped the augment already and mq2 doesn't recognize that?
 
so you can't loot a lore augment because your toon has equipped the augment already and mq2 doesn't recognize that?

Exactly. The FindItem TLO turns up items in your inventory or items that are equipped, but doesn't seem to return augments that are equipped in your items. The lore check uses FindItem and FindItemBank.

- - - Updated - - -

actually may be working now.

- - - Updated - - -

Nope! Still weird.
 
Attempts to reproduce this have so far failed, but you are right ${FindItem[name].Lore} returns NULL if searching an aug that's equipped.

This will take some thought.
 
I've been absolutely driving myself crazy with this. Every time I think I have it working I run into a new speed bump. My current issue is HoT mobs that drop both an item and a visible drop piece leading to only one of the two items being looked at by characters and then one of the two getting left on the corpse. Doesn't happen every time. Maybe 25% failure rate.

What I really want items marked quest to do is this:

1 - i remarked the two lines in the inc file that make it so that quest items cannot be marked 0. Then I add all the items for a zone I'm after and mark them as quest|1 or quest|0 depending on if a toon wants them.
2 - item appears in advloot window all members make their selections on the items
3 - ML now tries to distribute the quest items to the group in the way that lore items are distributed, but begins with group member 0 instead of 1. Members who have selected no will trigger a rejection leading the ML to try the next member.

The issue I'm running into is that the processing of items is sometimes out of sync so a character who would normally select NO hasn't processed the item yet. Especially a problem for the ML. When that occurs the item goes to their personal list and then gets left on the corpse.

It's so frustrating because advloot is annoying as hell to configure compared to loot ini files and all I want to do is juggle my child, farm items and make sure no one is spying on me through audio alerts.

- - - Updated - - -

Now that I've said it about not looking at all items, perhaps a change here?

Rich (BB code):
| Everyone select need/no for quest items in shared loot
/if (${AdvLoot.SCount} && ${FreeBagSpace}>0) {
/if (${Debugloot}) /echo SharedList: Checking for Quest Items
/varset i 1
:NextQItem
/varset ITSCount ${AdvLoot.SCount}
/varset ITPName ${AdvLoot.SList[${i}].Name}
/varset IniEntry ${Ini[${NinjaIniFile},"${ITPName.Left[1]}","${ITPName}"].Arg[1,|]}
/if (${AdvLoot.SList[${i}].ID} && ${Select[${IniEntry},Quest]}) {
/varset KeepAmount ${Ini[${NinjaIniFile},"${ITPName.Left[1]}","${ITPName}"].Arg[2,|]}
/if (${Debugloot}) /echo SharedList: item# ${i} ${ITPName} keeping ${KeepAmount}
/if (${KeepAmount}==0) /varset KeepAmount ${QuestKeep}
/if (${Debugloot}) /echo SharedList: ${ITPName}=${IniEntry}|${KeepAmount}
/if (${FindItemCount[=${ITPName}]} < ${KeepAmount} && ${AdvLoot.SList[${i}].Need}==false) {
/if (${Debugloot}) /echo SharedList:Quest check - I need ${Math.Calc[${KeepAmount}-${FindItemCount[=${ITPName}]}]} more ${ITPName}(s) selecting Need
/if (${SpamLootInfo} && ${AdvLoot.SList[${i}].Need}==false) /echo SharedList: item#${i} -  I need ${Math.Calc[${KeepAmount}-${FindItemCount[=${ITPName}]}]} more ${ITPName}(s) selecting Need
/delay 3s !${AdvLoot.LootInProgress}
/if (${AdvLoot.SList[${i}].Need}==false) /advloot shared ${i} nd
/if (${LootLagDelay}) /delay ${LootLagDelay}
}
/if (${FindItemCount[=${ITPName}]} >= ${KeepAmount} && ${AdvLoot.SList[${i}].No}==false) {
/if (${${Debugloot}}) /echo SharedList:Quest check - I already have ${FindItemCount[=${ITPName}]} of ${KeepAmount} ${ITPName}(s) selecting No
/if (${SpamLootInfo} && ${AdvLoot.SList[${i}].No}==false) /echo SharedList: item#${i} - I already have ${FindItemCount[=${ITPName}]} of ${KeepAmount} ${ITPName}(s) selecting No
/delay 3s !${AdvLoot.LootInProgress}
/if (${AdvLoot.SList[${i}].No}==false) /advloot shared ${i} no
/if (${LootLagDelay}) /delay ${LootLagDelay}
}
/varcalc i ${i}+1
/if (${i}<${ITSCount}) /goto :NextQItem
}

becomes

Rich (BB code):
| Everyone select need/no for quest items in shared loot
/if (${AdvLoot.SCount} && ${FreeBagSpace}>0) {
/if (${Debugloot}) /echo SharedList: Checking for Quest Items
/varset i 1
:NextQItem
/varset ITSCount ${AdvLoot.SCount}
/varset ITPName ${AdvLoot.SList[${i}].Name}
/varset IniEntry ${Ini[${NinjaIniFile},"${ITPName.Left[1]}","${ITPName}"].Arg[1,|]}
/if (${AdvLoot.SList[${i}].ID} && ${Select[${IniEntry},Quest]}) {
/varset KeepAmount ${Ini[${NinjaIniFile},"${ITPName.Left[1]}","${ITPName}"].Arg[2,|]}
/if (${Debugloot}) /echo SharedList: item# ${i} ${ITPName} keeping ${KeepAmount}
/if (${KeepAmount}==0) /varset KeepAmount ${QuestKeep}
/if (${Debugloot}) /echo SharedList: ${ITPName}=${IniEntry}|${KeepAmount}
/if (${FindItemCount[=${ITPName}]} < ${KeepAmount} && ${AdvLoot.SList[${i}].Need}==false) {
/if (${Debugloot}) /echo SharedList:Quest check - I need ${Math.Calc[${KeepAmount}-${FindItemCount[=${ITPName}]}]} more ${ITPName}(s) selecting Need
/if (${SpamLootInfo} && ${AdvLoot.SList[${i}].Need}==false) /echo SharedList: item#${i} -  I need ${Math.Calc[${KeepAmount}-${FindItemCount[=${ITPName}]}]} more ${ITPName}(s) selecting Need
/delay 3s !${AdvLoot.LootInProgress}
/if (${AdvLoot.SList[${i}].Need}==false) /advloot shared ${i} nd
/if (${LootLagDelay}) /delay ${LootLagDelay}
}
/if (${FindItemCount[=${ITPName}]} >= ${KeepAmount} && ${AdvLoot.SList[${i}].No}==false) {
/if (${${Debugloot}}) /echo SharedList:Quest check - I already have ${FindItemCount[=${ITPName}]} of ${KeepAmount} ${ITPName}(s) selecting No
/if (${SpamLootInfo} && ${AdvLoot.SList[${i}].No}==false) /echo SharedList: item#${i} - I already have ${FindItemCount[=${ITPName}]} of ${KeepAmount} ${ITPName}(s) selecting No
/delay 3s !${AdvLoot.LootInProgress}
/if (${AdvLoot.SList[${i}].No}==false) /advloot shared ${i} no
/if (${LootLagDelay}) /delay ${LootLagDelay}
}
/varcalc i ${i}+1
/if (${i}<=${ITSCount}) /goto :NextQItem
}

I'm probably wrong, but if there were, say, 4 items in shared window it would do items 1, 2 and 3 and then when i = 4 it would move on. Right?
 
Updated ninjadvloot file on original post:

changes:
Added feature to limit how many foraged items are kept using the =quest|xx flag. cred: Incognito
destroying items should no longer leave the bag open. cred: Incognito
looted stacks of items should be properly destroyed without destroying more than the amount looted
corrected an issue for checking items on the shared loot list, it should now check every item each loot cycle instead of occasional skipping an item
The Master Looter will flag items marked never or no to autoroll (this should help with each group member having their own ini file) cred: dreamflux

- - - Updated - - -

Corrected couple issue, see original post for details... Now to actually play some EQ on my day off.
 
We've added hoosierbilly's ninjadvloot to Very Vanilla. Thank you for keeping it updated!
 
File Update v6.06: 5/7/17
Added support for handling fishing items.

File Update v6.05: 2/4/17
Added a freeinventory check to interrupt looting if bags get full midcycle.

File Update v6.04: 1/4/17
Corrected problem causing no drop items marked with =Quest to be changed to =ignore in the loot.ini file.

File Update v6.04: 12/28/16
Fixed an issue with lore items, search will now look for the exact item name instead of partial item name.

File Update v6.02: 9/29/16
Hotfix for equipped augs: It's an ugly fix based on an assumption all augs are LORE, but seems to be working.

File Updated v6.01: 9/11/16
Loot spam was still irritating me so I made some more changes:

Always spams:
1. any changes to the loot.ini file
2. selection/changes in Group MasterLooter
3. problems that cause looting to fail, such as full inventory or the lack of a Group MasterLooter

SpamLootInfo=1 spams:
1. The process and disposition of loot items by the Group MasterLooter
2. when group members select need/greed/no

All spam is sent to the MQ2 chat window.

PLEASE report your experience with ninjadvloot here, I will monitor this post, but may not catch problems reported in the main compile post.

Thank you beta testers, without whom this would not be possible.

CREDIT: Incognito for user testing and suggesting too many improvements to recount.

IMPROVMENTS/CHANGES from ninjadvloot 5.x
Recommend reading Ninjadvloot 5.2 for basic use.
I will be updating the wiki... soon, I hope.

WARNING:
Attempting to use both the in-game advanced loot filters and Ninjadvloot 6.x will cause strange behavior. It is strongly recommended you ensure the following in-game advloot settings:
1. LOOT ALL is turned off in the advloot window.
2. Don't say I didn't warn you. Attempts to get both system to work together have not been entirely successful.

Improvements have been made to getting the two systems to work better together. You should be able to use the in-game filter 'Never' to limit who will and will not loot particular items. This does require catching the item in the advloot window and manually selecting the in-game filter.



IMPROVMENT #1 - Automatically Select/Replace Group Master Looter
New user selectable setting: GMLSelect=1 0=off/1=on
Allows Ninjadvloot to automatically select a Group Master Looter and replace the Group Master Looter if his/her bags become full.
To exclude a group member from being selected Master Looter turn off looting (LootOn=0) in your KissAssist_CharactorName.ini file. By default all group members are selectable as Master Looter.
NOTE: kissassist.mac users, LootOn=0 in your kissassist settings file will prevent the flag =quest|xx from working properly.

New loot.ini setting: ExcludeBag1=Extraplanar Trade Satchel
Exclude special/limited item bags from being counted toward available inventory slots.
Required for the proper replacement of Group Master Looter when bags become full.



IMPROVMENT #2 - Quest Looting
New item ini file setting: =Quest|xx
NOTE: This has nothing to do with the in-game item descriptions.
This setting uses the advloot autoroll feature to distribute a given number of an item marked =Quest|xx in the loot.ini file to each group member. After each group member has xx items any additional items will be ignored.
This setting will also limit the number of foraged items the forager keeps, additional items will be destroyed.
Items must by manually marked in the loot.ini file using either a text editor or the new command /lootquest.
The default number of items to be kept is user selectable with the loot.ini setting QuestKeep=10
The actual number of items to be kept can be manually adjusted (with a text editor) in the loot.ini file.
For this function to work properly every group member must check for loot items in their advloot window.



IMPROVEMENT #3 - Plat Farming
New user selectable setting: StackPlatValue=0
Loots and checks the value of a stack of any NEW items being added to the loot.ini file. Stack size is limited to 20.
If item stack value is less then StackPlatValue setting, item will be marked =Ignore in the loot.ini file
WARNING: low value tradeskill and LORE items will be marked =Ignore if below the StackPlatValue setting
Because the item must be looted to check it's value, one of the item will remain in your bag
Items that can be worn (equipped) bypass this check and will be marked =Keep in the loot.ini file



ADDITIONAL NOTES:
New user selectable setting: NoDropDefault=Quest|Keep|Ignore
Determines how NoDrop/NoTrade items will be marked in the loot.ini file when encountered for the first time. The default is Quest|1

New user selectable setting: SaveBagSlots=3
Allows you to reserve or save a number of empty bag slots for quest, nodrop or lore items. Default is 3

New user selectable setting: LootLagDelay=0
Increase the setting if you have problems with lag. 5=half second, 10=one second, 20=two seconds...

New user selectable setting: SpamLootInfo=1 0=off/1=on
Spams loot information to your MQ window

LORE items marked =Keep in the loot.ini file will be distributed to everyone in the group, when everyone has one item will be ignored.

Allowing your Group Master Looter to die is NOT recommended. Locked items will be ignored, possibly leaving desirable or valuable items on corpse.

PLEASE report your experience with ninjadvloot here, I will monitor this post, but may not catch problems reported in the main compile post.

File version 6.06
 

Attachments

Last edited:
I've been using this awhile now, you've done a good job with it.
Just grabbed latest will let you know if I see anything.
 
I've been using one of the earlier versions for at least a couple of months now... great work. Looking forward to trying this one out and seeing what I can break :)
 
Release Ninjadvloot.inc

Users who are viewing this thread

Back
Top
Cart