Is this possible...

Need help running MacroQuest 1? Too bad! Use MQ2.

Moderator: MacroQuest Developers

jones14
orc pawn
orc pawn
Posts: 12
Joined: Tue Aug 06, 2002 5:11 pm

Is this possible...

Post by jones14 » Thu Aug 08, 2002 11:45 pm

Keep in mind i'm new to this, and having a b*tch of a time trying to figure it out.. Anyways... what I'm trying to do is set up a macro that buys Jug of sauces then targets the other merchant buys Fresh fish. then combines them blah blah... Anyways, in jagged pine there is a fish merchant / sauce merchant side by side. I've been trying to use cheese.macs and edit them for this, I can get it to combine items I already have, but then goes into merchant mode and doesn't buy / sell. If noone knows how to do this, explaining how to tell which buyitem i'm selecting would be nice also. Bear / cheese mac have buyitem 11. but I'm unsure of the numbering. Any help is appreciated, thanks.

Xaanin
a lesser mummy
a lesser mummy
Posts: 66
Joined: Fri Jun 28, 2002 6:41 am

Post by Xaanin » Fri Aug 09, 2002 4:52 am

Merchant slots are numbered like this from top to bottom:

0 1
2 3
4 5
6 7
8 9
10 11

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Fri Aug 09, 2002 11:44 am

Salutations,
if your using /press u, after you do the command, check you've targetted the right merchant...

jones14
orc pawn
orc pawn
Posts: 12
Joined: Tue Aug 06, 2002 5:11 pm

Post by jones14 » Fri Aug 09, 2002 1:29 pm

blah.
Last edited by jones14 on Sat Aug 10, 2002 2:46 am, edited 1 time in total.

jones14
orc pawn
orc pawn
Posts: 12
Joined: Tue Aug 06, 2002 5:11 pm

Post by jones14 » Sat Aug 10, 2002 12:19 am

blah.. Ok I have this working so far that i start with no supplies, then it says cannot find fresh fish, clicks on my merchant, says cannot find fish fillets (item i wish to sell) and buys 2 stacks of fresh fish, then exits that merchant, targets, faces the lady merchant (sells sauce) and says cannot find jug of sauces. How can i get it to open her merchant window to buy?
[[ L124RD insists that you use code brackets]]

Code: Select all

| - bear.mac - 
| 
#include routines.mac 

Sub Main 
|This sets how many repetitions to go through in a Wait loop before reporting Frozen 
   /varset v92 200 
   /mqlog 
   /varcalc v50 $char(plat)*10+$char(gold) 
   /varset t0 3000 
   /varset t1 0 
   /call FindCombiner baking 
   /if $return==99 /return 
   /varset v80 $return 

   :StartLoop 

   /cleanup 
   /click left auto 
   /click right inv $v80 

   /if $pack($v80,empty)==FALSE /call CleanPack 
   /if $pack($v80,empty)==FALSE /goto :TooFull 

   /sendkey down ctrl 
   /call Makebear 
   /sendkey up ctrl 
|   /if n $t1==0 /call CastCHA 
   /call SellBuy 
   /call SellBuy2

   /if $t0==0 /call LogStats 

/goto :StartLoop 

:TooFull 

/goto :StartLoop 


Sub CleanPack 
   /varcalc v2 $pack($v80,slots)-1 
   /sendkey down shift 
   /for v1 0 to $v2 
      /click left pack $v80 $v1 
      /click left auto 
   /next v1 
   /sendkey up shift 
/return 


Sub Makebear 

   :Makebear 

      /finditem "Jug of Sauces" 
      /click left pack $v80 0 

      /finditem "Fresh Fish" 
      /click left pack $v80 3 

      /if "$item($v80,0,name)"=="Jug of Sauces" /if "$item($v80,3,name)"=="Fresh Fish" /goto :DoCombine 
      /return 

      :DoCombine 
      /click left pack $v80 combine 

      :LoopWait 
      /if "$cursor()"=="NULL" /goto :LoopWait 
      /if "$cursor(name)"=="filleting knife" /goto :Failed 
      /click left auto 
      :LoopFail 
      /if "$cursor()"=="NULL" /goto :LoopFail 
      :Failed 
      /click left auto 

   /goto :Makebear 

/return 


Sub SellBuy 

   | Open merchant 
   /click left auto 
   /target Pergan
   /face 
   /press u 
   /delay 10 

   /sendkey down shift 

   | Sell our bearmeat 
   :Sellbear 
      /varset v98 $char(gold) 
      /finditem "Fish Fillets" 
      /if $find()==FALSE /goto :DoneSelling 
      /click left merchant buy 
      :WaitSale 
      /varadd v99 1 
      /if n $v99==$v92 /goto :loopdetected 
      /if n $v98==$char(gold) /goto :WaitSale 
   /goto :Sellbear 


   :DoneSelling 
   /varset v99 0 
   /varset v51 0 
   /finditem "Fresh Fish" 
   /if $find()==TRUE /varset v51 1 
   /goto :buybearmeat 


   | loopedetected get out of it clean up and go on - code added by van 
   :loopdetected 
   /echo loop detected cleaning up and continuing 
   /varset v99 0 
   /cleanup 
   /click left auto 
   /press esc 
   /press CTRL 
   /press shift 
   /press alt 
   /goto :startloop 

   :buybearmeat 


   | Buy bearmeat 
   /click left merchant 6 
   /call BuyItem 
   /call BuyItem 

   


   /sendkey up shift 
   /press esc 
   /press esc 
   /press esc
/return 


Sub SellBuy2

   | Open merchant 
   /click left auto 
   /target Nerdala 
   /face 
   /press u 
   /delay 10 

   /sendkey down shift 

   
   /varset v99 0 
   /varset v51 0 
   /finditem "Jug of Sauces" 
   /if $find()==TRUE /varset v51 1 
   /goto :buybear 


   | loopedetected get out of it clean up and go on - code added by van 
   :loopdetected 
   /echo loop detected cleaning up and continuing 
   /varset v99 0 
   /cleanup 
   /click left auto 
   /press esc 
   /press CTRL 
   /press shift 
   /press alt 
   /goto :startloop 

   :buybear


   | Buy bearmeat 
   /click left merchant 3 
   /call BuyItem 
   /call BuyItem 


   /sendkey up shift 
   /press esc 
   /press esc 
/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 

Sub BuyItem 
   /varcalc v98 $char(gold)*100+$char(silver)*10+$char(copper) 
   /click left merchant buy 
   :WaitBuy 
      /varcalc v97 $char(gold)*100+$char(silver)*10+$char(copper) 
   /if n $v98==$v97 /goto :WaitBuy 
/return 

Sub CastCHA 
   /target myself 
   /call Event_CastFizzle 
   :LoopFizzle 
      /doevents 
   /if n $t9>0 /goto :LoopFizzle 
   /varset t1 30m 
/return 

Sub Event_CastFizzle 
  /delay 5 
  /cast 1 
  /varset t9 7s 
/return 
Like always, any help is appreciated. - will edit this as i fix it.