Useage:
/macro tradeskill "<tradeskill>" "# Item1" "# Item2" "# Item3" "# Item4" "# Item5" "# Item6" "# Item7" "# Item8" "# Item9"
<tradeskill> can be
Alchemy
Baking Env
Baking Inv
Brewing
Fishing
Fletching
Jewlcraft
Poison
Pottery Kiln
Pottery Wheel
Smithing
Tailoring Env
Tailoring Inv
Tinkering
Code: Select all
| - Tradeskill.mac -
|
| Need to have inventory window open already and Be near the enviromental container if you require one
|
| Useage:
| /macro tradeskill "<tradeskill>" "# Item1" "# Item2" "# Item3" "# Item4" "# Item5" "# Item6" "# Item7" "# Item8" "# Item9"
| <tradeskill> can be Smithing, Baking Inv, Baking Env, Brewing, Tailoring Inv, Tailoring Env, Alchemy, Fishing, Fletching, Jewlcraft, Pottery Wheel, Pottery Kiln,
Tinkering, Poison
|
| Replace # with the amount of that particular item. Do not
| feed it values greater than 9, and less than 1.
|
#include routines.mac
#turbo
#event NoCombine "You cannot combine these items in this container type!"
Sub Main
/if "$p0"=="" {
/goto :Done
} else {
/call container_check "$p0"
}
/varset v0 "$v80"
/sendkey down ctrl
/goto :MakeItems
:MakeItems
|v6 is used to tell it which slot in v0
|to place the next item you pickup
/varset v6 0
|--> First item
|v7 is used to hold each parameter in, so i can re-use code
/varset v7 "$p1"
/call PlaceItems
/if $return==0 /goto :Done
/if $return==10 /goto :nofind
/if "$p2"=="" /goto :combine
|--> Second item
/varset v7 "$p2"
/call PlaceItems
/if $return==0 /goto :Done
/if $return==10 /goto :nofind
/if "$p3"=="" /goto :combine
|--> Third item
/varset v7 "$p3"
/call PlaceItems
/if $return==0 /goto :Done
/if $return==10 /goto :nofind
/if "$p4"=="" /goto :combine
|--> Fourth item
/varset v7 "$p4"
/call PlaceItems
/if $return==0 /goto :Done
/if $return==10 /goto :nofind
/if "$p5"=="" /goto :combine
|--> Fifth item
/varset v7 "$p5"
/if "$p6"=="" /goto :combine
|--> Sixth item
/varset v7 "$p6"
/if "$p7"=="" /goto :combine
|--> Seventh item
/varset v7 "$p7"
/if "$p8"=="" /goto :combine
|--> Eighth item
/varset v7 "$p8"
/if "$p9"=="" /goto :combine
|--> Nineth item
/varset v7 "$p9"
/call PlaceItems
/if $return==0 /goto :Done
/if $return==10 /goto :nofind
:Combine
/click left $v0 combine
/delay 10
/doevents
/if $return==99 /goto :Done
/goto :AutoDrop
:AutoDrop
/click left auto
/delay 1
/if "$cursor()"=="TRUE" /goto :AutoDrop
/goto :MakeItems
:nofind
/echo Didn't find: $arg(2,"$v7")
/goto :Done
:zero
/echo You did not provide a value between 1 & 9
:Done
/sendkey up ctrl
/return
sub PlaceItems
/for v1 1 to 9
/if "$arg(1,"$v7")"=="$v1" /goto :DoneChecking
/next v1
/echo Char1 of v7 not 1-9
|This line only gets executed if the first char in $v7 is not
|a number between 1 & 9
/return 0
:DoneChecking
|loops using v5 as a counter, from 1 to v1, to place the correct
|number of items stated in $v7 into your tailoring kit, using v6
|to determine which slot in the kit to place the item(s) that were
|located. v5 is set to 1 & incremented for each individual item,
|whereas v6 is only reset to 0 at the beginning of :MakeItems
/for v5 1 to $v1
/finditem similar $arg(2,"$v7")
/if $find()==FALSE /return 10 |a returned value of 10 is
/echo Cklick left $v0 $v6
/click left $v0 $v6
/varadd v6 1
/next v5
/return $v1
Sub Event_NoCombine
/return 99
sub container_check
/echo Made it to container_check with Trade skill $p0
/if "$p0"=="Alchemy" {
/call Alchemy
} else /if "$p0"=="Baking Env" {
/call BENV
} else /if "$p0"=="Baking Inv" {
/call BINV
} else /if "$p0"=="Brewing" {
/call Brewing
} else /if "$p0"=="Fishing" {
/call Fishing
} else /if "$p0"=="Fletching" {
/call Fletching
} else /if "$p0"=="Jewelcraft" {
/call Jewlecraft
} else /if "$p0"=="Poison" {
/call Poison
} else /if "$p0"=="Pottery Wheel" {
/call PotteryW
} else /if "$p0"=="Pottery Kiln" {
/call PotteryK
} else /if "$p0"=="Smithing" {
/call Smithing
} else /if "$p0"=="Tailoring Env" {
/call TENV
} else /if "$p0"=="Tailoring Inv" {
/call TINV
} else /if "$p0"=="Tinkering" {
/call Tinkering
}
/varset v80 "$v81"
/return "$v80"
sub Alchemy
/varset v10 99
/for v99 0 to 7
/if "$pack($v99,combine)"=="Medicine Bag" /varset v10 $v99
/next v99
/return "pack $v10"
sub BENV
/itemtarget Oven
/face item
/click left item
/return enviro
sub BINV
/varset v10 99
/for v99 0 to 7
/if "$pack($v99,combine)"=="Spit" /varset v10 $v99
/next v99
/return "pack $v10"
sub Brewing
/itemtarget Brew
/face item
/click left item
/return enviro
sub Fishing
/varset v10 99
/for v99 0 to 7
/if "$pack($v99,combine)"=="tacklebox" /varset v10 $v99
/next v99
/return "pack $v10"
sub Fletching
/varset v10 99
/for v99 0 to 7
/if "$pack($v99,combine)"=="fletching" /varset v10 $v99
/next v99
/return "pack $v10"
sub Jewlecraft
/varset v10 99
/for v99 0 to 7
/if "$pack($v99,combine)"=="jewelers" /varset v10 $v99
/next v99
/return "pack $v10"
sub Poison
/varset v10 99
/for v99 0 to 7
/if "$pack($v99,combine)"=="mortar" /varset v10 $v99
/next v99
/return "pack $v10"
sub PotteryW
/itemtarget Pottery Wheel
/face item
/click left item
/return enviro
sub PotteryK
/itemtarget Kiln
/face item
/click left item
/return enviro
sub Smithing
/itemtarget Forge
/face item
/click left item
/return enviro
sub TENV
/itemtarget Loom
/face item
/click left item
/return enviro
sub TINV
/varset v10 99
/for v99 0 to 7
/if "$pack($v99,combine)"=="tailoring" /varset v10 $v99
/next v99
/varset v81 "pack $v10"
/return "$v81"
sub Tinkering
/varset v10 99
/for v99 0 to 7
/if "$pack($v99,combine)"=="tinkering" /varset v10 $v99
/next v99
/return "pack $v10"
Edit, fixed a bug that would was cauing it to not fine the corect combine container