Fix: /bzsrch

A forum for feature requests/discussions and user submitted patches that improve MQ2

Moderator: MacroQuest Developers

Are you willing to contribute for this feature?

50 bucks or more.
0
No votes
40
0
No votes
30
0
No votes
20
0
No votes
10
0
No votes
5
0
No votes
Nothing
1
100%
Hate the feature if you add it ill stop using MQ2
0
No votes
 
Total votes: 1

EqMule
Developer
Developer
Posts: 2697
Joined: Fri Jan 03, 2003 9:57 pm
Contact:

Fix: /bzsrch

Post by EqMule » Wed Apr 29, 2015 5:41 pm

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
My status o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received Image donations for this month's patches.

Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.