Welcome, Guest. Please login or register.
Did you miss your activation email?
November 25, 2024, 09:45:48 am *

Login with username, password and session length
Pages: 1 2 3 4 [5] 6 7 8
Print
Author Topic: Loot Macro  (Read 56099 times)
Dimur
Hero Member
Hero Member
*****
Posts: 699


View Profile
« Reply #60 on: July 26, 2020, 11:50:03 am »

Some issues:

Started a team of warriors for my group.  Got them to PoD with one master looter and populated the ini from PoT to PoD.

Holloween started, so I'm getting double loot and the chests in PoD are stuffed to the brim.  The extra augments, holloween candy, etc are causing issues for the macro.

Issues:
     When a corpse is stuffed to the brim, some items get skipped over.  Some gems that are marked for destruction remain, and one dragon is looted but the rest (marked destroy) remain on corpse.  One gem + 3 ores remain on corpse.
     The crystals are ignored, but the augments are destroyed on one corpse, but on another, the opposite happens.
     Perhaps the large-ish ini starting from PoT is casuing enough lag for the loop to skip every once in a while?  I've seperated the items amongst my other characters and I'll see how that plays out.

Destroy is something I never bothered addressing cleaning up the bugs in, it was an initial feedback request from a user who subsequently stopped offering feedback.  Ultimately it was decided that since you can hide looted corpses there wasn't much point in using the destroy option and using /hidec looted with ignore was more efficient anyhow.  

There's an inherent delay coded in of like 3ms between commands that can be problematic if you have latency issues.  The macro works locally so it doesn't care what your connection is, it's just going to execute the next command it comes to regardless if your client has received the updated packet and once it borks because of it your best recourse is to just restart the macro.  It's possible to refactor the macro and change the delay between commands to be user modifiable so people can figure out their own best delay in relation to their connection if that's something people want to see.

One other issue is that the EQUI window for corpse can only show a maximum of 30? items at a time, so if you're looting chests in POD during a double or triple instance the macro is going to check the corpse and work through the first 30 items it sees and stand up to hide the corpse when it runs out of loot slots to evaluate.  I never found that to be much of an issue though since there are very few mobs that you would be looting with this being an issue.

Having said that, I'm looking for ideas and projects to work on so if anyone has actionable feedback regarding the stuff referenced in this response or ideas on any other QOL items, please post them and save me from doing yardwork.  It's hard to motivate to log on when there's no new content or activity so please give me a project if you have one.
« Last Edit: July 26, 2020, 11:59:11 am by Dimur » Logged
Miriya
Full Member
***
Posts: 116


View Profile
« Reply #61 on: July 31, 2020, 09:00:13 pm »

Another issue popped up.  My PC auto updated and restarted.  On using the loot macro, it does not announce or loot what it did before.  It goes thru the whole logic but does not go thru my Miriya.ini it seems.  It just starts looting but does not loot anything on my list or announces.  Was something deactivated?

Nothing has changed other than the computer restarting.  Thank you in advance.
Logged
RedDwarf
Full Member
***
Posts: 130



View Profile
« Reply #62 on: August 01, 2020, 04:24:55 am »

Another issue popped up.  My PC auto updated and restarted.  On using the loot macro, it does not announce or loot what it did before.  It goes thru the whole logic but does not go thru my Miriya.ini it seems.  It just starts looting but does not loot anything on my list or announces.  Was something deactivated?

Nothing has changed other than the computer restarting.  Thank you in advance.

Not sure what a OS update would have on MQ2/EQ, but shouldn't effect a macros operation, my first thought is do you have the right file name?, should be EZLoot_Miriya.ini, has a blank version been created (in the macros folder)

Red
Logged

Miriya
Full Member
***
Posts: 116


View Profile
« Reply #63 on: August 01, 2020, 09:46:13 pm »

Thanks, Red.  I just deleted all the files and re-downloaded them.  Then copy/pasted my previous ini files.  It didn't work initially and i had to restart my characters and mq2emu a couple times but finally works.  Woot!  Really not sure why that happened though.
Logged
Natedog
Master
******
Posts: 830


View Profile
« Reply #64 on: August 24, 2020, 06:25:57 pm »

This is fancy as fuuuck. Nice work! Looks like you know a lot about MQ2 Smiley
Logged

Dimur
Hero Member
Hero Member
*****
Posts: 699


View Profile
« Reply #65 on: August 30, 2020, 12:31:22 pm »

Dim, is it possible to add a radius check for a certain number of NPC's near me, so in a case where the macro is running through looking for rotted or missing corpses, it won't activate and move me while I'm in combat with the next pull?

I haven't tested it yet, but the code should be updated to facilitate Draca's laziness and give an option to toggle on an opt out in the loot logic.  Each time it iterates to the next corpse in the list to loot, it should check for any NPCs within 100 radius of you and if the [End on NPC Close] setting in the EZLoot.ini settings is set to [On] it should just jump to the end of the macro and end it.  

I doubt I'll log in any time soon to test it, if someone could drop some feedback here and let me know if it works or needs to be refactored, let me know and I'll do my best to address it
« Last Edit: August 30, 2020, 12:33:01 pm by Dimur » Logged
Ginge
Guest
« Reply #66 on: September 14, 2020, 01:51:09 pm »

Just a quick one..My loot macro gets hung up on corpses with no loot but that have coin on them, it doesn't close the window and move to the next corpse if that makes sense..

Any ideas on how to fix that would be great Cheesy

Tankus
Logged
Dimur
Hero Member
Hero Member
*****
Posts: 699


View Profile
« Reply #67 on: September 14, 2020, 03:40:21 pm »

Yes sir, talked to Tankus in game about this and I think I isolated where this happens in the code.  Below is the Sub LootCorpse, the last else just returns to the caller if no items are found on the corpse but it doesn't actually close the loot window when doing so, this means if the corpse has plat but no items it tries to go to the next corpse but never closes the corpse loot window of the corpse it's on.

Here's how to fix it:

Code:
|==== Sub LootCorpse
Sub LootCorpse(int CorpseNumber)
/declare i int local 1
/declare cID string local
/declare ItemsOnCorpse int local
/if (${Target.ID}) {
/if (${Target.DistanceU}>30) /say #corpsefix
/delay 2
/loot
/delay 20 ${Window[LootWnd].Open}
/if (${Corpse.Items}) {
/bc Looting corpse ${CorpseNumber} of ${CorpseCount}: ${Corpse.ID}
/varset cID ${Corpse.ID}
/delay 2
/if (${Window[LootWnd].Open} && ${Corpse.Items}) {
/varset ItemsOnCorpse ${Corpse.Items}
/delay 2
/for i 1 to ${ItemsOnCorpse}
:KeepLootingItems
/if (${Ini[${EZLootIni},${Corpse.Item[${i}].Name.Left[1]},${Corpse.Item[${i}]}].Equal[Keep]} || ${Corpse.Item[${i}].Name.Find[,000]}) {
/shiftkey /notify LootWnd LW_LootSlot${Int[${Math.Calc[${i}-1]}]} rightmouseup
/delay 2
/if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox CD_Yes_Button leftmouseup
/delay 2
/doevents LootRoundList
} else /if (${Ini[${EZLootIni},${Corpse.Item[${i}].Name.Left[1]},${Corpse.Item[${i}]}].Equal[Announce]}) {
/bc ${Corpse.Item[${i}]} found! ID: ${cID} ${Target}
/if (${Raid.Members}) /bc ${Corpse.Item[${i}]} found! ID: ${cID} ${Target}
/bc Checking EZRLoot.ini to see if this is something in there
/call RLCheckForIni
/if (${Ini[EZRLoot.ini].Length} && ${Ini[EZRLoot.ini,${Corpse.Item[${i}].Name.Left[1]},${Corpse.Item[${i}].Name}].Length}) {
/if (${Ini[EZRLoot.ini,${Corpse.Item[${i}].Name.Left[1]},${Corpse.Item[${i}].Name}].NotEqual[${Me}]}) {
/declare tempName string local ${Ini[EZRLoot.ini,${Corpse.Item[${i}].Name.Left[1]},${Corpse.Item[${i}].Name}]}
/if (${Spawn[${tempName} pc].ID} && 300 > ${Spawn[${tempName} pc].Distance}) {
/bc Sending tell to ${tempName}
/tell ${tempName} @ loot ${Corpse.Item[${i}].Name} from ${Corpse.ID}
}
}
}
} else /if (${Ini[${EZLootIni},${Corpse.Item[${i}].Name.Left[1]},${Corpse.Item[${i}]}].Equal[Destroy]}) {
/shiftkey /notify LootWnd LW_LootSlot${Int[${Math.Calc[${i}-1]}]} leftmouseup
/delay 2
/if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox CD_Yes_Button leftmouseup
/delay 2
/destroy
}
/delay 2
/if (${Corpse.Items}>${i}) {
/varcalc i ${i}+1
/goto :KeepLootingItems
}
/delay 2
/next i
}
} else /return           <====================================================== This line here
}
/if (${Window[LootWnd].Open}) /notify LootWnd LW_DoneButton leftmouseup
/cleanup
/delay 2
/return
|==== End Sub LootCorpse

} else /return

Change this to :

} else {
  /if (${Window[LootWnd].Open}) /notify LootWnd LW_DoneButton leftmouseup
  /return
}


This should fix it until I'm motivated enough to upload the fixed version.
Logged
Ginge
Guest
« Reply #68 on: September 14, 2020, 03:59:32 pm »

Can confirm that the code above fixed my issue Cheesy

Thank you once again Dim Cheesy

Tankus
Logged
Dimur
Hero Member
Hero Member
*****
Posts: 699


View Profile
« Reply #69 on: September 14, 2020, 05:57:09 pm »

Updated the ezloot.inc file link to point to the updated file.

Changes:
1. Added an option to bail out of loot logic if an npc is near when looting, default is off but you can toggle it to on if you want (not sure if this took in last update but it should work now)
2. Added code to release corpse looting window when only plat is found on corpse (thank you Tankus)
3. Preliminary code added to correctly see 20k and 50k exp crystals in the ezloot_characterName.ini file, won't know if this works until someone can test it

If there are any other suggestions, please leave feedback on this thread and I'll try to respond.
Logged
Ginge
Guest
« Reply #70 on: September 15, 2020, 05:10:11 pm »

Hey Dim just wanted to say thank you for the work you put in on the macro... i have another issue that's arisen today..

After a certain time looting corpses It stops and gives me an error that says..

{} pairing ran into another subroutine..

I haven't downloaded the updated one yet, maybe i should do that...  Grin

Tank
Logged
Dimur
Hero Member
Hero Member
*****
Posts: 699


View Profile
« Reply #71 on: September 15, 2020, 09:35:39 pm »

That sounds like a missing curly brace error, try the updated file and let me know if it persists.
Logged
Ginge
Guest
« Reply #72 on: September 18, 2020, 09:03:46 am »

Downloaded new file, I have the hang on plat corpse problem again now... not sure if it's just ToFS??

Tankus
Logged
Dimur
Hero Member
Hero Member
*****
Posts: 699


View Profile
« Reply #73 on: September 20, 2020, 10:48:36 am »

Sorry, I had pushed the other changes but apparently forgot to save the one line of code that addressed coin only corpses, should be fixed now.
Logged
Ginge
Guest
« Reply #74 on: September 22, 2020, 01:13:21 pm »

Sorry, I had pushed the other changes but apparently forgot to save the one line of code that addressed coin only corpses, should be fixed now.

All sorted now thank you Dim....

Tankus
Logged
Pages: 1 2 3 4 [5] 6 7 8
Print
Jump to:  

Recent

Stats

Members
  • Total Members: 6156
  • Latest: Rin1
Stats
  • Total Posts: 65127
  • Total Topics: 5066
  • Online Today: 379
  • Online Ever: 8678
  • (December 19, 2022, 02:32:09 pm)
Users Online
Users: 0
Guests: 314
Total: 314
TinyPortal v1.0 beta 4 © Bloc