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. Customizing it to a different
| recipe is quite easy- just replace the AddIngred
| lines with your own ingredients and replace the
| FindCombiner line with the name of the container you're
| using. It's recommended you put the container you're
| going to combine in in slot 7 so products don't stack up
| in it.
#turbo
#define CombinerPack v97
#define IngredSize v98
#chat tell
Sub Main
/press ctrl
/press alt
/press shift
/varset IngredSize 0
/call AddIngred "lion meat" | List of ingredients. The AddIngred
/call AddIngred "Cheese" | subroutine automatically sets the index.
/call AddIngred "loaf of bread"
/call AddIngred "non-stick frying pan"
/call FindCombiner "spit" | Name of the container to combine in.
| It's highly recommented to put the combine
| container in slot 7.
/echo $CombinerPack
:RunMake
/press shift
/sendkey down ctrl
/delay 5
/for v99 0 to $v90
/if $pack($p0,empty)==FALSE {
/call ClearPack
/press shift
/sendkey down ctrl
}
/call ClearCursor
/finditem "$a(0,$v99)"
/delay 5
/if $find()==FALSE {
/goto :Done
}
/click left pack $CombinerPack $v99
/delay 5
/next v99
/click left pack $CombinerPack combine
/doevents
/goto :RunMake
:Done
/return
Sub ClearCursor
:Start
/if $cursor()!=NULL {
/click left auto
/delay 5
}
/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 5
/for v99 0 to $v50
/click left pack $p0 $v99
/delay 5
/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 {
/echo No container named "$p0" found.
/endmacro
}
/return $CombinerPack
Sub Event_Chat
/endmacro
/return

