Macro depository for macros written before the user variable changes that broke all of them.
Moderator: MacroQuest Developers
-
Curious
- a ghoul

- Posts: 88
- Joined: Wed Aug 27, 2003 5:19 am
Post
by Curious » Mon Sep 08, 2003 3:10 pm
Replace /finditem "spiderling silk" with /call FindItem "spiderling silk" or /finditem similar "silk" with /call FindItem similar "silk" (for example).
Code: Select all
Sub FindItem
/for l0 0 to 7
| Edited here to compensate for NULL error (added 11 spaces)
/if "$pack($l0,name) "=="NULL" /goto :FindItemNextPack
/for l1 0 to $pack($l0,slots)
/if "$p0"=="similar" /if "$item($l0,$l1,name)"~~"$p1" /goto :FindItemFoundIt
/if "$item($l0,$l1,name)"=="$p0" /goto :FindItemFoundIt
/goto :FindItemNotFoundIt
:FindItemFoundIt
/press alt
/press shift
/if "$pack($l0,open)"=="true" /varset l3 1
/if n $l3==0 {
/click right inv $l0
:FindItemLoop1
/doevents
/if "$pack($l0,open)"=="false" /goto :FindItemLoop1
/delay $cLag
}
/sendkey down ctrl
/click left pack $l0 $l1
:FindItemLoop2
/doevents
/if "$cursor(name)"=="null" /goto :FindItemLoop2
/delay $cLag
/sendkey up ctrl
/if n $l3==1 /goto :FindItemDone
| Edited here to compensate for DONE button location
| /click left pack $l0 done
/mouseto pack $l0 done
/mouseto -0 -30
/click left
| End Edit
:FindItemLoop3
/doevents
/if "$pack($l0,open)"=="true" /goto :FindItemLoop3
/delay $cLag
/goto :FindItemDone
:FindItemNotFoundIt
/next l1
:FindItemNextPack
/next l0
:FindItemDone
/return
Can't wait for /finditem to be fully functional again :)
Last edited by
Curious on Thu Sep 11, 2003 3:02 am, edited 1 time in total.
-
Valerian
- a grimling bloodguard

- Posts: 709
- Joined: Sun Jul 28, 2002 3:29 am
Post
by Valerian » Mon Sep 08, 2003 9:12 pm
uh, what's wrong with /finditem?
-
wassup
- Official Guardian and Writer of TFM

- Posts: 1487
- Joined: Sat Oct 26, 2002 5:15 pm
Post
by wassup » Mon Sep 08, 2003 9:15 pm
Heh... I second Valerian...
use the /finditem command already built into MQ.
Good learning effort though!
-
Valerian
- a grimling bloodguard

- Posts: 709
- Joined: Sun Jul 28, 2002 3:29 am
Post
by Valerian » Mon Sep 08, 2003 9:24 pm
this is to "fix" the bag-opening thing... he wants to be able to finditem with a bag closed.
-
wassup
- Official Guardian and Writer of TFM

- Posts: 1487
- Joined: Sat Oct 26, 2002 5:15 pm
Post
by wassup » Mon Sep 08, 2003 9:47 pm
Oh...
I always do tradeskill macros with bags open so have not encountered whatever it is that is causing a problem.
-
MacroFiend
- a grimling bloodguard

- Posts: 662
- Joined: Mon Jul 28, 2003 2:47 am
Post
by MacroFiend » Mon Sep 08, 2003 9:58 pm
aside from the fix I posted on the general dev board is that there is no delay between it opening the bag and trying to click on the item.
Somewhere around when SOE added the tradeskill delays, the click commands stopped getting queued (or started getting flushed or bag openings got lagged more).
Before the patch, instead of /finditem opening the bag and then grabbing the item, it would open the bag and move the mouse to where the item lives but would lose the click to pick it up.
After the patch, the conditionals that checked if the bag was closed was commented out due to the structure changes and it would no longer open the bags at all.
-
Curious
- a ghoul

- Posts: 88
- Joined: Wed Aug 27, 2003 5:19 am
Post
by Curious » Tue Sep 09, 2003 2:29 am
Sorry, guess I should have specified the problem I was trying to fix :)
Is there any plans of re-enabling /finditem's ability to select items from closed containers? Or to add a variable to determine what container an item is found in?
-
EqMule
- Developer

- Posts: 2697
- Joined: Fri Jan 03, 2003 9:57 pm
-
Contact:
Post
by EqMule » Thu Sep 18, 2003 10:47 pm
/finditem now opens the container if an item is inside it, but it will not pick it up... you can however /echo $GetLastError which will return PACKNOTOPEN if the item was found but pack was closed, you then just call /finditem again and this time it will pick it up, since the pack was opened in the previous attempt... Lets see if I can get Valerian to put something in the pulse which will allow us to open and pick up in the same attept... but for now, you can use this...
in dev cvs right now... should be available in 24h on backup, or earlier if DKAA updates the zipfile.

o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received

donations for this month's patches.
Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.
-
Curious
- a ghoul

- Posts: 88
- Joined: Wed Aug 27, 2003 5:19 am
Post
by Curious » Thu Sep 18, 2003 10:52 pm
Sweet! Thanks EqMule! My routine works, but quite a bit slower than /finditem ... can't wait to get the updates :)