Page 1 of 2

Report your alternate currency [ Pieces of Eight ]

Posted: Thu Jul 02, 2015 12:13 am
by dewey2461
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

Re: Report your alternate currency [ Pieces of Eight ]

Posted: Sun Jul 05, 2015 10:25 pm
by htw
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

Re: Report your alternate currency [ Pieces of Eight ]

Posted: Mon Jul 06, 2015 10:50 am
by SwiftyMUSE
I'll get those added for next zip.

Update: Completed and ready for next release.

Re: Report your alternate currency [ Pieces of Eight ]

Posted: Mon Jul 06, 2015 11:52 am
by dewey2461
Now all we need is DKAA to post something like ... Dewey, why don't you just use ${Me.AltCurrency[...]}.

Re: Report your alternate currency [ Pieces of Eight ]

Posted: Mon Jul 06, 2015 5:24 pm
by SwiftyMUSE
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}.

Re: Report your alternate currency [ Pieces of Eight ]

Posted: Tue Jul 14, 2015 2:31 pm
by SwiftyMUSE
Unfortunately it wasn't included in the 7/14 release today. It is in and ready for next release.

Re: Report your alternate currency [ Pieces of Eight ]

Posted: Sat Jan 17, 2026 10:06 am
by xyilla

Re: Report your alternate currency [ Pieces of Eight ]

Posted: Sat Jan 17, 2026 10:07 am
by xyilla

Re: Report your alternate currency [ Pieces of Eight ]

Posted: Sat Jan 17, 2026 10:08 am
by xyilla

Re: Report your alternate currency [ Pieces of Eight ]

Posted: Sat Jan 17, 2026 10:10 am
by xyilla

Re: Report your alternate currency [ Pieces of Eight ]

Posted: Sat Jan 17, 2026 10:11 am
by xyilla

Re: Report your alternate currency [ Pieces of Eight ]

Posted: Sat Jan 17, 2026 10:13 am
by xyilla

Re: Report your alternate currency [ Pieces of Eight ]

Posted: Sat Jan 17, 2026 10:14 am
by xyilla

Re: Report your alternate currency [ Pieces of Eight ]

Posted: Sat Jan 17, 2026 10:15 am
by xyilla

Re: Report your alternate currency [ Pieces of Eight ]

Posted: Sat Jan 17, 2026 10:16 am
by xyilla