![Offline Offline](./styles/subsilver2/imageset/en/icon_user_offline.gif) |
Regular |
![User avatar](./download/file.php?avatar=1181_1195401380.png) |
Joined: Sun Jun 24, 2007 2:45 am Posts: 62 Location: Texas, USA
|
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/Mirage_Tutorial_Backup/Temporary%20Archive%20(Read%20Only)/Seamless%20Scrolling%20Maps.htmlHere are the sub's for those certain things.. BltPlayerName
SPOILER: (click to show)
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: (click to show)
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: (click to show)
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: (click to show)
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!
_________________ ![Image](http://www.wise-projects.com/images/Signiture.png) ![Image](http://img227.imageshack.us/img227/6103/wisefirehh2.png)
|
|