• 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 (1 Viewer) 2022-06-23

No permission to download
Re: NinjAdvLoot 4.4 12/15/2013

Thanks tms I'll give it a try tomorrow night and post my results.

- - - Updated - - -

Didn't make any difference unfortunately :(

[2014/01/17 13:05:29] [MQ2] Selling Vial of Gnoll Blood

[2014/01/17 13:05:32] [MQ2] Selling Vial of Gnoll Blood

[2014/01/17 13:05:35] [MQ2] Selling Lumber Plank

[2014/01/17 13:05:38] [MQ2] Selling Gold Nugget

[2014/01/17 13:05:41] [MQ2] Selling Gold Nugget

[2014/01/17 13:05:41] Invalid item slot 'null'

[2014/01/17 13:05:44] [MQ2] Selling Gold Nugget

[2014/01/17 13:05:44] Invalid item slot 'null'

[2014/01/17 13:05:47] [MQ2] Selling Gold Nugget

[2014/01/17 13:05:47] Invalid item slot 'null'

[2014/01/17 13:05:50] The current macro has ended.
 
Re: NinjAdvLoot 4.4 12/15/2013

Then one of the true Macro ninjas need to help you, i am not more than a beginner in macro'ing.
 
Re: NinjAdvLoot 4.5 01/19/2014

Ninjadvloot.inc v4.5 01/19/2014 Uploaded


~FIXED Invalid item slot 'null' - I think
 
Re: NinjAdvLoot 4.5 01/19/2014

Thanks Maskoi :) I'll give it a try and let you know
 
Re: NinjAdvLoot 4.5 01/19/2014

i just tried and it works great again!! THANKS SO MUCH
 
Re: NinjAdvLoot 4.5 01/19/2014

Sorry should have posted sooner but not been playing so much recently - all working now thanks Maskoi!
 
Re: NinjAdvLoot 4.5 01/19/2014

Am I supposed to be adding: LootForage=1 for handling Rogue Pick Pocketed items? This is just something minor I am trying to get working as they stay on m cursor the whole time.

I apologize if this was asked somewhere else but I was not able to find it.
 
Re: NinjAdvLoot 4.5 01/19/2014

It does not handle that but I can add it if you tell me what the message is on a successful pick pocket
 
Re: NinjAdvLoot 4.5 01/19/2014

It does not handle that but I can add it if you tell me what the message is on a successful pick pocket

The message with successful Pick Pocketing is below.

Example:
"You have stolen a Crystallized Sulfur"
"You have stolen 5 silver"

Once again thanks for your help!
 
Re: NinjAdvLoot 4.5 01/19/2014

Anyway to set it to destroy everything except certain items? For example set around 5 items to keep and then have it destroy everything else?
 
Re: NinjAdvLoot 4.5 01/19/2014

Yes mark the 5 item keep and everything else destroy lol. There is not a global destroy mode too dangerous.
 
Re: NinjAdvLoot 4.5 01/19/2014

I have searched and searched, I am using loot.mac which makes a call to this ini but I want it to loot EVERYTHING if possible, lore would fail but I want to get the no drop items as my armor set drops off random mobs I am killing and I want to loot it! how do I tell loot.mac to loot ALL items if they can be looted?
 
Re: NinjAdvLoot 4.5 01/19/2014

Open your loot.ini file in notepad and set everything you want to =loot
 
I would like to request/suggest some kind of loot order for a group running KISS. Say like warrior is 1st priority, shaman is 2nd and bard is 3rd. So when warrior automatically switches to LootOn=0 due to not having more inventory space; shaman takes over.

I don't see the point in having 3-6 chars all running to every single mob that dies trying to loot it.

I think it looks suspecious but I don't want to have LootOn=0 set either because my primary looter will get filled up with stuff over time.

Any thoughts about this? :)

[/endofsuggestion]
 
Ok, so here is how you can do it. Open up KISS mac.

Find:
/call LoadIni General LootOn int 0

Add this below it:
/call LoadIni General NextLooter string NULL

Find Sub LootStuff and add this line:
Rich (BB code):
    Sub LootStuff
        /if (!${LootOn} || ${AggroTargetID} || ${DMZ})  /return
        /if (${Debug}) /echo ...debug LootStuff: Enter
        /if (${Me.FreeInventory}==0) {
            /echo Inventory is full. Looting OFF
            /varset LootOn 0
            /if (${SpawnCount[${NextLooter}]}) /bc NextLooter ${NextLooter}
            /return
        }
        /doevents
        /call LootMobs
        /if (${Debug}) /echo ...debug LootStuff: Leave
    /return

Find Sub Event_EQBCIRC(EIMessage,EISender,EICommand), add:
Rich (BB code):
    Sub Event_EQBCIRC(EIMessage,EISender,EICommand)
    /if (${EICommand.Left[1].Equal[/]} && ${EICommand.Left[2].NotEqual[/]}) /docommand ${EICommand}
    /if (${EICommand.Arg[1," "].Equal[NextLooter]} && ${EICommand.Arg[2," "].Equal[${Me.Name}]}) /varset LootOn 1
    /doevents flush Event_EQBCIRC
    /return

This should add an entry into your ini:
[General]
NextLooter=PeteSampras

and that will designate who is on deck to loot should you become full using mq2eqbc. If you arent using mq2eqbc, it would need changed, obviously.
 
Re: NinjAdvLoot 4.5 01/19/2014

Heya all,

wanted to share my tweaks to this. If folks like can incorporate it to the compile.
I added code to allow looting while on a mount and not overshoot the corpse.
Also found a delay of 1s for opening of the Lootwindow, added conditional check to skip unnecessary delay.

Last: I tweaked the Announcment for skipped Loot, because of different Keyboard keypresses.
Note: If someone could pls test the announcement feature on an american keyboard setting and let me know if it works for em. Thx.
I suggest to set your channel in loot.ini to "bc" for MQ2EQBC.

Crystane.

Code:
Rich (BB code):
| Ninjadvloot.inc v4.6.1  05/13/2014 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
|
| 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
|
| 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
|     /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 NullSlot         "#*#Invalid item slot 'null#*#"
#Event Lore             "#*#You cannot loot this Lore Item.#*#"

Sub SetupAdvLootVars(string ChangeIniFile)

    /declare CantLootID                         int                 outer 
    /declare NinjadVersion                      string              outer   4.6
    /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 AutoHater                          int                 outer
    /if (${ChangeIniFile.Length}) {
        /varset NinjaIniFile ${ChangeIniFile}
        /echo Ninja Advance Loot in now writing all info to the ${ChangeIniFile} file.
    }
    /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}
        /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 OpenAllBags        1                   int
    /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 LootForageSpam     1                   int
    /call NALLoadVar Settings GlobalLootOn       1                   int
    /call NALLoadVar Settings LootForageSpam     1                   int
    /call NALLoadVar Settings CombatLooting      0                   int
    /call FindAutoHate
    /echo NINJADVLOOT: Variables are set.

/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 There are ${DeadCount} corpses in range.
    /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 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 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 /Call LootCorpse
                /call LootCorpse ${Target.ID}
                /call RemoveCorpseID ${CorpseToLoot}
            }
        :SkipCorpse
    /next i
    /if (${Debugloot}) /echo Leave Sub LootMobs 
/return

Sub LootCorpse(CorpseID)
    /if (${Debugloot}) /echo 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 /loot
    | Open Loot window
    /loot
    /if (${Debugloot}) /echo /doevents CantLoot
    /delay 1s ${Window[LootWnd]}
    /delay 1
    /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 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 :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 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 Enter 
                /keypress /
		/delay 3
                /call Type "${LootChannel}"
                /keypress Space chat
                /notify LootWND LW_BroadcastButton leftmouseup 
                /delay 3
                /call Type " ,left on corpse."
|                /keypress /
                /keypress Enter chat
                /if (${Defined[CorpseLocked${CorpseID}]}) /varset CorpseLocked${CorpseID} 440s
            }
        }
    }
    :clickdoneffs
        /nomodkey /notify LootWnd LW_DoneButton leftmouseup
        /if (${Debugloot}) /echo :clickdoneffs 
        /delay 5s !${Window[LootWnd].Open}
        /if (${Debugloot}) /echo :clickdoneffs LootWin Open:${Window[LootWnd]}
    /if (${Window[LootWnd].Open}) /goto :clickdoneffs
    /call RemoveCorpseID ${CorpseID}
    /if (${Debugloot}) /echo Leave Sub LootCorpse
/return

Sub Event_CantLoot
   /if (${Debugloot}) /echo Enter Sub Event_CantLoot
   /varset CantLootID ${Target.ID}
   /if (${Debugloot}) /echo  Event_CantLoot Can't loot ${Target.CleanName} ${Target.ID}
   /if (${Debugloot}) /echo 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 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 3s !${Corpse.Item[${i}].ID} /if (${Cursor.ID}) /call CheckCursor /if (${Debugloot}) /echo Leave Sub LootItem /return Sub CheckCursor /if (${Debugloot}) /echo 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 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} } } /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 /if (${OpenAllBags}) { /echo Opening all bags /keypress OPEN_INV_BAGS } /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 /if (${OpenAllBags}) { /echo Closing all bags /keypress CLOSE_INV_BAGS } | 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 ( ${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 /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 } /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 27 /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_NullSlot /echo NINJADVLOOT: Opening all bags to correct null slot /keypress OPEN_INV_BAGS /timed 30 /keypress CLOSE_INV_BAGS /return​
 
Last edited:
Re: NinjAdvLoot 4.5 01/19/2014

Was trying to get my mounted mage to loot forever (didnt know you couldnt loot while mounted hehe), but with your tweaks Crystane I still cant get my mage to loot :S

Any clues?

- - - Updated - - -

Hmm after some testing, my mage doesnt loot while unmounted either :S
 
Re: NinjAdvLoot 4.5 01/19/2014

I figured if the range for hostile near is too wide, it wont loot at all. I keep that value pretty low in my ini. My changes only make your toon step the break early enough while approaching a corpse on mount to not overshoot and be out of range to loot when finally stopped.
 
Re: NinjAdvLoot 4.5 01/19/2014

My bard and my sk loot perfectly, they are both not mounted. My mage doesnt do a thing though, mounted or not, while using the same settings.
 
Re: NinjAdvLoot 4.5 01/19/2014

Could you PM me your clean Kissassist.ini and loot.ini for the mage and I ll have a look. I doubt its a full inventory on your mage.
 
Re: NinjAdvLoot 4.5 01/19/2014

Will do and my mage has a shitload of bagspace, thats why I want to use him instead of my tank or puller.

Files are on the way =)
 
Re: NinjAdvLoot 4.5 01/19/2014

It wouldn't be your kiss ini it would probably be your loot.ini
 
Re: NinjAdvLoot 4.5 01/19/2014

pssssst Maskoi, i wanted to get his ini ..... just kidding
 
Re: NinjAdvLoot 4.5 01/19/2014

Hmmm Dutch, are you constantly fighting with a mob listed in xtarget window?
 
Re: NinjAdvLoot 4.5 01/19/2014

Nope, it's nothing like that.

My bard and sk, who usually loot, are doing great. It's my mage, druid and cleric that won't loot.

The only thing they had in common was being mounted, but unmounted they dont loot either :S
 
Re: NinjAdvLoot 4.5 01/19/2014

Ok, they dont even try to run to a corpse? Do you run em on custom KissAssist?
 
Re: NinjAdvLoot 4.5 01/19/2014

They do nothing at all, I run all chars with plain KA yes.
 
Re: NinjAdvLoot 4.5 01/19/2014

ok once MQ2 is back up, change your ninjadvloot.inc in line
Rich (BB code):
/declare Debugloot                          int                 outer   0
to
Rich (BB code):
/declare Debugloot                          int                 outer   1

and watch what happens, need a log of the MQ2 messages you get while runnin KA.
Make sure to remove names if you care.
 
Re: NinjAdvLoot 4.5 01/19/2014

All it does is counting the corpses in range nothing else :/

There are 10 corpses in range.
There are 11 corpses in range.
etc.
 
Re: NinjAdvLoot 4.5 01/19/2014

Ok with that we can investigate further.

Find the lines
Rich (BB code):
    /if (${Debugloot}) /echo There are ${DeadCount} corpses in range.
    /if (!${LootMobs} || ${SpawnCount[npc radius ${MobsTooClose} zradius 50]} || !${DeadCount} || ${Me.Combat} || !${Me.FreeInventory} || ${Me.XTarget[${AutoHater}].ID} && !${CombatLooting}) /return
within your ninjadvloot.inc file
and between those 2 lines add the second line again and replace /if with /echo
so it looks like this:
Rich (BB code):
    /if (${Debugloot}) /echo There are ${DeadCount} corpses in range.
    /echo (!${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

Then try it, it wont work yet. But I need to know what your MQ2 will echo now for the /if cases. Then I am sure we can find what exactly makes your toons leave the loot sub at this line.
 
Last edited:
Re: NinjAdvLoot 4.5 01/19/2014

Rich (BB code):
[2014/05/26 08:07:16] [MQ2] There are 17 corpses in range.

[2014/05/26 08:07:27] [MQ2] There are 17 corpses in range.

[2014/05/26 08:07:36] [MQ2] There are 17 corpses in range.

This was on sk :S

Changed it back, cause now it's not looting at all.
 
Re: NinjAdvLoot 4.5 01/19/2014

[MQ2] There are 17 corpses in range.
is an /echo
Where are the values of the second /echo line??? If you get no second echo line, you eighter use another file than the one you did edit, or you mixed something up on edit.

If you like, replace
Rich (BB code):
/echo There are ${DeadCount} corpses in range.

with

Rich (BB code):
/echo (!${LootMobs} || ${SpawnCount[npc radius ${MobsTooClose} zradius 50]} || !${DeadCount} || ${Me.Combat} || !${Me.FreeInventory} || ${Me.XTarget[${AutoHater}].ID} && !${CombatLooting})
 
Re: NinjAdvLoot 4.5 01/19/2014

On SK when no corpses around:

Rich (BB code):
[2014/05/26 09:09:35] [MQ2] (!TRUE || 1 || !0 || FALSE || !18 || 0 && !0)

On SK with corpses around:

Rich (BB code):
[2014/05/26 09:14:56] [MQ2] (!TRUE || 0 || !6 || FALSE || !18 || 0 && !0)

[2014/05/26 09:14:56] [MQ2] Trying to loot 6 corpses. ID's 373|376|359|365|367|371|

On magician with no corpses around:

Rich (BB code):
[2014/05/26 09:16:02] [MQ2] (!TRUE || 1 || !0 || FALSE || !135 || 0 && !0)

On magician with corpses around:

Rich (BB code):
[2014/05/26 09:15:00] [MQ2] (!TRUE || 1 || !5 || FALSE || !136 || 0 && !0)

- - - Updated - - -

If I read it correctly the magician somehow sees a mob to close while there isnt, while the SK doesnt see it.

All toons are in the same spot FYI.
 
Re: NinjAdvLoot 4.5 01/19/2014

Your conclussion is correct. Play with your ini setting for "MobsTooClose". If nothing helps, might need to remove
Rich (BB code):
${SpawnCount[npc radius ${MobsTooClose} zradius 50]} ||
from the /if check
 
Re: NinjAdvLoot 4.5 01/19/2014

Removed and still getting this:

Rich (BB code):
[2014/05/26 10:19:57] [MQ2] (!TRUE || 1 || !16 || FALSE || !135 || 0 && !0)
 
Re: NinjAdvLoot 4.5 01/19/2014

Well since you didnt change whats going to get echoed... need to remove it from the echo line as well to reflect in echo whats beeing checked in the /if () line thereafter
 
Re: NinjAdvLoot 4.5 01/19/2014

This is how it looks now and not working still, I am getting dizzy hahahahaha.

Rich (BB code):
/declare DeadCount int local ${SpawnCount[corpse radius ${CorpseRadius} zradius 50]}
    /if (${Debugloot}) /echo (!${LootMobs} || !${DeadCount} || ${Me.Combat} || !${Me.FreeInventory} || ${Me.XTarget[${AutoHater}].ID} && !${CombatLooting})
    /if (!${LootMobs} || !${DeadCount} || ${Me.Combat} || !${Me.FreeInventory} || ${Me.XTarget[${AutoHater}].ID} && !${CombatLooting}) /return

- - - Updated - - -

HOLY @%$$@!!! It's looting!!! UBER =)

Thanks a lot Crystane =)
 
Release Ninjadvloot.inc

Users who are viewing this thread

Back
Top
Cart