06-12-2007, 01:48 PM
Well it seems.. My blting of the NPC Names, Player Names, NPC HP Bars, and Player HP&MP Bars have stopped working... This is the tutorial I added.
http://www.sylphonline.com/enginefiles/M...0Maps.html
Here are the sub's for those certain things..
BltPlayerName
[spoiler][/spoiler]
BltNPCBars
[spoiler][/spoiler]
BltMapNPCName
[spoiler][/spoiler]
BltPlayerBars
[spoiler][/spoiler]
Any Ideas? Help would be highly appreciated. Thanks!
http://www.sylphonline.com/enginefiles/M...0Maps.html
Here are the sub's for those certain things..
BltPlayerName
[spoiler]
Code:
Sub BltPlayerName(ByVal Index As Long)
Dim TextX As Long
Dim TextY As Long
Dim Color As Long
' Check access level
If GetPlayerPK(Index) = NO Then
Select Case GetPlayerAccess(Index)
Case 0
Color = QBColor(Brown)
Case 1
Color = QBColor(DarkGrey)
Case 2
Color = QBColor(Cyan)
Case 3
Color = QBColor(Blue)
Case 4
Color = QBColor(Pink)
End Select
Else
Color = QBColor(BrightRed)
End If
' Draw name
TextX = GetPlayerX(Index) * PIC_X + Player(Index).XOffset + Int(PIC_X / 2) - ((Len(GetPlayerName(Index)) / 2) * 8)
TextY = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset - 50 '(or-4 - pic_y - pic_y/2)
TextX = TextX + (PIC_X * (MAX_MAPX + 1))
TextY = TextY + (PIC_Y * (MAX_MAPY + 1))
Call DrawText(TexthDC, TextX, TextY, GetPlayerName(Index), Color)
End Sub
BltNPCBars
[spoiler]
Code:
Sub BltNpcBars(ByVal Index As Long)
Dim x As Long, y As Long
x = MapNpc(Index).x * PIC_X + MapNpc(Index).XOffset
y = MapNpc(Index).y * PIC_Y + MapNpc(Index).YOffset - 4
If MapNpc(Index).HP = 0 Then Exit Sub
Call DD_BackBuffer.SetFillColor(RGB(255, 0, 0))
Call DD_BackBuffer.DrawBox(x, y + 32, x + 32, y + 36)
Call DD_BackBuffer.SetFillColor(RGB(0, 255, 0))
Call DD_BackBuffer.DrawBox(x, y + 32, x + ((MapNpc(Index).HP / 100) / (MapNpc(Index).MaxHP / 100) * 32), y + 36)
End Sub
BltMapNPCName
[spoiler]
Code:
Sub BltMapNPCName(ByVal Index As Long)
Dim TextX As Long
Dim TextY As Long
If MapNpc(Index).x = CurX And MapNpc(Index).y = CurY Then
With Npc(MapNpc(Index).Num)
'Draw name
TextX = MapNpc(Index).x * PIC_X + MapNpc(Index).XOffset + CLng(PIC_X / 2) - ((Len(Trim$(.name)) / 2) * 8)
TextY = MapNpc(Index).y * 32 + MapNpc(Index).YOffset - CLng(PIC_Y / 2) - 4
TextX = TextX + (PIC_X * (MAX_MAPX + 1))
TextY = TextY + (PIC_Y * (MAX_MAPY + 1))
DrawText TexthDC, TextX, TextY, Trim$(.name), vbWhite
End With
End If
End Sub
BltPlayerBars
[spoiler]
Code:
Sub BltPlayerBars(ByVal Index As Long)
Dim x As Long, y As Long
x = GetPlayerX(Index) * PIC_X + Player(Index).XOffset
y = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset - 4
If Player(Index).HP = 0 Then Exit Sub
Call DD_BackBuffer.SetFillColor(RGB(255, 0, 0))
Call DD_BackBuffer.DrawBox(x, y + 32, x + 32, y + 36)
Call DD_BackBuffer.SetFillColor(RGB(0, 255, 0))
Call DD_BackBuffer.DrawBox(x, y + 32, x + ((Player(Index).HP / 100) / (Player(Index).MaxHP / 100) * 32), y + 36)
If Index = MyIndex Then
Call DD_BackBuffer.SetFillColor(RGB(255, 0, 0))
Call DD_BackBuffer.DrawBox(x, y + 35, x + 32, y + 39)
'draws MP for you
Call DD_BackBuffer.SetFillColor(RGB(0, 0, 255))
Call DD_BackBuffer.DrawBox(x, y + 35, x + ((Player(MyIndex).MP / 100) / (Player(MyIndex).MaxMP / 100) * 32), y + 39)
End If
End Sub
Any Ideas? Help would be highly appreciated. Thanks!