I'm working on a looting script.
let's say I do
GroundItem tuna = getGroundItems().closest("tuna");
and there are 10 tunas that are close to me (have the same X and Y positions)
now Instead of looting starting from the first tuna, I want to loot starting from the last tuna.
I'm usually able to find my way around the documentation easily but I can't seem to find a way to do this and I'm sure there must be some clean way to do it.
My attempt for a general function was something like this. (you might want to skip that)
Thanks a lot in advance!