Yet Another Tradeskill Macro.

Macro depository for macros written before the user variable changes that broke all of them.

Moderator: MacroQuest Developers

Randomwiz
Contributing Member
Contributing Member
Posts: 15
Joined: Thu Oct 10, 2002 8:37 pm

Post by Randomwiz » Sun Jun 08, 2003 10:12 pm

Another update.

I added:
/finditem "$a(0,$v99)"
/call ItemOnCursor
/if $find()==FALSE {
/goto :Done
}
/click left $v20 $v99
/call ItemNotOnCursor
/next v99
/delay 3
/click left $v20 combine
/call ItemOnCursor
/doevents
/goto :RunMake

:Done
/return
This seemed to help a little bit. I think the problem was that it goes so fast, that it actually was hitting COMBINE before the items were showing up in the pack. This is a cheesy fix at best, obviously. I think that the clear pack portion of the code is supposed to clean everything out of the pack if there is anything sitting in there at the start of the combine loop. I don't know why it isn't working.

If someone can help with this, I would appreciate.

alcor75
a lesser mummy
a lesser mummy
Posts: 77
Joined: Wed Jan 29, 2003 7:35 am

Post by alcor75 » Mon Jun 09, 2003 1:38 am

It do not cleanup b/c of this line:

Code: Select all

/if $pack("$p0",empty)==FALSE {


this ask, for exemple with a Brew barrel, is the pack(brew barrel, empty)?, but obviously the barrel is not a pack so there are no answer, the right question should be:

Code: Select all

/if $pack(e,empty)==FALSE {


e, is supposed to be the tag for enviromental combiner, but is not working for me atm, asking in dev forum for some help, i have the right code for this to work, but need the "e" to work for it.
If no fix or anwer come, i'll rework the logic to enquire about the value of $CombinerPack, and force a clean with it.

P.S. tnx alot for all your help on debugging this =))

Alcor75

Randomwiz
Contributing Member
Contributing Member
Posts: 15
Joined: Thu Oct 10, 2002 8:37 pm

Post by Randomwiz » Mon Jun 09, 2003 3:43 am

Hey Alcor!

Just wanted to clarify a little bit. The clean pack function also does not work in Packs, as well as Enviro containers. At the time of my last post, I was trying to combine pieces in a Sewing kit. I also had the same problems with a Mortar and Pestle combiner. Basically, the clean pack code is not working for me on ANY type of container, be it enviro or inventory based. Haven't had many more problems since I inserted that delay feature, but as I said before, my fix was a cheesy one.

Just wanted to clarify my last post to help you with debugging. If you try using the code with ANY container whatsoever, it will not clean out the pack if something gets stuck in it due to lag, misplacement, whatever.

Hope this helps some more.

alcor75
a lesser mummy
a lesser mummy
Posts: 77
Joined: Wed Jan 29, 2003 7:35 am

Post by alcor75 » Mon Jun 09, 2003 2:21 pm

I found a ItemNotOnCursor that sould have been ItemOnCursor in the clearPack routine, maybe was that, maybe no, that was a error =)
Also i added a /delay 0 right befor the click combine, 0 is just that little break that save your ass in turbo mode =), hope that's Egnoght.
Still waiting on a answer for the E tag, i really hope they can fix it b/c i have a wery clear code to use with it =)

Alcor75

md703
a lesser mummy
a lesser mummy
Posts: 34
Joined: Wed Oct 09, 2002 11:04 pm

Post by md703 » Mon Jun 09, 2003 8:11 pm

Question....how come when i try to use this macro, it click on the item (Wolf meat), puts it in my collapsible spit, pick up my filleting knife, puts that in the collapsible spit, and then it just proceeds to just click on those 2 things again and again without ever attempting to combine. (Trying to make filleted wolf)

How do i edit this script, or fix my macroquest, or fix my default ui so that it'll accutally attempt to hit combine? I use delux toolboxes as bags, i'm not sure if that affects anything.

alcor75
a lesser mummy
a lesser mummy
Posts: 77
Joined: Wed Jan 29, 2003 7:35 am

Post by alcor75 » Tue Jun 10, 2003 1:48 am

there is a delay 0 befor the click combine, set it to delay 5 and it should work, also removine the Turbo will work, it work flawles for me, i have a wery fast comp and usually i play without luclin models, i like speednes =)

Alcor75

md703
a lesser mummy
a lesser mummy
Posts: 34
Joined: Wed Oct 09, 2002 11:04 pm

Post by md703 » Tue Jun 10, 2003 9:35 am

negative...after replacing all delay 0 to delay 5 (one found), i still had the same problem. I have a fairly fast computer anyways, so, i dont believe delay is the problem. Simply its just not going after the combine button after the ingredients is in the collapsible split. It just goes back and forth to the ingredients in the split clicking on it, placing it spit and picking the other item up and putting it in split...repeat repeat repeat, but no combine.

Damn.

Pragma
a ghoul
a ghoul
Posts: 91
Joined: Sat May 03, 2003 1:45 am

Post by Pragma » Tue Jun 10, 2003 5:06 pm

i have the EXACT same problem

Pragma
a ghoul
a ghoul
Posts: 91
Joined: Sat May 03, 2003 1:45 am

Post by Pragma » Tue Jun 10, 2003 5:13 pm

problem is with this line

/click left $v20 combine

when echoed, $v20 is equal to "pack 7"

is the command:
/click left "pack 7" combine
supposed to work? Sure doesnt do anything for me.

alcor75
a lesser mummy
a lesser mummy
Posts: 77
Joined: Wed Jan 29, 2003 7:35 am

Post by alcor75 » Tue Jun 10, 2003 7:18 pm

I'm very sorry guys but the macro work flawless for me, i did tested it for 3 hour or so today (200 pottery, 249 brew) and it nither failed 1 click.
Posting the one i'm actually using(maybe i made some mess with all the update in the boards)

Code: Select all

|   TradeSkill.mac - rudimentary tradeskill macro, 
|       now that /finditem works.  ATM it doesn't support 
|       enviro containers.  ALL containers in your inventory 
|       must be already open, and cannot have been moved 
|       since they were opened.  You may need to change the 
|       /delay 5 commands to something higher depending on 
|       your video and net lag. It's recommended you put the container |you're 
|       going to combine in in slot 7 so products don't stack up 
|       in it. 
| 
| 
|   Usage:  /Tradeskill.mac "Combiner Name" "Ingredient 1" "Ingredient 2" ....."Ingredient 9" 
|     you can add from 1 to 9 item and combine them, you can use tools ecc, also i added the fast item check. 
|    Alcor75 
| 
|All Right for the original macro goto Pigeon. 
| 
#turbo 

#define CombinerPack v97 
#define IngredSize v98 

#chat tell 

Sub Main 
    /press ctrl 
    /press alt 
    /press shift 

    /varset IngredSize 0 

    /if "$p1"!="" /call AddIngred "$p1"  | List of ingredients.  The AddIngred 
    /if "$p2"!="" /call AddIngred "$p2"     | subroutine automatically sets the index. 
    /if "$p3"!="" /call AddIngred "$p3" 
    /if "$p4"!="" /call AddIngred "$p4" 
    /if "$p5"!="" /call AddIngred "$p5" 
    /if "$p6"!="" /call AddIngred "$p6" 
    /if "$p7"!="" /call AddIngred "$p7" 
    /if "$p8"!="" /call AddIngred "$p8" 
    /if "$p9"!="" /call AddIngred "$p9" 

    /call FindCombiner "$p0"    | Name of the container to combine in. 
                                 | It's highly recommented to put the combine 
                                 | container in slot 7. 

    /if $CombinerPack<=7 /call OpenInv 
   /if $CombinerPack==8 /call OpenEnv 
   /if $CombinerPack==99 { 
                 /echo "Cannot find container-Aborting" 
                 /end 
                } 

    /echo $v20 

    :RunMake 

    /press shift 
    /sendkey down ctrl 
    /delay 2 
    /for v99 0 to $v90 
        /if $pack("$p0",empty)==FALSE { 
            /call ClearPack 
            /press shift 
            /sendkey down ctrl 
        } 
        /call ClearCursor 

        /finditem "$a(0,$v99)" 
        /call ItemOnCursor 
        /if $find()==FALSE { 
            /goto :Done 
        } 
        /click left $v20 $v99 
        /call ItemNotOnCursor 
    /next v99 

    /click left $v20 combine 
    /call ItemOnCursor 
    /doevents 
    /goto :RunMake 

    :Done 
/return 

Sub CombinerClick 


Sub ClearCursor 
    :Start 
        /if $cursor()!=NULL { 
            /click left auto 
            /call ItemNotOnCursor 
        } 
        /delay 0 
    /if $cursor()!=NULL /goto :Start 
/return 

Sub ClearPack 
    /call ClearCursor 

    /if $pack("$p0",empty)==TRUE /goto :Finished 
    :ReClear 
    /press ctrl 
    /sendkey down shift 

    /varcalc v50 $pack($p0,slots)-1 
    /delay 3 
    /for v99 0 to $v50 
        /click left pack $p0 $v99 
        /call ItemNotOnCursor 
        /call ClearCursor 
    /next v99 
    /if $pack($p0,empty)==FALSE /goto :ReClear 

    :Finished 
/return 

Sub AddIngred 
    /varset v90 $IngredSize 
    /varset a(0,$IngredSize) "$p0" 
    /varcalc IngredSize $IngredSize+1 
    /echo $p0 
/return 

Sub FindCombiner 
    /varset CombinerPack 99 
    /for v99 0 to 7 
        /if "$pack($v99,name)"=="$p0" /varset CombinerPack $v99 
    /next v99 
    /if $CombinerPack==99 { 
                /varset CombinerPack 8 
                } 

    /if $CombinerPack==99 { 
        /echo No container named "$p0" found. 
        /endmacro 
    } 
/return $CombinerPack 

Sub Event_Chat 
    /endmacro 
/return 



Sub ItemOnCursor 
     /varset t1 5 
     :ItemOnLoop 
     /delay 0 
     /if $cursor()!=TRUE /if n $t1>0 /goto :ItemOnLoop 
/return 

Sub ItemNotOnCursor 
     /varset t2 5 
     :ItemOnLoop 
     /delay 0 
     /if $cursor()==TRUE /if n $t2>0 /goto :ItemOnLoop 
/return 

Sub OpenInv 
   /varset v20 "Pack $CombinerPack" 
    
    
   /if $pack($CombinerPack,empty)==FALSE /call CleanPack 
/return 

Sub OpenEnv 
    
   /varset CombinerPack enviro 
   /varset v20 enviro 
   /face item 
   /delay 0 
   /if $pack($CombinerPack,empty)==FALSE /call CleanPack
   /echo using the $v20 
/return
Alcor75

md703
a lesser mummy
a lesser mummy
Posts: 34
Joined: Wed Oct 09, 2002 11:04 pm

Post by md703 » Wed Jun 11, 2003 1:02 am

thanks for your help, however using your script, the following happens:

Making fillet wolf meat
1) it clicks on wolf meat
2) It tires to drop it in very top left corner, fails and drops it in auto equip box.
3) It picks up knife and then tries to also drop it in the very top left corner, but fails to and auto equips it.
4) it would repeat the same thing over and over, until i manually end it.

-------
by changing your

Code: Select all

/click left $v20 combine 
to

Code: Select all

/click left Pack $v20 combine 
i get a little more success, this time it would :
1) pick up meat, put in spit
2) pick up knife, put it in spit
3) goto my pack 0 bag and try to click in a spot which looks like is where the combine button would be if it was where the spit was.


i'm stumped as to why it continues to not look for the combine button and just repeat the picking up and dropping movements.

md703
a lesser mummy
a lesser mummy
Posts: 34
Joined: Wed Oct 09, 2002 11:04 pm

Post by md703 » Wed Jun 11, 2003 1:39 am

is there a way i can force it to goto the combine button?

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Wed Jun 11, 2003 1:55 am

md703 wrote:is there a way i can force it to goto the combine button?
I haven't tried using a 4 slot combiner yet. Might be some issue with that.

alcor75
a lesser mummy
a lesser mummy
Posts: 77
Joined: Wed Jan 29, 2003 7:35 am

Post by alcor75 » Wed Jun 11, 2003 6:58 am

Try remove the #Turbo, is not a big deal but can give you a good idea of what is wrong.

Alcor75

Epoch18
orc pawn
orc pawn
Posts: 16
Joined: Mon Sep 15, 2003 1:39 pm

Post by Epoch18 » Tue Sep 16, 2003 11:15 am

The last post I see for this is in June. Is this macro still useable? Has anyone updated it and fix the problems I was reading about? Or does it work finee now?

Just lookin for a macro to work up my smithing : )