itemtarget

lostsk8r

New member
Joined
Jul 25, 2006
Messages
97
Reaction score
0
Points
0
So I found an itemtarget macro around google and I want it to target a generic (sm), in the zone only one generic sm and one generic lg spawn. I tried /itemtarget but it ALWAYS targetted the lg and never the sm, even when I was closer to the sm. So now I have it /itemtarget "Generic (sm)" but when the macro cant target it, it errors and ends. How do I prevent it from ending?

I also ran over and picked up the lg item, and now theres no items in the zone so /itemtarget causes error and ends. I want it to keep looping until the sm spawns and grab it, but if the lg is up I want it to ignore.

/shrug

Code:
Sub main
   :loop
   /itemtarget "Generic (sm)"
   /delay 1s
 
      /call GetItem
      /delay 1s ${Cursor.ID}
      /delay 2s
      /if (${Cursor.ID}) /autoinv
   }
   /delay 2s
   /goto :loop
/return

Sub GetItem
   /declare lookangle int
   /click left center
   /if (!${MacroQuest.LClickedObject} || ${Target.ID}) {
      /look -128
      :loop
      /click left center
      /if (${Target.ID}) /target clear
      /if (!${MacroQuest.LClickedObject} && ${Me.Look}<0) {
         /varcalc lookangle ${Me.Look}+2
         /look ${lookangle}
         /goto :loop
      }
   }
/return
 
1. What does /items output in that zone?

2. Change the macro to do /click left item
 
/items outputs a "Generic (lg)" and a "Generic (sm)"

The (sm) is the one I want but its a longer respawn time than the (lg) (sm is 3 hours and lg seems to be about 20 minutes). (Lg) shows up first on the /items so the /itemtarget always targets it.

Either way my dilemma is, /itemtarget always targets the Generic (lg) or if I do /itemtarget "Generic (sm)" it will say Couldn't find "Generic (sm)" to target and ends macro. I'm trying to either have it ignore the (lg) or continue to try to target the (sm) until it pops.

I also dont want to /gank the lg so thats out.

Changed the /click left item, thanks.
 
Last edited:
If you tell me which zone it is I can go there and see what the problem is
 
Well I was looking into ground Ground documentation and found I can use this to check for the item first before targetting.

/if (${Ground[Generic (sm)].ID})
 
Last edited:
ok, I think I know what u are doing and what zone you are doing it in, I went there and checked this myself, there is a bug in mq2 right now so that it doesn't target the closest item..., ill see if there is a good workaround for you until I can get it updated.

Next zip will have a sorted list for both doors and ground items according to distance.
 
Ok here is what you can do for now until next zip:
Let me know how it works.

Code:
#turbo 120

Sub Main
	/declare TheItem string local
	/varset TheItem "Generic (sm)"
:theloop
	/if (${GroundItemCount[${TheItem}]} > 0) {
		/echo found a ${Ground[${TheItem}].DisplayName}
		/if (${Ground[${TheItem}].Distance3D} < 20) {
			/if (${Ground[${TheItem}].Grab}) {
				/echo picked up a ${Ground[${TheItem}].DisplayName}
				/delay 5s ${Cursor.ID}
				/echo dropping ${Cursor} into inventory.
				/delay 1s
				/autoinv
				/delay 5s ${Cursor.ID}==FALSE
				/echo we got what we came for lets move on
				/beep
				/end
			}
		} else {
			/beep
			/echo ${Ground[${TheItem}].DisplayName} found but its out of range.
			/delay 5s
		}
	}
	/delay 2s
	/goto :theloop
/return
 
Last edited:
please don't abuse it by sitting on the same spot and picking up items just to spite others who need them, I'm guessing this macro is going to be used to pick up a quest item.

This is not directed to lostsk8r, its just a general plea from me, to anyone who come here and read this thread and then use the macro.
Use it to get your part, then move on.
 
autoshroom 2.0

Been having the same problem picking up items so tried your autoshroom 2.0 in kaladim and it starts and moves to the shrooms but doesn't pick them up. is the problem with /click left item? nvm found that is not the case, ran my version on the shroom grabber and it will pick up the shrooms but have to run it 3 times to pick all 18 of them up.
 
Last edited: