LineOfSight Check on HUD

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

Moderator: MacroQuest Developers

magictiger
a snow griffon
a snow griffon
Posts: 450
Joined: Sun Mar 21, 2004 2:24 pm

LineOfSight Check on HUD

Post by magictiger » Fri Jul 09, 2004 5:31 pm

Code: Select all

LOSCheck=1,150,485,255,234,8,${If[${Target.ID},Line of Sight:,]}
LOSCheckResponseT=1,220,485,0,255,0,${If[${Target.ID},${If[${Target.LineOfSight},TRUE,]},]}
LOSCheckResponseF=1,220,485,255,0,0,${If[${Target.ID},${If[${Target.LineOfSight},,FALSE]},]}
Enjoy! Mod as you see fit. Label does not appear until you have a target.

hytiek
Contributing Member
Contributing Member
Posts: 54
Joined: Mon Jun 14, 2004 5:45 pm

Post by hytiek » Mon Jul 19, 2004 5:07 pm

Thanks, this is nice!

magictiger
a snow griffon
a snow griffon
Posts: 450
Joined: Sun Mar 21, 2004 2:24 pm

Post by magictiger » Mon Jul 19, 2004 6:09 pm

I've also kicked out a target information block. The label stays up so you know where to look, but the block of info doesn't appear until you have a target. Gives target name, pct HP, level, class, loc with distance in parenthesis for each axis, target's heading, the "max melee range" for a mob (max distance you can hit it) and, if it's a pet, its master's name.

If you're interested, I could post that. You'd need to change the screen location, of course, but the information is very useful for me :) If you can spare the screen space, maybe mod it so the labels are on top of your UI, then put a blank chat window beneath to give it a darkened background. Text is green, easily changeable.

I'd like to post my complete HUD, but until the AA stuff is fixed, it leaves a nice hole where the old AA stuff went :)

Arune
a hill giant
a hill giant
Posts: 216
Joined: Sat Jul 03, 2004 1:51 pm

Post by Arune » Tue Jul 20, 2004 12:22 am

I would be interested in that MT, sounds pretty slick.

magictiger
a snow griffon
a snow griffon
Posts: 450
Joined: Sun Mar 21, 2004 2:24 pm

Post by magictiger » Tue Jul 20, 2004 1:52 am

For just the target info block:

Code: Select all

TargetInfo=1,375,335,255,234,8,Target Information:
TargetNameHP=1,375,345,0,255,0,${If[${Target.ID},${Target.CleanName}    HP: ${Target.PctHPs},]}
TargetLVLClass=1,375,355,0,255,0,${If[${Target.ID},${Target.Level} ${Target.Class},]}
TargetLOC=1,375,365,0,255,0,${If[${Target.ID},X: ${Target.X} (${Math.Calc[${Target.X}-${Me.X}]}) Y: ${Target.Y} (${Math.Calc[${Target.Y}-${Me.Y}]}),]}
TargetZ=1,375,375,0,255,0,${If[${Target.ID},Z: ${Target.Z} (${Math.Calc[${Target.Z}-${Me.Z}]}),]}
TargetMaxMeleeHeading=1,375,385,0,255,0,${If[${Target.ID},Max Melee: ${Target.MaxRangeTo}   Heading: ${Target.Heading},]}
TargetStateMaster=1,375,395,0,255,0,${If[${Target.ID},State: ${Target.State}   ${If[${Target.Type.Equal[Pet]},Master: ${Target.Master},]},]}
This is my full mq2hud.ini from pre-patch. Remove the AA stuff before trying to load this. The first portion is taken from... somebody else's post. I'd give proper credit, but I can't remember who wrote it. Sorry.

Code: Select all

[Elements] 
Macro=1,150,245,255,255,0,Macro - ${If[${Macro.Name.NotEqual["NULL"]},${Macro.Name},]} 
Raid=1,150,265,180,180,180,${If[${Raid.Members}>0,In Raid - ${Raid.Members},]}    ${If[${Raid.Members}>0,Raid Level - ${Raid.AverageLevel},]} 
Spawn1=1,150,275,255,255,0,${If[${NearestSpawn[1,npc #].Name.NotEqual["NULL"]},${NearestSpawn[1,npc #].Level},]} - ${If[${NearestSpawn[1,npc #].Name.NotEqual["NULL"]},${NearestSpawn[1,npc #].Name},]} 
Spawn2=1,150,285,255,255,0,${If[${NearestSpawn[2,npc #].Name.NotEqual["NULL"]},${NearestSpawn[2,npc #].Level},]} - ${If[${NearestSpawn[2,npc #].Name.NotEqual["NULL"]},${NearestSpawn[2,npc #].Name},]} 
Spawn3=1,150,295,255,255,0,${If[${NearestSpawn[3,npc #].Name.NotEqual["NULL"]},${NearestSpawn[3,npc #].Level},]} - ${If[${NearestSpawn[3,npc #].Name.NotEqual["NULL"]},${NearestSpawn[3,npc #].Name},]} 
Spawn4=1,150,305,255,255,0,${If[${NearestSpawn[4,npc #].Name.NotEqual["NULL"]},${NearestSpawn[4,npc #].Level},]} - ${If[${NearestSpawn[4,npc #].Name.NotEqual["NULL"]},${NearestSpawn[4,npc #].Name},]} 
GroupLeader=1,150,325,180,180,180,Group Leader : ${GroupLeader.Name} 
MGBAAtext=1,150,335,255,234,8,Mass Group Buff - - - - 
MGBgreenreadytext=1,270,335,0,255,0,${If[${String[${Me.AltAbilityReady[Mass Group Buff]}].Equal["TRUE"]},Ready,]} 
MGBRednotready=1,270,335,255,0,0,${If[${String[${Me.AltAbilityReady[Mass Group Buff]}].Equal["TRUE"]}, ,Available in ${Me.AltAbilityTimer[Mass Group Buff].TimeHMS}]} 
RC3text=1,150,345,255,234,8,Radiant Cure - - - - - - - 
RC3greenreadytext=1,270,345,0,255,0,${If[${String[${Me.AltAbilityReady[Radiant Cure]}].Equal["TRUE"]},Ready,]} 
RC3Rednotready=1,270,345,255,0,0,${If[${String[${Me.AltAbilityReady[Radiant Cure]}].Equal["TRUE"]}, ,Available in ${Me.AltAbilityTimer[Radiant Cure].TimeHMS}]} 
C5AAtext=1,150,355,255,234,8,Cannibalization - - - - 
C5greenreadytext=1,270,355,0,255,0,${If[${String[${Me.AltAbilityReady[Cannibalization]}].Equal["TRUE"]},Ready,]} 
C5Rednotready=1,270,355,255,0,0,${If[${String[${Me.AltAbilityReady[Cannibalization]}].Equal["TRUE"]}, ,Available in ${Me.AltAbilityTimer[Cannibalization].TimeHMS}]} 
SCAAtext=1,150,365,255,234,8,Spirit Call - - - - 
SCgreenreadytext=1,270,365,0,255,0,${If[${String[${Me.AltAbilityReady[Spirit Call]}].Equal["TRUE"]},Ready,]} 
SCRednotready=1,270,365,255,0,0,${If[${String[${Me.AltAbilityReady[Spirit Call]}].Equal["TRUE"]}, ,Available in ${Me.AltAbilityTimer[Spirit Call].TimeHMS}]} 
VPAAtext=1,150,375,255,234,8,Virulent Paralysis - - - 
VPgreenreadytext=1,270,375,0,255,0,${If[${String[${Me.AltAbilityReady[Virulent Paralysis]}].Equal["TRUE"]},Ready,]} 
VPRednotready=1,270,375,255,0,0,${If[${String[${Me.AltAbilityReady[Virulent Paralysis]}].Equal["TRUE"]}, ,Available in ${Me.AltAbilityTimer[Virulent Paralysis].TimeHMS}]} 
RangeFinder1label=1,150,395,255,234,8,${If[${Target.ID},Spell Gem 1:,]}
RangeFinder1=1,220,395,0,255,0,${If[${Target.ID},${If[${Target.Distance}<=${Me.Gem[1].Range},Y,]},]}
RangeFinder1OOR=1,220,395,255,0,0,${If[${Target.ID},${If[${Target.Distance}>${Me.Gem[1].Range},N,]},]}
RangeFinder2label=1,150,405,255,234,8,${If[${Target.ID},Spell Gem 2:,]}
RangeFinder2=1,220,405,0,255,0,${If[${Target.ID},${If[${Target.Distance}<=${Me.Gem[2].Range},Y,]},]}
RangeFinder2OOR=1,220,405,255,0,0,${If[${Target.ID},${If[${Target.Distance}>${Me.Gem[2].Range},N,]},]}
RangeFinder3label=1,150,415,255,234,8,${If[${Target.ID},Spell Gem 3:,]}
RangeFinder3=1,220,415,0,255,0,${If[${Target.ID},${If[${Target.Distance}<=${Me.Gem[3].Range},Y,]},]}
RangeFinder3OOR=1,220,415,255,0,0,${If[${Target.ID},${If[${Target.Distance}>${Me.Gem[3].Range},N,]},]}
RangeFinder4label=1,150,425,255,234,8,${If[${Target.ID},Spell Gem 4:,]}
RangeFinder4=1,220,425,0,255,0,${If[${Target.ID},${If[${Target.Distance}<=${Me.Gem[4].Range},Y,]},]}
RangeFinder4OOR=1,220,425,255,0,0,${If[${Target.ID},${If[${Target.Distance}>${Me.Gem[4].Range},N,]},]}
RangeFinder5label=1,150,435,255,234,8,${If[${Target.ID},Spell Gem 5:,]}
RangeFinder5=1,220,435,0,255,0,${If[${Target.ID},${If[${Target.Distance}<=${Me.Gem[5].Range},Y,]},]}
RangeFinder5OOR=1,220,435,255,0,0,${If[${Target.ID},${If[${Target.Distance}>${Me.Gem[5].Range},N,]},]}
RangeFinder6label=1,150,445,255,234,8,${If[${Target.ID},Spell Gem 6:,]}
RangeFinder6=1,220,445,0,255,0,${If[${Target.ID},${If[${Target.Distance}<=${Me.Gem[6].Range},Y,]},]}
RangeFinder6OOR=1,220,445,255,0,0,${If[${Target.ID},${If[${Target.Distance}>${Me.Gem[6].Range},N,]},]}
RangeFinder7label=1,150,455,255,234,8,${If[${Target.ID},Spell Gem 7:,]}
RangeFinder7=1,220,455,0,255,0,${If[${Target.ID},${If[${Target.Distance}<=${Me.Gem[7].Range},Y,]},]}
RangeFinder7OOR=1,220,455,255,0,0,${If[${Target.ID},${If[${Target.Distance}>${Me.Gem[7].Range},N,]},]}
RangeFinder8label=1,150,465,255,234,8,${If[${Target.ID},Spell Gem 8:,]}
RangeFinder8=1,220,465,0,255,0,${If[${Target.ID},${If[${Target.Distance}<=${Me.Gem[8].Range},Y,]},]}
RangeFinder8OOR=1,220,465,255,0,0,${If[${Target.ID},${If[${Target.Distance}>${Me.Gem[8].Range},N,]},]}
LOSCheck=1,150,485,255,234,8,${If[${Target.ID},Line of Sight:,]}
LOSCheckResponseT=1,220,485,0,255,0,${If[${Target.ID},${If[${Target.LineOfSight},TRUE,]},]}
LOSCheckResponseF=1,220,485,255,0,0,${If[${Target.ID},${If[${Target.LineOfSight},,FALSE]},]}

TargetInfo=1,375,335,255,234,8,Target Information:
TargetNameHP=1,375,345,0,255,0,${If[${Target.ID},${Target.CleanName}    HP: ${Target.PctHPs},]}
TargetLVLClass=1,375,355,0,255,0,${If[${Target.ID},${Target.Level} ${Target.Class},]}
TargetLOC=1,375,365,0,255,0,${If[${Target.ID},X: ${Target.X} (${Math.Calc[${Target.X}-${Me.X}]}) Y: ${Target.Y} (${Math.Calc[${Target.Y}-${Me.Y}]}),]}
TargetZ=1,375,375,0,255,0,${If[${Target.ID},Z: ${Target.Z} (${Math.Calc[${Target.Z}-${Me.Z}]}),]}
TargetMaxMeleeHeading=1,375,385,0,255,0,${If[${Target.ID},Max Melee: ${Target.MaxRangeTo}   Heading: ${Target.Heading},]}
TargetStateMaster=1,375,395,0,255,0,${If[${Target.ID},State: ${Target.State}   ${If[${Target.Type.Equal[Pet]},Master: ${Target.Master},]},]}

Synndic
orc pawn
orc pawn
Posts: 28
Joined: Sat Aug 09, 2003 9:51 am

Re: LineOfSight Check on HUD

Post by Synndic » Wed Jul 21, 2004 10:48 am

magictiger wrote:

Code: Select all

LOSCheck=1,150,485,255,234,8,${If[${Target.ID},Line of Sight:,]}
LOSCheckResponseT=1,220,485,0,255,0,${If[${Target.ID},${If[${Target.LineOfSight},TRUE,]},]}
LOSCheckResponseF=1,220,485,255,0,0,${If[${Target.ID},${If[${Target.LineOfSight},,FALSE]},]}
Enjoy! Mod as you see fit. Label does not appear until you have a target.
1 question I have is. I've been checking the help file that comes with MQ, there is no mention of a Target.LineOfSight item. How did you find out about this and are there any other cool little tidbits I might be missing?

Drumstix42
a grimling bloodguard
a grimling bloodguard
Posts: 808
Joined: Mon May 03, 2004 4:25 pm

Post by Drumstix42 » Wed Jul 21, 2004 11:02 am

was announced in one of the releases, as it was much awaited by a few ppl, or maybe a lot.

magictiger
a snow griffon
a snow griffon
Posts: 450
Joined: Sun Mar 21, 2004 2:24 pm

Post by magictiger » Wed Jul 21, 2004 2:45 pm

Bah, I was going to say I'm just psychic and read the emanations of Lax's brainwaves as he hand-coded it :)
But yeah, it was in the changes.txt

Drumstix42
a grimling bloodguard
a grimling bloodguard
Posts: 808
Joined: Mon May 03, 2004 4:25 pm

Post by Drumstix42 » Wed Jul 21, 2004 7:39 pm

magictiger wrote:Bah, I was going to say I'm just psychic and read the emanations of Lax's brainwaves as he hand-coded it :)
But yeah, it was in the changes.txt
haha :lol:

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Wed Jul 21, 2004 8:25 pm

Here are my LoS HuD entries:

Code: Select all

NOLOS=3,560,750,255,30,0,${If[${Target.ID} && !${Target.LineOfSight},TARGET NOT IN LoS,]}
LOS=3,560,750,50,255,0,${If[${Target.ID} && ${Target.LineOfSight},TARGET IN LoS,]}
In my UI it is positioned just above my target window.

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Re: LineOfSight Check on HUD

Post by wassup » Wed Jul 21, 2004 8:34 pm

Synndic wrote: 1 question I have is. I've been checking the help file that comes with MQ, there is no mention of a Target.LineOfSight item. How did you find out about this and are there any other cool little tidbits I might be missing?
I added these to the readme a good while ago:
TLO:

bool LineOfSight[y,x,z:y,x,z]
access to type(s): bool

Example

/echo ${LineOfSight[20,40,-20:100,-300,70}
Returns TRUE if Line of Sight is clear between the two locations


Also in ground, spawn, and switch data types:

ground:

bool LineOfSight
ground spawn is in Line of Sight?


spawn:

bool LineOfSight
spawn is in LoS?


switch:

bool LineOfSight
switch is in LoS?

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Wed Jul 21, 2004 8:50 pm

magictiger:

Code: Select all

C5greenreadytext=1,270,355,0,255,0,${If[${String[${Me.AltAbilityReady[Cannibalization]}].Equal["TRUE"]},Ready,]} 
C5Rednotready=1,270,355,255,0,0,${If[${String[${Me.AltAbilityReady[Cannibalization]}].Equal["TRUE"]}, ,Available in ${Me.AltAbilityTimer[Cannibalization].TimeHMS}]}
/em scratches his head in puzzlement.

This is a better way:

Code: Select all

C5READY=3,500,720,50,255,0,${If[${Me.AltAbilityReady[47]},C5 READY,]}
C5NOTREADY=3,500,720,255,30,0,${If[${Me.AltAbilityReady[Cannibalization]},,C5 READY IN: ${Me.AltAbilityTimer[47].Time}]}

magictiger
a snow griffon
a snow griffon
Posts: 450
Joined: Sun Mar 21, 2004 2:24 pm

Post by magictiger » Wed Jul 21, 2004 10:23 pm

Erm... and what makes that better?
Still just two ${If} statements.

Edit: Ok, I'm an idiot and I see now. Not doing a string comparison.
Yeah, that's a bit more efficient.

Not that it all matters since the AA Stuff is broke for now :)

Drumstix42
a grimling bloodguard
a grimling bloodguard
Posts: 808
Joined: Mon May 03, 2004 4:25 pm

Post by Drumstix42 » Fri Jul 23, 2004 7:31 pm

Anyone know if the AA stuff has been fixed in the latest zip?

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Thu Aug 19, 2004 1:16 pm

Think that this may be working now with MQ2 Latest zip updated: August 19 2004 02:07:10
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!