I'm having a problem with Sub BuyItem. I've got the specific problem pinpointed, and have tried a few different work arounds, but have not achieved satisfactory results. The problem involves this line:
Code: Select all
/varcalc v98 $char(gold)*100+$char(silver)*10+$char(copper)
One of the items I am purchasing in my macro comes to an even platinum amount when bought in a stack of 20 - no gold, silver, copper. Therefore, when it calcs the cash before and after /click left merchant buy, the amount is the same, and it stays stuck in the loop. I've tried adding $char(plat)*1000 to the calculation, and I get a cannot parse Sub BuyItem error, and EQ locks up. I thought maybe it was too large a figure, so I tried using just $char(plat)*10+$char(gold). I got the same cannot parse error, but it doesn't lock - in fact it behaves normally, but it spams my screen with the error every time I buy or sell anything. So for now, I'm using Sub BuyItem for the other components, and a simple /click left merchant buy in the normal loop (not in a sub) for that particular item, with a /delay 1 after the buy. The problem is, it doesn't want to let me buy more than 1 stack that way. No matter how many clicks I put in, it buys one stack only. So my macro is running smoothly since I've taken everything down to 1 stack. I'd like to do more combines between merchant interaction, though. I need help modifying sub buyitem to account for platinum, or buying multiple stacks without the help of that subroutine.
Thanks for reading through, and for any insights.
-BN