Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Show stats in bottem left corner
#1
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
Code:
' draw FPS

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
Reply
#2
Could you post a pic so I can see what it does?
Reply
#3
[Image: 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
Reply
#4
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.
Reply
#5
Thanks for the pic, looks nice.
Reply
#6
It's a cool idea, but what good is it? I mean... The status bar is in the top right... Anyways, great job.
Reply
#7
I want to know hot to change the 100% on the menu to something like 25/25. Anyone know how to do that?
Reply
#8
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.
Reply
#9
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
Reply
#10
Thanks! You should make that it's own tut.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)