slot count for environmental targets?

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

webx
decaying skeleton
decaying skeleton
Posts: 2
Joined: Sat Dec 14, 2002 6:53 pm
Contact:

slot count for environmental targets?

Post by webx » Sun Dec 15, 2002 4:51 pm

Hello, first post, and still pretty green to the MQ scene. Take it easy :twisted:

I'm basically just trying to run a cleanup routine if I get to a combine and notice that I don't have a required item. (I.E. the first 4 components I have already put into the PotteryWheel, but I don't have the 5th.) How I'm trying to do it is to run a loop from 0 to Z, and just left click then auto dump them back to my inventory. Z being the number of slots in the container. I've tried $item(e,slots)-1 to no avail, thinking that since finding a pack's # is simple, $pack($var,slots)-1 Any tips, or oversights I'm missing?

Thanks

webx
decaying skeleton
decaying skeleton
Posts: 2
Joined: Sat Dec 14, 2002 6:53 pm
Contact:

Post by webx » Sun Dec 15, 2002 5:48 pm

I've re-read my post, and it's vague on what I'm looking for. This is a simple test I wrote to check the number of slots on a bag in my inventory:

Code: Select all

#include routines.mac

Sub Main
/stand
/call FindCombiner "Jewelry Making"
/varset v20 $return
/varcalc v10 $pack($v20,slots)

/echo ::: $pack($v20,name) ::: has $v10 slots
Simple, just tells me how many slots my jewelry combiner has. What I can't figure out is how to do the same thing, only for an environmental combiner (Oven, Kiln, Pottery Wheel, Forge, etc) How do you find out the number of slots for one of the aforementioned containers?

I hope that's a bit more clear.

Thanks again.

Grumpy
a hill giant
a hill giant
Posts: 167
Joined: Sun Nov 10, 2002 4:22 pm

Post by Grumpy » Mon Dec 16, 2002 1:19 pm

Pretty sure all Enviro combiners have 10 slots (excep maybe oven?)

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Mon Dec 16, 2002 4:38 pm

Code: Select all


#define TIMED_OUT -1002

| eCleanPack
| Usage: /call eCleanPack
| Explaination: Takes any items in the currently open Environmental container (Forge, BrewBarrel, Loom etc)
| and drops them into the players inventory.
| Returns: TIMED_OUT if some problem caused sub to timeout
Sub eCleanPack 
   /varcalc v2 $pack(e,slots)-1 
   /sendkey down shift 
   /varset t10 200
   /for v1 0 to $v2
      /if "$item(e,$v1)"=="NULL" /goto :eSkipClean 
      /click left enviro $v1 
      :eCleanWait0 
      /if n $t10==0 /return TIMED_OUT
      /if "$cursor()"!="TRUE" /goto :eCleanWait0 
      /click left auto 
      :eCleanWait1 
      /if n $t10==0 /return TIMED_OUT
      /if "$cursor()"=="TRUE" /goto :eCleanWait1 
   :eSkipClean 
   /next v1 
   /sendkey up shift 
/return
Fippy

This is my girl. But Rizwank had her first :-)
[img]http://www.btinternet.com/~artanor/images/fairy_bounce09.gif[/img]