• 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

Macro - KissAssist change to use custom loot files defined in character ini file. (1 Viewer)

DriveCrash

Well-known member
Joined
Jul 9, 2015
RedCents
993¢
Due to the huge global loot profiles on emulator servers, I continue to struggle with bags filling up with random items. In an attempt to keep my looters running for more than 5 minutes at a camp, I am using separate loot.ini files with lots of ignores and one looter with a group or type of items set to keep. That way all 5 looters don't end up with 2 spider silk each eating up a bag slot.

At first I made loot ini files per character name, but this got annoying maintaining loot files over several groups of characters. I wanted to make loot tables more dynamic with as little extra pain as possible, so I changed KissAssist to have a setting in the character.ini file where you can define what loot table to use. In the process I've run across a few other minor issues I've corrected as well, and will include those "fixes" here.

We also need to update sellstuff.mac to sell from our new custom loot files if we define them and/or use KissAssist. We also need to do the same for loot.mac. I also incorporated a modification Hoiser made to report the total plat received from selling items using /mac sellstuff

I am including the entire files here, but if you have custom work done or are running a different version of KA, you can make the code modifications yourself.

Happy Hunting!
 

Attachments

Starting with KissAssist. I run the 12.001 Version from 4-13-2021.

Change the code at ~Line 297 From:

| ------------------------------------------------------------------------------------- | Add in AdvancedLoot variables if needed | ------------------------------------------------------------------------------------- /if (${SubDefined[SetupAdvLootVars]}) { /call SetupAdvLootVars /if (${LootOn} && ${Defined[NALStatus]}) { /varset NALStatus 1 } }

Change to:

| ------------------------------------------------------------------------------------- | Add in AdvancedLoot variables if needed | ------------------------------------------------------------------------------------- /if (${SubDefined[SetupAdvLootVars]}) { /if (${Select[${LootFileName},KissAssist_${Me.CleanName},KissAssist,Kiss,KissAssist_Buffs,KissAssist_Info]}) { /Echo Invalid Loot INI File Name. Using Loot.ini /call SetupAdvLootVars Loot.ini } Else { /call SetupAdvLootVars ${LootFileName}.ini } /if (${LootOn} && ${Defined[NALStatus]}) { /varset NALStatus 1 } }


Now we are going to add a line to the INI files.


In the Sub Bind_Settings under the ****General **** group, at ~Line 12433 we will add a line of code.

Under the line

/call LoadIni General LootOn int 0

Add the line:

/call LoadIni General LootFileName string "Loot"


Now in your INI files that are already created and you don't want to remake.. add the LootFileName=Loot in the general section. Change the name Loot to whatever you want the file to be and it will create that file and use it. I recommend keeping the Loot at he start of the file name just for sorting purposes on your drive.

Some examples of what I use are
LootFileName=Loot_Research
or
LootFileName=Loot_Tradeskills

IE:
[General] KissAssistVer=12.001 Role=Assist CampRadius=30 CampRadiusExceed=400 ReturnToCamp=0 ChaseAssist=0 ChaseDistance=25 MedOn=1 MedStart=20 MedStop=100 MedCombat=0 LootOn=1 LootFileName=Loot RezAcceptOn=1|90 AcceptInvitesOn=1


Now when we fire up KA, it will request that the loot file we defined be used by the Ninjadvloot.inc utility. Speaking of that utility, we need to fix a few things.
 
Last edited:
Ninjadvloot seems to have an issue where if you have an item marked to sell in your main inventory (not in a bag) it will select the NEXT top level inventory slot and sell it. In my case that was an empty WR bag that it sold to the vendor. Not cool, so lets fix that.

In the Sub SellToVendor(ItemToSell)

[CODE title="Sub SellToVendor Original" highlight="8"]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[/CODE]

Change to :

[CODE title="Sub SellToVendor Modified" highlight="9"]Sub SellToVendor(ItemToSell)
/if (${Window[MerchantWnd].Open}) {
:sell
/echo Selling ${ItemToSell}
| ${FindItem[=${ItemToSell}].InvSlot}
/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 ${Math.Calc[${FindItem[=${ItemToSell}].InvSlot}-1]} 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[/CODE]


Now that Ninjaadvloot is using custom loot tables, and selling the correct item slots, we need the stand alone macros to check to see if we are using a custom file instead of using the global Loot.ini

Sellstuff.mac:
| Sellstuff.mac v2.0 by DriveCrash 07/21/2022
| Original work by Maskoi 11/27/2010
| Target the vendor you want to sell to and type /mac sellstuff
| Required Ninjadvloot.inc v1.8 and a loot.ini file with items marked as sell
| 7/21/2022 added support for custom loot files passed from KA character ini files
#include Ninjadvloot.inc
#Event plattotal "#*#You receive #1# platinum#*#"
| --------------------------------------------------------------------------------------------
| SUB: Main
| --------------------------------------------------------------------------------------------
Sub Main
/declare IniFileName string outer
/declare LootFileName string outer
/declare Ptotal int outer 0
| Check if Kiss_server_name or Kiss_name ini files exist
| If no custom loot file is defined, use default Loot.ini
/if (${Ini[KissAssist_${EverQuest.Server}_${Me.CleanName}.ini,General,LootFileName].Length}) {
/varset IniFileName KissAssist_${EverQuest.Server}_${Me.CleanName}.ini
/varset LootFileName ${Ini[${IniFileName},General,LootFileName]}
/echo KissAssist ini file detected using ${IniFileName}
/call SetupAdvLootVars ${LootFileName}.ini
} Else {
/if (${Ini[KissAssist_${Me.CleanName}.ini,General,LootFileName].Length}) {
/varset IniFileName KissAssist_${Me.CleanName}.ini
/varset LootFileName ${Ini[${IniFileName},General,LootFileName]}
/echo KissAssist ini file detected using ${IniFileName}
/call SetupAdvLootVars ${LootFileName}.ini
} Else {
/call SetupAdvLootVars
}
/call DoLootStuff sell
:sell
/doevents
/if (${Target.ID} && ${Target.Distance}<25) /goto :sell
}
/echo You made ${Ptotal} plat selling vender trash

/return
Sub Event_plattotal(S0,S1)
/varcalc Ptotal ${Ptotal}+${S1}
/return

and Loot.mac:

| loot.mac 2.0 by DriveCrash 07/21/2022 Redguides.com
| Original work by Maskoi 01/22/2014
#include ninjadvloot.inc

| --------------------------------------------------------------------------------------------
| SUB: main
| --------------------------------------------------------------------------------------------
sub main
/declare CampZone int outer ${Zone.ID}
/declare CampXLoc int outer ${Me.X}
/declare CampYLoc int outer ${Me.Y}
/declare CampZLoc int outer ${Me.Z}
/declare LookForward int outer ${Me.Heading.DegreesCCW}
/declare IniFileName string outer
/declare LootFileName string outer
/echo Starting Loot macro. I will check for corpses to loot every 30s.
| Check if Kiss_server_name or Kiss_name ini files exist
| If no custom loot file is defined, use default Loot.ini
/if (${Ini[KissAssist_${EverQuest.Server}_${Me.CleanName}.ini,General,LootFileName].Length}) {
/varset IniFileName KissAssist_${EverQuest.Server}_${Me.CleanName}.ini
/varset LootFileName ${Ini[${IniFileName},General,LootFileName]}
/echo KissAssist ini file detected using ${IniFileName}
/call SetupAdvLootVars ${LootFileName}.ini
} Else {
/if (${Ini[KissAssist_${Me.CleanName}.ini,General,LootFileName].Length}) {
/varset IniFileName KissAssist_${Me.CleanName}.ini
/varset LootFileName ${Ini[${IniFileName},General,LootFileName]}
/echo KissAssist ini file detected using ${IniFileName}
/call SetupAdvLootVars ${LootFileName}.ini
} Else {
/call SetupAdvLootVars
}
/varset CorpseRadius 100
/varset MobsTooClose 10
:top
/doevents
/moveto mdist 10
/call LootMobs
/delay 2s
/moveto loc ${CampYLoc} ${CampXLoc}
/delay 2s ${MoveTo.Stopped}
/face heading ${LookForward}
/delay 30s
/goto :top
/return

I made this for myself, but on the off chance someone else would like to use it I wanted to share it with the community.

Happy Hunting!
 
Last edited:
Great stuff, I used this to make the edit to muleassist as well.

One additional ninja loot change i made was to make items default to ignore so that I could take more of an allow list only approach:


/if (!${Corpse.Item[${i}].NoDrop}) /ini "${NinjaIniFile}" "${FirstLetter}" "${Corpse.Item[${i}]}" Keep
-> becomes
/if (!${Corpse.Item[${i}].NoDrop}) /ini "${NinjaIniFile}" "${FirstLetter}" "${Corpse.Item[${i}]}" Ignore
 
Yes, everything was changed to reflect his post. I am using his Loot_Baseline.ini and have changed my kissassist.ini to reflect that file. My guy loots everything and the mq2 spam shows everything is listed as Keep. However, in the loot.ini everything he is looting is listed as ignore. So no matter what is listed keep/destroy/ignore he will loot it. For some reason the parameters are not being respected. Anyone have any ideas why they won't loot according to the ini?
 
Macro - KissAssist change to use custom loot files defined in character ini file.

Users who are viewing this thread

Back
Top
Cart