^ Pic
\/ code
Code:
' ::::::::::::::::::::::
' :: Player hp packet ::
' ::::::::::::::::::::::
If LCase(Parse(0)) = "playerhp" Then
Player(MyIndex).MaxHP = Val(Parse(1))
Call SetPlayerHP(MyIndex, Val(Parse(2)))
If GetPlayerMaxHP(MyIndex) > 0 Then
'frmMainGame.lblHP.Caption = Int(GetPlayerHP(MyIndex) / GetPlayerMaxHP(MyIndex) * 100) & "%"
[b]frmMainGame.picHP.Width = ((GetPlayerHP(MyIndex) / 256) / (GetPlayerMaxHP(MyIndex) / 256)) * 256[/b]
End If
Exit Sub
End If
' ::::::::::::::::::::::
' :: Player mp packet ::
' ::::::::::::::::::::::
If LCase(Parse(0)) = "playermp" Then
Player(MyIndex).MaxMP = Val(Parse(1))
Call SetPlayerMP(MyIndex, Val(Parse(2)))
If GetPlayerMaxMP(MyIndex) > 0 Then
'frmMainGame.lblMP.Caption = Int(GetPlayerMP(MyIndex) / GetPlayerMaxMP(MyIndex) * 100) & "%"
[b]frmMainGame.PicMP.Width = ((GetPlayerMP(MyIndex) / 256) / (GetPlayerMaxMP(MyIndex) / 256)) * 256[/b]
End If
Exit Sub
End If
Do you see anything in the code that might lead to this? I did the math myself and it works out nice but it's all messed up in the GUI...
Pay no attention to the horrid GUI that is just for test