Report your alternate currency [ Pieces of Eight ]

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

dewey2461
Contributing Member
Contributing Member
Posts: 1759
Joined: Sun Apr 17, 2005 1:53 am

Report your alternate currency [ Pieces of Eight ]

Post by dewey2461 » Thu Jul 02, 2015 12:13 am

I've been farming pieces of eight in TDS and wanted a way to check if I was ready to go buy some gear. Pretty simple code to open up the window inventory and walk the alt currency list. Posting so others can use as an example.

I use it via /bcaa //mac po8

Code: Select all

|-----------------------------------------------------------------------------
| file name  : po8.mac
|-----------------------------------------------------------------------------

Sub Main
	/declare I int local 
	/declare S string local
	
	/echo Reporting on my total "Peices of Eight"

	/varset I 1
	
	/if (!${Window[InventoryWindow]}) /keypress i
	/delay 2s ${Window[InventoryWindow]}
	/notify InventoryWindow IW_Subwindows tabselect 5
	/delay 1s
	
	:NextItem
		/varset S ${Window[InventoryWindow].Child[IW_AltCurrPage].Child[IW_AltCurr_PointList].List[${I},2]}
		|/echo Debug : List[ ${I} ] = ${S}
		/if (${S.Equal[Pieces of Eight]}) {
			/varset S ${Window[InventoryWindow].Child[IW_AltCurrPage].Child[IW_AltCurr_PointList].List[${I},3]}
			/echo You have [ ${S} ] Peices of Eight
			/bc I have [ ${S} ] Peices of Eight
			/notify InventoryWindow IW_Subwindows tabselect 1
			/keypress ESC
			/end
		}
		/if (${S.Equal[NULL]} || ${I}>32) /end
		/varcalc I ${I}+1
	/goto :NextItem
/return

User avatar
htw
a grimling bloodguard
a grimling bloodguard
Posts: 512
Joined: Wed Feb 18, 2004 8:30 pm
Location: Albuquerque, NM USA
Contact:

Re: Report your alternate currency [ Pieces of Eight ]

Post by htw » Sun Jul 05, 2015 10:25 pm

A little OT for what you posted, but it'd be cool if we go ahead and ID which they are, and add to the function in MQ2Utilities.cpp. Then you could do like ${Me.AltCurrency[Pieces of Eight]}

It looks like 3 are missing from EQData.h (and the function GetCurrencyIDByName() in MQ2Utilities):

Arx Energy Crystals
Fists of Bayle
Pieces of Eight

SwiftyMUSE
Developer
Developer
Posts: 1205
Joined: Tue Sep 23, 2003 10:52 pm

Re: Report your alternate currency [ Pieces of Eight ]

Post by SwiftyMUSE » Mon Jul 06, 2015 10:50 am

I'll get those added for next zip.

Update: Completed and ready for next release.
PayPal: Donate to SwiftyMUSE
Bitcoin: 1LuQ6YcEAWxF3fm9yWMiro4K582je7364V
Krono: PM me

dont_know_at_all wrote:Gee, if only there was a way to correctly report a crash...

dewey2461
Contributing Member
Contributing Member
Posts: 1759
Joined: Sun Apr 17, 2005 1:53 am

Re: Report your alternate currency [ Pieces of Eight ]

Post by dewey2461 » Mon Jul 06, 2015 11:52 am

Now all we need is DKAA to post something like ... Dewey, why don't you just use ${Me.AltCurrency[...]}.

SwiftyMUSE
Developer
Developer
Posts: 1205
Joined: Tue Sep 23, 2003 10:52 pm

Re: Report your alternate currency [ Pieces of Eight ]

Post by SwiftyMUSE » Mon Jul 06, 2015 5:24 pm

dewey2461 wrote:Now all we need is DKAA to post something like ... Dewey, why don't you just use ${Me.AltCurrency[...]}.

That works and is actually how I verified the changes. Unfortunately, you need to know the currency id which isn't currently defined in the source.

Now you will be able to use ${Me.PiecesofEight}.
PayPal: Donate to SwiftyMUSE
Bitcoin: 1LuQ6YcEAWxF3fm9yWMiro4K582je7364V
Krono: PM me

dont_know_at_all wrote:Gee, if only there was a way to correctly report a crash...

SwiftyMUSE
Developer
Developer
Posts: 1205
Joined: Tue Sep 23, 2003 10:52 pm

Re: Report your alternate currency [ Pieces of Eight ]

Post by SwiftyMUSE » Tue Jul 14, 2015 2:31 pm

Unfortunately it wasn't included in the 7/14 release today. It is in and ready for next release.
PayPal: Donate to SwiftyMUSE
Bitcoin: 1LuQ6YcEAWxF3fm9yWMiro4K582je7364V
Krono: PM me

dont_know_at_all wrote:Gee, if only there was a way to correctly report a crash...