Page 1 of 1

Fix: /bzsrch

Posted: Wed Apr 29, 2015 5:41 pm
by EqMule
Usage Example:

Code: Select all

#turbo 120
Sub Main
	/declare baztimer timer local 0
	/declare i int local
:bazLoop
	/if (${baztimer}==0)
		/if (${Window[BazaarSearchWnd].Open}==FALSE) {
			/squelch /windowstate BazaarSearchWnd open
			/delay 3s ${Window[BazaarSearchWnd].Open}==TRUE
		}
		/bzsrch briny essence
		/delay 5s ${Bazaar.Done}==TRUE
		/if (${Bazaar.Count} >= 1) {
			/for i 1 to ${Bazaar.Count}
				/if (${Bool[${Bazaar.Item[${i}].Name.Find[Minor]}]}==TRUE) {
					/if (${Math.Calc[${Bazaar.Item[${i}].Price}/1000].Precision[0]}<=25000) {
						/varset foundit 1
						/tell eqmule hey man there is a ${Bazaar.Item[${i}].Name} in bazaar for ${Math.Calc[${Bazaar.Item[${i}].Price}/1000].Precision[0]}pp
					}
				}
				/if (${Bool[${Bazaar.Item[${i}].Name.Find[Medium]}]}==TRUE) {
					/if (${Math.Calc[${Bazaar.Item[${i}].Price}/1000].Precision[0]}<=50000) {
						/varset foundit 1
						/tell eqmule hey man there is a ${Bazaar.Item[${i}].Name} in bazaar for ${Math.Calc[${Bazaar.Item[${i}].Price}/1000].Precision[0]}pp
					}
				}
				/if (${foundit}==1) {
					/varset baztimer 60m
					/beep
					/beep
					/beep
					/echo Cheap Briny FOUND IN BAZAAR!!!
				}
			/next i
		}
	}
	/delay 1m
	/goto:bazLoop
/return