I occasionally get lag spikes, and sometimes end up filling my inventory with bear meat, breaking the macro. The few changes I tried to get my idea to work have not done what I wanted
Yeah, I know the labels are all for cheese, but it works.
| - bear.mac -
|
#include routines.mac
Sub Main
/mqlog
/varcalc v50 $char(plat)*10+$char(gold)
/varset t0 3000
/filter skills none
/filter money off
/filter food off
:StartLoop
/call FindCombiner Baking
/if $return==99 /return
/varset v80 $return
| :StartLoop
/cleanup
/delay 5
/click left auto
/delay 5
/click right inv $v80
/if $pack($v80,empty)==FALSE /call CleanPack
| /if $pack($v80,empty)==FALSE /goto :TooFull
/if $pack($v80,empty)==FALSE /call SellBuy
/sendkey down ctrl
/call MakeCheese
/sendkey up ctrl
/call SellBuy
/if $t0==0 /call LogStats
/goto :StartLoop
:TooFull
/echo You are too full on stuff...
/return
Sub CleanPack
/varcalc v2 $pack($v80,slots)-1
/sendkey down shift
/for v1 0 to $v2
/click left pack $v80 $v1
/click left auto
/delay 5
/next v1
/sendkey up shift
/return
Sub MakeCheese
:MakeCheese
/finditem "Bear Meat"
/if $find()==FALSE /goto
/click left pack $v80 0
/finditem "Filleting Knife"
/if $find()==FALSE /goto :Finished
/click left pack $v80 1
| /if n $pack($v80,space)>0 /return
/click left pack $v80 combine
| :AutoDropFillets
| /echo dropping fillets...
| /for v1 1 to 150
/for v1 1 to 75
/if "$cursor()"=="TRUE" /goto :AutoDropFillets
| /delay 1
/next v1
:AutoDropFillets
| /echo Cursor is $cursor() and name is $cursor(name)
/if "$cursor()"=="TRUE" /click left auto
| /echo Cursor2 is $cursor() and name is $cursor(name)
|
| /if "$cursor()"=="Filleted Bear" /click left auto
| /echo Cursor3 is $cursor() and name is $cursor(name)
|
| /if "$cursor()"=="Filleting Knife" /click left auto
| make sure cursor is empty
| /delay 1
/if "$cursor()"=="TRUE" /goto :AutoDropFillets
/goto :MakeCheese
:Finished
/return
Sub SellBuy
| Open merchant
| /target Nicoela
/click left auto
/delay 5
/click left auto
/delay 5
/target Samotal
| /target Daliea
| /face
/press u
/delay 20
/sendkey down shift
| Sell our cheese
:SellCheese
/finditem "Filleted Bear"
/delay 2
/if $find()==FALSE /goto
/click left merchant buy
/delay 2
/goto :SellCheese
/varset v51 0
/finditem "Bear Meat"
/delay 5
/if $find()==TRUE /varset v51 1
/delay 2
| Buy Bottles of Milk
/click left merchant 11
/click left merchant buy
/delay 2
/click left merchant buy
/delay 2
/click left merchant buy
/delay 2
/click left merchant buy
/delay 2
/click left merchant buy
/delay 2
| /click left merchant buy
| /delay 2
| /click left merchant buy
| /delay 2
| /click left merchant buy
| /delay 2
| /click left merchant buy
| /delay 2
| /click left merchant buy
| /delay 2
/sendkey up shift
/press esc
/cleanup
/return
Sub LogStats
| Calc profit in gold
/varcalc v51 $char(plat)*10+$char(gold)-$v50
| calc plat/hr
/varcalc v52 $v51*360/$running
| Plat
/varcalc v53 $v51/10
| left over gold
/varcalc v54 $v51%10
/echo Profit: $v53.$v54pp, avg: $v52pp/hr
/mqlog Run time: $running sec, Profit: $v53.$v54pp, Average = $v52pp/hr
/varset t0 3000
/return


