Can someone tell what I'm doing wrong?
Posted: Fri Oct 29, 2004 5:51 pm
Got it
Need to talk about MacroQuest to other MacroQuest users?
https://mq64.org/phpBB3/
Code: Select all
Created by dstern
How To Run: target a trader/npc; open up the merchant window; type in /macro pricecheck
You will either get nothing returned besides the "macro ended" message, or your computer
will beep, and will return a message saying that "You can make a #copper profit on item
number #item sold by merchantName
Have fun with this, and you can probably figure out ways to automate this process.
Oh! And happy farming PP!!!
**|
Sub Main
/declare priceToBuy int outer
/declare priceToSell int outer
/declare iteration int outer 1
/declare totalItems int outer ${Merchant.Items}
:loop
/if (${Merchant.Open}&&(${iteration}<=${totalItems})) {
/varset priceToBuy ${Merchant.Item[${iteration}].BuyPrice}
/varset priceToSell ${Merchant.Item[${iteration}].Value}
/if (${priceToBuy}<${priceToSell}) {
/echo You can make a ${Math.Calc[${priceToSell}-${priceToBuy}]} copper profit on item number ${iteration} sold by ${Merchant.Name}
/varcalc iteration ${iteration}+1
/beep
/goto :loop
} else {
/varcalc iteration ${iteration}+1
/goto :loop
}
}
/endmacro