HUD Parsing Question

dadada

Member
Joined
Mar 10, 2008
Messages
262
Reaction score
2
Points
16
I'm trying to get the nearest named NPC's to show up in my HUD.
I used to have it displayed just fine in my HUD before I took a break a few years ago.

It looks like the commas within a ${NearestSpawn[1, NPC Named]} lookup are being parsed as the commas separating the actual HUD line-sections.

Example:
Spawn1=3,2,245,340,255,0,${If[${NearestSpawn[1,npc named].Name.NotEqual["NULL"]},${NearestSpawn[1,npc named].Level} - ${NearestSpawn[1,npc named].Name},]}



Any thoughts on how to make this work? I want to "escape" those commas within the NearestSpawn search.


Thanks!
 
Copy this, its the one i personalized.

[Elements]

T1=3,1,260,5,255,255,255,GENERAL
Date=3,1,260,20,255,255,255,${Time.Date}
ZoneLongName=3,1,260,30,255,255,255,Zone
ZoneShortNameText=3,1,295,30,255,255,255,${Zone.ShortName}
RealTime1=3,1,260,40,255,255,255,Real
RealTime2=3,1,295,40,255,255,255,${Time}
GameTime1=3,1,260,50,255,255,255,Game
GameTime2=3,1,295,50,255,255,255,${GameTime.Hour}:${GameTime.Minute} ${If[${String[${GameTime.Night}].Equal["TRUE"]},Night,Day]}
Macro1=3,1,260,70,255,255,255,Macro
Macro2=3,1,295,70,255,255,255,${If[${Macro.Name.NotEqual["NULL"]},${Macro.Name},]}
FM=3,1,700,162,255,255,255,Full Mana in - ${Int[${Math.Calc[(${Me.MaxMana}-${Me.CurrentMana})/(${Me.ManaRegen}|1)/10]}]}m${Int[${Math.Calc[(${Me.MaxMana}-${Me.CurrentMana})/(${Me.ManaRegen}|1)%10*6]}]}

G1=3,1,385,5,255,255,255,ZONE
Players1=3,1,385,20,255,255,0,Chars
Players2=3,1,420,20,255,255,0,${SpawnCount[PC]}
GMInd1=3,1,385,30,255,255,255,${If[${Spawn[gm].ID},GM,]}
GMInd2=3,1,385,30,255,255,255,${If[${Spawn[gm].ID},,GM]}
GMInd3=3,1,420,30,255,255,255,${If[${Spawn[gm].ID},In Zone! = ${NearestSpawn[GM]},]}
GMInd4=3,1,420,30,255,255,255,${If[${Spawn[gm].ID},,None]}
Players3=3,1,385,40,255,255,255,NPCs
Players4=3,1,420,40,255,255,255,${SpawnCount[NPC]}

A1=3,1,940,5,255,255,255,EXPERIENCE
RegExp1=3,1,940,20,255,255,0,XP
RegExp2=3,1,965,20,255,255,0,${Float[${Me.PctExp}]} %
AAExp1=3,1,940,30,255,255,0,AA
AAExp2=3,1,965,30,255,255,0,${Float[${Me.PctAAExp}]} %
AAExp3=3,1,940,45,255,255,255,Free
AAExp4=3,1,965,45,255,255,255,${Me.AAPoints} / ${Me.AAPointsSpent}

TA1=3,1,1100,5,255,255,255,TARGET
TargetLevel3=3,3,1100,17,0,255,0,${If[${Target.ID},${Target.Level},]}
TargetName3=3,3,1120,17,0,255,0,${If[${Target.ID},${Target.CleanName} ${Target.Surname},]}
TargetHPs3=3,1,1100,35,255,255,150,${If[${Target.ID},${Target.CurrentHPs} / ${Target.MaxHPs},]}
TargetClass3=3,1,1100,45,255,255,150,${If[${Target.ID},${Target.Class},]}
TargetClass4=3,1,1100,55,255,255,150,${If[${Target.Guild.NotEqual["NULL"]},${Target.Guild},]}

NS5=3,1,1275,5,255,255,255,NAMED
Spawn1b=3,1,1275,22,255,255,0,${If[${NearestSpawn[1,npc named].Name.NotEqual["NULL"]},${NearestSpawn[1,npc named].Level},]}
Spawn1d=3,1,1295,22,255,255,0,${If[${NearestSpawn[1,npc named].Name.NotEqual["NULL"]},${NearestSpawn[1,npc named].CleanName},]}
Spawn2b=3,1,1275,32,255,255,0,${If[${NearestSpawn[2,npc named].Name.NotEqual["NULL"]},${NearestSpawn[2,npc named].Level},]}
Spawn2d=3,1,1295,32,255,255,0,${If[${NearestSpawn[2,npc named].Name.NotEqual["NULL"]},${NearestSpawn[2,npc named].CleanName},]}
Spawn3b=3,1,1275,42,255,255,0,${If[${NearestSpawn[3,npc named].Name.NotEqual["NULL"]},${NearestSpawn[3,npc named].Level},]}
Spawn3d=3,1,1295,42,255,255,0,${If[${NearestSpawn[3,npc named].Name.NotEqual["NULL"]},${NearestSpawn[3,npc named].CleanName},]}
Spawn4b=3,1,1275,52,255,255,0,${If[${NearestSpawn[4,npc named].Name.NotEqual["NULL"]},${NearestSpawn[4,npc named].Level},]}
Spawn4d=3,1,1295,52,255,255,0,${If[${NearestSpawn[4,npc named].Name.NotEqual["NULL"]},${NearestSpawn[4,npc named].CleanName},]}
Spawn5b=3,1,1275,62,255,255,0,${If[${NearestSpawn[5,npc named].Name.NotEqual["NULL"]},${NearestSpawn[5,npc named].Level},]}
Spawn5d=3,1,1295,62,255,255,0,${If[${NearestSpawn[5,npc named].Name.NotEqual["NULL"]},${NearestSpawn[5,npc named].CleanName},]}
Spawn6b=3,1,1275,72,255,255,0,${If[${NearestSpawn[6,npc named].Name.NotEqual["NULL"]},${NearestSpawn[6,npc named].Level},]}
Spawn6d=3,1,1295,72,255,255,0,${If[${NearestSpawn[6,npc named].Name.NotEqual["NULL"]},${NearestSpawn[6,npc named].CleanName},]}
Spawn7b=3,1,1275,82,255,255,0,${If[${NearestSpawn[7,npc named].Name.NotEqual["NULL"]},${NearestSpawn[7,npc named].Level},]}
Spawn7d=3,1,1295,82,255,255,0,${If[${NearestSpawn[7,npc named].Name.NotEqual["NULL"]},${NearestSpawn[7,npc named].CleanName},]}
Spawn8b=3,1,1275,92,255,255,0,${If[${NearestSpawn[8,npc named].Name.NotEqual["NULL"]},${NearestSpawn[8,npc named].Level},]}
Spawn8d=3,1,1295,92,255,255,0,${If[${NearestSpawn[8,npc named].Name.NotEqual["NULL"]},${NearestSpawn[8,npc named].CleanName},]}
Spawn9b=3,1,1275,102,255,255,0,${If[${NearestSpawn[9,npc named].Name.NotEqual["NULL"]},${NearestSpawn[9,npc named].Level},]}
Spawn9d=3,1,1295,102,255,255,0,${If[${NearestSpawn[9,npc named].Name.NotEqual["NULL"]},${NearestSpawn[9,npc named].CleanName},]}
Spawn10b=3,1,1275,112,255,255,0,${If[${NearestSpawn[10,npc named].Name.NotEqual["NULL"]},${NearestSpawn[10,npc named].Level},]}
Spawn10d=3,1,1295,112,255,255,0,${If[${NearestSpawn[10,npc named].Name.NotEqual["NULL"]},${NearestSpawn[10,npc named].CleanName},]}
Spawn11b=3,1,1275,122,255,255,0,${If[${NearestSpawn[11,npc named].Name.NotEqual["NULL"]},${NearestSpawn[11,npc named].Level},]}
Spawn11d=3,1,1295,122,255,255,0,${If[${NearestSpawn[11,npc named].Name.NotEqual["NULL"]},${NearestSpawn[11,npc named].CleanName},]}
Spawn12b=3,1,1275,132,255,255,0,${If[${NearestSpawn[12,npc named].Name.NotEqual["NULL"]},${NearestSpawn[12,npc named].Level},]}
Spawn12d=3,1,1295,132,255,255,0,${If[${NearestSpawn[12,npc named].Name.NotEqual["NULL"]},${NearestSpawn[12,npc named].CleanName},]}
Spawn13b=3,1,1275,142,255,255,0,${If[${NearestSpawn[13,npc named].Name.NotEqual["NULL"]},${NearestSpawn[13,npc named].Level},]}
Spawn13d=3,1,1295,142,255,255,0,${If[${NearestSpawn[13,npc named].Name.NotEqual["NULL"]},${NearestSpawn[13,npc named].CleanName},]}
Spawn14b=3,1,1275,152,255,255,0,${If[${NearestSpawn[14,npc named].Name.NotEqual["NULL"]},${NearestSpawn[14,npc named].Level},]}
Spawn14d=3,1,1295,152,255,255,0,${If[${NearestSpawn[14,npc named].Name.NotEqual["NULL"]},${NearestSpawn[14,npc named].CleanName},]}
Spawn15b=3,1,1275,162,255,255,0,${If[${NearestSpawn[15,npc named].Name.NotEqual["NULL"]},${NearestSpawn[15,npc named].Level},]}
Spawn15d=3,1,1295,162,255,255,0,${If[${NearestSpawn[15,npc named].Name.NotEqual["NULL"]},${NearestSpawn[15,npc named].CleanName},]}

PC5=3,1,700,5,255,255,255,PLAYERS IN ZONE
Spawn1ba=3,1,700,22,255,255,0,${If[${NearestSpawn[1,pc].Name.NotEqual["NULL"]},${NearestSpawn[1,pc].Level},]}
Spawn1da=3,1,720,22,255,255,0,${If[${NearestSpawn[1,pc].Guild.NotEqual["NULL"]},${NearestSpawn[1,pc].Guild},]} ${If[${NearestSpawn[1,pc].Name.NotEqual["NULL"]},${NearestSpawn[1,pc].CleanName},]}
Spawn2ba=3,1,700,32,255,255,0,${If[${NearestSpawn[2,pc].Name.NotEqual["NULL"]},${NearestSpawn[2,pc].Level},]}
Spawn2da=3,1,720,32,255,255,0,${If[${NearestSpawn[2,pc].Guild.NotEqual["NULL"]},${NearestSpawn[2,pc].Guild},]} ${If[${NearestSpawn[2,pc].Name.NotEqual["NULL"]},${NearestSpawn[2,pc].CleanName},]}
Spawn3ba=3,1,700,42,255,255,0,${If[${NearestSpawn[3,pc].Name.NotEqual["NULL"]},${NearestSpawn[3,pc].Level},]}
Spawn3da=3,1,720,42,255,255,0,${If[${NearestSpawn[3,pc].Guild.NotEqual["NULL"]},${NearestSpawn[3,pc].Guild},]} ${If[${NearestSpawn[3,pc].Name.NotEqual["NULL"]},${NearestSpawn[3,pc].CleanName},]}
Spawn4ba=3,1,700,52,255,255,0,${If[${NearestSpawn[4,pc].Name.NotEqual["NULL"]},${NearestSpawn[4,pc].Level},]}
Spawn4da=3,1,720,52,255,255,0,${If[${NearestSpawn[4,pc].Guild.NotEqual["NULL"]},${NearestSpawn[4,pc].Guild},]} ${If[${NearestSpawn[4,pc].Name.NotEqual["NULL"]},${NearestSpawn[4,pc].CleanName},]}
Spawn5ba=3,1,700,62,255,255,0,${If[${NearestSpawn[5,pc].Name.NotEqual["NULL"]},${NearestSpawn[5,pc].Level},]}
Spawn5da=3,1,720,62,255,255,0,${If[${NearestSpawn[5,pc].Guild.NotEqual["NULL"]},${NearestSpawn[5,pc].Guild},]} ${If[${NearestSpawn[5,pc].Name.NotEqual["NULL"]},${NearestSpawn[5,pc].CleanName},]}
Spawn6ba=3,1,700,72,255,255,0,${If[${NearestSpawn[6,pc].Name.NotEqual["NULL"]},${NearestSpawn[6,pc].Level},]}
Spawn6da=3,1,720,72,255,255,0,${If[${NearestSpawn[6,pc].Guild.NotEqual["NULL"]},${NearestSpawn[6,pc].Guild},]} ${If[${NearestSpawn[6,pc].Name.NotEqual["NULL"]},${NearestSpawn[6,pc].CleanName},]}
Spawn7ba=3,1,700,82,255,255,0,${If[${NearestSpawn[7,pc].Name.NotEqual["NULL"]},${NearestSpawn[7,pc].Level},]}
Spawn7da=3,1,720,82,255,255,0,${If[${NearestSpawn[7,pc].Guild.NotEqual["NULL"]},${NearestSpawn[7,pc].Guild},]} ${If[${NearestSpawn[7,pc].Name.NotEqual["NULL"]},${NearestSpawn[7,pc].CleanName},]}
Spawn8ba=3,1,700,92,255,255,0,${If[${NearestSpawn[8,pc].Name.NotEqual["NULL"]},${NearestSpawn[8,pc].Level},]}
Spawn8da=3,1,720,92,255,255,0,${If[${NearestSpawn[8,pc].Guild.NotEqual["NULL"]},${NearestSpawn[8,pc].Guild},]} ${If[${NearestSpawn[8,pc].Name.NotEqual["NULL"]},${NearestSpawn[8,pc].CleanName},]}
Spawn9ba=3,1,700,102,255,255,0,${If[${NearestSpawn[9,pc].Name.NotEqual["NULL"]},${NearestSpawn[9,pc].Level},]}
Spawn9da=3,1,720,102,255,255,0,${If[${NearestSpawn[9,pc].Guild.NotEqual["NULL"]},${NearestSpawn[9,pc].Guild},]} ${If[${NearestSpawn[9,pc].Name.NotEqual["NULL"]},${NearestSpawn[9,pc].CleanName},]}
Spawn10ba=3,1,700,112,255,255,0,${If[${NearestSpawn[10,pc].Name.NotEqual["NULL"]},${NearestSpawn[10,pc].Level},]}
Spawn10da=3,1,720,112,255,255,0,${If[${NearestSpawn[10,pc].Guild.NotEqual["NULL"]},${NearestSpawn[10,pc].Guild},]} ${If[${NearestSpawn[10,pc].Name.NotEqual["NULL"]},${NearestSpawn[10,pc].CleanName},]}
Spawn11ba=3,1,700,122,255,255,0,${If[${NearestSpawn[11,pc].Name.NotEqual["NULL"]},${NearestSpawn[11,pc].Level},]}
Spawn11da=3,1,720,122,255,255,0,${If[${NearestSpawn[11,pc].Guild.NotEqual["NULL"]},${NearestSpawn[11,pc].Guild},]} ${If[${NearestSpawn[11,pc].Name.NotEqual["NULL"]},${NearestSpawn[11,pc].CleanName},]}
Spawn12ba=3,1,700,132,255,255,0,${If[${NearestSpawn[12,pc].Name.NotEqual["NULL"]},${NearestSpawn[12,pc].Level},]}
Spawn12da=3,1,720,132,255,255,0,${If[${NearestSpawn[12,pc].Guild.NotEqual["NULL"]},${NearestSpawn[12,pc].Guild},]} ${If[${NearestSpawn[12,pc].Name.NotEqual["NULL"]},${NearestSpawn[12,pc].CleanName},]}
Spawn13ba=3,1,700,142,255,255,0,${If[${NearestSpawn[13,pc].Name.NotEqual["NULL"]},${NearestSpawn[13,pc].Level},]}
Spawn13da=3,1,720,142,255,255,0,${If[${NearestSpawn[13,pc].Guild.NotEqual["NULL"]},${NearestSpawn[13,pc].Guild},]} ${If[${NearestSpawn[13,pc].Name.NotEqual["NULL"]},${NearestSpawn[13,pc].CleanName},]}
Spawn10ba=3,1,700,152,255,255,0,${If[${NearestSpawn[14,pc].Name.NotEqual["NULL"]},${NearestSpawn[14,pc].Level},]}
Spawn10da=3,1,720,152,255,255,0,${If[${NearestSpawn[14,pc].Guild.NotEqual["NULL"]},${NearestSpawn[14,pc].Guild},]} ${If[${NearestSpawn[14,pc].Name.NotEqual["NULL"]},${NearestSpawn[14,pc].CleanName},]}
Spawn10ba=3,1,700,162,255,255,0,${If[${NearestSpawn[15,pc].Name.NotEqual["NULL"]},${NearestSpawn[15,pc].Level},]}
Spawn10da=3,1,720,162,255,255,0,${If[${NearestSpawn[15,pc].Guild.NotEqual["NULL"]},${NearestSpawn[15,pc].Guild},]} ${If[${NearestSpawn[15,pc].Name.NotEqual["NULL"]},${NearestSpawn[15,pc].CleanName},]}
 
Thanks for that post.
The sample documentation on the MMOBugs MQ2HUD (from the home page) is missing a comma and a numerical value before the IF string begins.
I copied my sample from there to start with.
Fixed mine.

Someone should update the example there when they get a chance.

Thanks again!
 
Thanks for that post.
The sample documentation on the MMOBugs MQ2HUD (from the home page) is missing a comma and a numerical value before the IF string begins.
I copied my sample from there to start with.
Fixed mine.

Someone should update the example there when they get a chance.

Thanks again!
It does say that.

Code:
Configuration Explanation
The configuration of each element is TYPE,X,Y,RED,GREEN,BLUE,TEXT

TYPE is currently any combination of the following:
1 - Display in non-full screen mode
2 - Display in full screen mode ("f10 mode")
4 - X,Y is based on cursor location
e.g. 1+2+4=7. 7 means all 3 of the above. 6 means 2 and 4. 3 means 1 and 2. Just add them together. There is no way to end up with a number that could mean two different combinations.
X,Y is the screen location. 0,0 is the upper left corner fo your screen.
Red, Green and Blue are each from 0 to 255. 255,255,255 is white, 0,0,0 is black.
Seeing as how the mouse functions perfectly fine in full screen mode, the cursor has been forced to display the same as it would in UI-visible mode. The only difference is the item is not displayed on your cursor. With MQ2HUD and the "CursorItemName" example, you could have it show the name of the item attached to your cursor in full screen mode (use type 6 if you want it to follow your cursor in full screen mode only).
Adding Font Size:

[I]UseFontSize=on|off

This changes the size of individual lines in the hud. If this setting is turned off and you use a line of hud text that uses it, your output will look messed up.

With this option on, the configuration of each element is TYPE,FONT,X,Y,RED,GREEN,BLUE,TEXT

Example usage.

Time=3,1,5,22,0,255,0,Time: ${Time}

All other settings are the same as before but as you can see the second number is a 1. This represents your font size. This can range from 1-6 depending on your needs. If your setting is toggled to off (or the setting is not even listed), using the font number in line of code will look messed up on your hud and not function as intended.
[/I]

htw