MQ2Hud, showing value of item on mouse cursor.

Forum for posting custom UIs, portions of UIs, and HUD stuff using MQ's enhancements.

Moderator: MacroQuest Developers

kaen01
a ghoul
a ghoul
Posts: 92
Joined: Sun Dec 18, 2016 7:47 am

MQ2Hud, showing value of item on mouse cursor.

Post by kaen01 » Sat Jan 07, 2017 6:54 pm

Code: Select all

itemPrice = 7,4,0,-12,25,255,25,${If[${Cursor.ID},${Float[${Math.Calc[${Cursor.Value}\1000]}].Int}pp ${Float[${Math.Calc[(${Cursor.Value}-(1000*(${Cursor.Value}\1000)))\100]}].Int}gp ${Float[${Math.Calc[((${Cursor.Value}-(1000*(${Cursor.Value}\1000))) - (100*((${Cursor.Value}-(1000*(${Cursor.Value}\1000)))\100)))\10]}].Int}sp ${Float[${Math.Calc[((${Cursor.Value}-(1000*(${Cursor.Value}\1000))) - (100*((${Cursor.Value}-(1000*(${Cursor.Value}\1000)))\100)))-(10*(((${Cursor.Value}-(1000*(${Cursor.Value}\1000))) - (100*((${Cursor.Value}-(1000*(${Cursor.Value}\1000)))\100)))\10)]}].Int}cp,]}
so i come up with this

and it works, but i was wondering if there is a better way, and also if possible to have the text outlined without repeating the line 5 times and offsetting the 4 others.

JudgeD
a snow griffon
a snow griffon
Posts: 354
Joined: Sat Aug 18, 2012 8:07 pm

Re: MQ2Hud, showing value of item on mouse cursor.

Post by JudgeD » Sat Jan 07, 2017 7:39 pm

MQ2ItemDisplay puts this info into the inspect window, but for the loot macro I use (VIP section), I output info like this in the same way you did.

kaen01
a ghoul
a ghoul
Posts: 92
Joined: Sun Dec 18, 2016 7:47 am

Re: MQ2Hud, showing value of item on mouse cursor.

Post by kaen01 » Sun Jan 08, 2017 4:56 am

found your edits and checked out our info, was a bit more clean than mine, so repurposed it, and did some more edits to make it work like i wanted it to.

Code: Select all

itemPrice = 7,3,15,-10,25,255,25,${If[${Cursor.ID},${If[${Cursor.NoDrop} || ${Cursor.Value}==0,No Value,${If[${Math.Calc[${Cursor.Value}/1000].Int} > 0,${Math.Calc[${Cursor.Value}/1000].Int}pp ,]}${If[${Math.Calc[(${Cursor.Value}/100)%10].Int} > 0,${Math.Calc[(${Cursor.Value}/100)%10].Int}gp ,]}${If[${Math.Calc[(${Cursor.Value}/10)%10].Int} > 0,${Math.Calc[(${Cursor.Value}/10)%10].Int}sp ,]}${If[${Math.Calc[(${Cursor.Value})%10].Int} > 0,${Math.Calc[(${Cursor.Value})%10].Int}cp,]}]},]}