(This Tutorial was made for every DX8 Engine)
Hello Eclipse Community
I saw a Tutorial from @[member=“Abhi”] about Target-Detail Information, and i thought that we could make it way easier and also for DX8 Engines.
Also @[member=“Hackertatio”], thanks to this guy who figured out with me some stuff at 4a.m in the morning to make this happen.
Basically all this Tutorial does is, when you target a NPC with your Left Mouse Button it shows a Information Bar with the Name, HP and Level. Of Course you add more things when you have a bit knowledge. Also i try to update this tutorial whenever i add something new.
Lets get started! (Only Client-Side)
First at all you need to a graphic where you want to show the target-details to your GUI Folder (data files/graphics/gui) I use for example: [attachment=1518:24.png]
Add to “modGraphics” at the Bottom
Public Sub DrawTargetDetails() Dim i As Long, x As Long, y As Long, npcNum As Long Dim Width As Long, Height As Long, SpriteNum As Long Dim MapNpcNum As Long Dim Name As String Dim HpBar As String ' render the window Width = 256 Height = 64 ' render the window on screen x = 300 y = 64 ' render the details RenderTexture Tex_GUI(24), x, y, 0, 0, Width, Height, Width, Height npcNum = MapNpc(myTarget).Num ' exists? If npcNum > 0 Then Name = Trim$(NPC(npcNum).Name) HpBar = Trim$(MapNpc(npcNum).Vital(HP)) ' show the information RenderText Font_Default, Name, x + 10, y + 4, Yellow RenderText Font_Default, MapNpc(myTarget).Vital(HP) & "/" & NPC(MapNpc(myTarget).Num).HP, x + 66, y + 15, Yellow RenderText Font_Default, NPC(npcNum).Level, x + 150, y + 4, Yellow End If End Sub
^ This Sub will Render the Graphic and the Details on the Screen.
At “modGraphics” look for:
Public Sub DrawTarget(ByVal x As Long, ByVal y As Long)
In this Sub you add above Exit Sub:
If myTargetType = TARGET_TYPE_NPC Then DrawTargetDetails End If
^ This will call the the Sub we added before when you click a NPC.
This was my first Tutorial so excuse if i missed something. i would be glad if you leave a comment so i can improve my future tutorials.