Show stats in bottem left corner - skillzalot - 26-09-2008
This is an updated version of Egons script to work in MS3.54. It's the one i use. To display you type / show and type / show and it goes away
Client side
First find
Code: ' Checking fps
Case "/fps"
BFPS = Not BFPS
Under add
Code: ' Show stats
Case "/show"
Show = Not Show
Next find
Code: Public BFPS As Boolean
Public BLoc As Boolean
Under add
Code: ' Puts your stats on screen
Public Show As Boolean
Find
Code: Dim rec_pos As DXVBLib.RECT
Under add
Code: Dim HP As String, MP As String, SP As String
Find
Under add
Code: ' draw Stats
If Show Then
HP = (GetPlayerVital(MyIndex, Vitals.HP) / GetPlayerMaxVital(MyIndex, Vitals.HP) * 100) & "%"
MP = (GetPlayerVital(MyIndex, Vitals.MP) / GetPlayerMaxVital(MyIndex, Vitals.MP) * 100) & "%"
SP = (GetPlayerVital(MyIndex, Vitals.SP) / GetPlayerMaxVital(MyIndex, Vitals.SP) * 100) & "%"
Call DrawText(TexthDC, (MAX_MAPY - 11) * PIC_Y, 350, Trim$("HP: " & HP), QBColor(Yellow))
Call DrawText(TexthDC, (MAX_MAPY - 11) * PIC_Y, 360, Trim$("MP: " & MP), QBColor(Yellow))
Call DrawText(TexthDC, (MAX_MAPY - 11) * PIC_Y, 370, Trim$("SP: " & SP), QBColor(Yellow))
End If
Credits go to Egon for base script and if you want to me for updating. Just so you know this is my most advanced script yet
Re: Show stats in bottem left corner - timster0 - 26-09-2008
Could you post a pic so I can see what it does?
Re: Show stats in bottem left corner - Egon - 26-09-2008
![[Image: secondwayuc4.png]](http://img389.imageshack.us/img389/2878/secondwayuc4.png)
Also, if you don't like percents (HP: 100%) and like to see the real numbers (HP: 25/25), replace:
Code: ' draw Stats
If Show Then
HP = (GetPlayerVital(MyIndex, Vitals.HP) / GetPlayerMaxVital(MyIndex, Vitals.HP) * 100) & "%"
MP = (GetPlayerVital(MyIndex, Vitals.MP) / GetPlayerMaxVital(MyIndex, Vitals.MP) * 100) & "%"
SP = (GetPlayerVital(MyIndex, Vitals.SP) / GetPlayerMaxVital(MyIndex, Vitals.SP) * 100) & "%"
Call DrawText(TexthDC, (MAX_MAPY - 11) * PIC_Y, 350, Trim$("HP: " & HP), QBColor(Yellow))
Call DrawText(TexthDC, (MAX_MAPY - 11) * PIC_Y, 360, Trim$("MP: " & MP), QBColor(Yellow))
Call DrawText(TexthDC, (MAX_MAPY - 11) * PIC_Y, 370, Trim$("SP: " & SP), QBColor(Yellow))
End If
With:
Code: ' draw Stats
If Show Then
HP = (GetPlayerVital(MyIndex, Vitals.HP) & "/" & (GetPlayerMaxVital(MyIndex, Vitals.HP)
MP = (GetPlayerVital(MyIndex, Vitals.MP) & "/" & (GetPlayerMaxVital(MyIndex, Vitals.MP)
SP = (GetPlayerVital(MyIndex, Vitals.SP) & "/" & (GetPlayerMaxVital(MyIndex, Vitals.SP)
Call DrawText(TexthDC, (MAX_MAPY - 11) * PIC_Y, 350, Trim$("HP: " & HP), QBColor(Yellow))
Call DrawText(TexthDC, (MAX_MAPY - 11) * PIC_Y, 360, Trim$("MP: " & MP), QBColor(Yellow))
Call DrawText(TexthDC, (MAX_MAPY - 11) * PIC_Y, 370, Trim$("SP: " & SP), QBColor(Yellow))
End If
Re: Show stats in bottem left corner - skillzalot - 26-09-2008
Thanks for the pic Egon. Just so you know this is my first conversion and it went extremely well. Just so you know im a noob at programming.
Re: Show stats in bottem left corner - timster0 - 26-09-2008
Thanks for the pic, looks nice.
Re: Show stats in bottem left corner - Nean - 27-09-2008
It's a cool idea, but what good is it? I mean... The status bar is in the top right... Anyways, great job.
Re: Show stats in bottem left corner - timster0 - 27-09-2008
I want to know hot to change the 100% on the menu to something like 25/25. Anyone know how to do that?
Re: Show stats in bottem left corner - Kousaten - 27-09-2008
Egon Wrote:Also, if you don't like percents (HP: 100%) and like to see the real numbers (HP: 25/25), replace:
Code: ' draw Stats
If Show Then
HP = (GetPlayerVital(MyIndex, Vitals.HP) / GetPlayerMaxVital(MyIndex, Vitals.HP) * 100) & "%"
MP = (GetPlayerVital(MyIndex, Vitals.MP) / GetPlayerMaxVital(MyIndex, Vitals.MP) * 100) & "%"
SP = (GetPlayerVital(MyIndex, Vitals.SP) / GetPlayerMaxVital(MyIndex, Vitals.SP) * 100) & "%"
Call DrawText(TexthDC, (MAX_MAPY - 11) * PIC_Y, 350, Trim$("HP: " & HP), QBColor(Yellow))
Call DrawText(TexthDC, (MAX_MAPY - 11) * PIC_Y, 360, Trim$("MP: " & MP), QBColor(Yellow))
Call DrawText(TexthDC, (MAX_MAPY - 11) * PIC_Y, 370, Trim$("SP: " & SP), QBColor(Yellow))
End If
With:
Code: ' draw Stats
If Show Then
HP = (GetPlayerVital(MyIndex, Vitals.HP) & "/" & (GetPlayerMaxVital(MyIndex, Vitals.HP)
MP = (GetPlayerVital(MyIndex, Vitals.MP) & "/" & (GetPlayerMaxVital(MyIndex, Vitals.MP)
SP = (GetPlayerVital(MyIndex, Vitals.SP) & "/" & (GetPlayerMaxVital(MyIndex, Vitals.SP)
Call DrawText(TexthDC, (MAX_MAPY - 11) * PIC_Y, 350, Trim$("HP: " & HP), QBColor(Yellow))
Call DrawText(TexthDC, (MAX_MAPY - 11) * PIC_Y, 360, Trim$("MP: " & MP), QBColor(Yellow))
Call DrawText(TexthDC, (MAX_MAPY - 11) * PIC_Y, 370, Trim$("SP: " & SP), QBColor(Yellow))
End If
Similar to this.
Re: Show stats in bottem left corner - Egon - 27-09-2008
timster0 Wrote:I want to know hot to change the 100% on the menu to something like 25/25. Anyone know how to do that?
Client Side:
In modHandleData screach for Sub HandlePlayerHp(ByRef Parse() As String)
Replace the whole sub with:
Code: ' ::::::::::::::::::::::
' :: Player hp packet ::
' ::::::::::::::::::::::
Sub HandlePlayerHp(ByRef Parse() As String)
Player(MyIndex).MaxHP = CLng(Parse(1))
Call SetPlayerVital(MyIndex, Vitals.HP, CLng(Parse(2)))
If GetPlayerMaxVital(MyIndex, Vitals.HP) > 0 Then
'frmMirage.lblHP.Caption = Int(GetPlayerVital(MyIndex, Vitals.HP) / GetPlayerMaxVital(MyIndex, Vitals.HP) * 100) & "%"
frmMirage.lblHP.Caption = Int(GetPlayerVital(MyIndex, Vitals.HP)) & "/" & Int(GetPlayerMaxVital(MyIndex, Vitals.HP))
End If
End Sub
screach for Sub HandlePlayerMp(ByRef Parse() As String)
Replace the whole sub with:
Code: ' ::::::::::::::::::::::
' :: Player mp packet ::
' ::::::::::::::::::::::
Sub HandlePlayerMp(ByRef Parse() As String)
Player(MyIndex).MaxMP = CLng(Parse(1))
Call SetPlayerVital(MyIndex, Vitals.MP, CLng(Parse(2)))
If GetPlayerMaxVital(MyIndex, Vitals.MP) > 0 Then
'frmMirage.lblMP.Caption = Int(GetPlayerVital(MyIndex, Vitals.MP) / GetPlayerMaxVital(MyIndex, Vitals.MP) * 100) & "%"
frmMirage.lblMP.Caption = Int(GetPlayerVital(MyIndex, Vitals.MP)) & "/" & Int(GetPlayerMaxVital(MyIndex, Vitals.MP))
End If
End Sub
screach for Sub HandlePlayerSp(ByRef Parse() As String)
Replace the whole sub with:
Code: ' ::::::::::::::::::::::
' :: Player sp packet ::
' ::::::::::::::::::::::
Sub HandlePlayerSp(ByRef Parse() As String)
Player(MyIndex).MaxSP = CLng(Parse(1))
Call SetPlayerVital(MyIndex, Vitals.SP, CLng(Parse(2)))
If GetPlayerMaxVital(MyIndex, Vitals.SP) > 0 Then
'frmMirage.lblSP.Caption = Int(GetPlayerVital(MyIndex, Vitals.SP) / GetPlayerMaxVital(MyIndex, Vitals.SP) * 100) & "%"
frmMirage.lblSP.Caption = Int(GetPlayerVital(MyIndex, Vitals.SP)) & "/" & Int(GetPlayerMaxVital(MyIndex, Vitals.SP))
End If
End Sub
Re: Show stats in bottem left corner - timster0 - 27-09-2008
Thanks! You should make that it's own tut.
|