Conditional buff durration display

For questions regarding conversion of scripts from the old, parm style to the new MQ2Data format. Conversion questions only!

Moderator: MacroQuest Developers

User avatar
Vlasdorian
decaying skeleton
decaying skeleton
Posts: 6
Joined: Sat Jan 24, 2004 5:01 am
Location: Sacramento, CA
Contact:

Conditional buff durration display

Post by Vlasdorian » Fri May 07, 2004 11:26 pm

ok, somone has probably already done this, but I figured I'd share.

What I'm using:

Code: Select all

  <Label item="BW_Buff0_LabelDur">
    <ScreenID>BW_Buff0_LabelDur</ScreenID>
    <Font>2</Font>
    <EQType>9999</EQType>
        <TooltipReference>${If[${Me.Buff[1].ID},${Me.Buff[1].Duration.Hours}:${Me.Buff[1].Duration.Minutes}:${Me.Buff[1].Duration.Seconds},]}</TooltipReference>
    <Location>
      <X>3</X>
      <Y>25</Y>
    </Location>
    <Size>
      <CX>82</CX>
      <CY>12</CY>
    </Size>
    <TextColor>
      <R>0</R>
      <G>255</G>
      <B>0</B>
    </TextColor>
    <AlignCenter>true</AlignCenter>
  </Label>
I hope this helps someone (and sorry if it's posted in the wrong place).

Joe

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Fri May 07, 2004 11:41 pm

This
<TooltipReference>${If[${Me.Buff[1].ID},${Me.Buff[1].Duration.Hours}:${Me.Buff[1].Duration.Minutes}:${Me.Buff[1].Duration.Seconds},]}</TooltipReference>
is almost exactly the same as
<TooltipReference>${Buff[1].Duration.Time}</TooltipReference>

If there's no buff it's NULL, and NULL does not get displayed :)
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

User avatar
Vlasdorian
decaying skeleton
decaying skeleton
Posts: 6
Joined: Sat Jan 24, 2004 5:01 am
Location: Sacramento, CA
Contact:

Post by Vlasdorian » Sat May 08, 2004 12:00 am

D'oh!

Proof that in programming, there's a simple way to do something... and an infinite number of harder ways.

/em looks embarassed...

can we um, forget I said anything? :D

Joe
Vlasdorian of Terris-Thule

dok
a ghoul
a ghoul
Posts: 127
Joined: Mon Mar 15, 2004 3:38 pm

Post by dok » Sat May 08, 2004 2:27 am

well, until a few patches ago, that was the way to get it to show hours. Ticks.Time was recently changed to display hours also.