Mirage Source
http://web.miragesource.net/forums/

Show stats in bottem left corner
http://web.miragesource.net/forums/viewtopic.php?f=183&t=4463
Page 1 of 39

Author:  skillzalot [ Fri Sep 26, 2008 1:42 am ]
Post subject:  Show stats in bottem left corner

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

Author:  timster0 [ Fri Sep 26, 2008 2:21 am ]
Post subject:  Re: Show stats in bottem left corner

Could you post a pic so I can see what it does?

Author:  Egon [ Fri Sep 26, 2008 2:57 am ]
Post subject:  Re: Show stats in bottem left corner

Image

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

Author:  skillzalot [ Fri Sep 26, 2008 9:53 am ]
Post subject:  Re: Show stats in bottem left corner

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.

Author:  timster0 [ Fri Sep 26, 2008 9:08 pm ]
Post subject:  Re: Show stats in bottem left corner

Thanks for the pic, looks nice.

Author:  Nean [ Sat Sep 27, 2008 12:02 am ]
Post subject:  Re: Show stats in bottem left corner

It's a cool idea, but what good is it? I mean... The status bar is in the top right... Anyways, great job.

Author:  timster0 [ Sat Sep 27, 2008 12:08 am ]
Post subject:  Re: Show stats in bottem left corner

I want to know hot to change the 100% on the menu to something like 25/25. Anyone know how to do that?

Author:  Kousaten [ Sat Sep 27, 2008 12:11 am ]
Post subject:  Re: Show stats in bottem left corner

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.

Author:  Egon [ Sat Sep 27, 2008 6:05 am ]
Post subject:  Re: Show stats in bottem left corner

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

Author:  timster0 [ Sat Sep 27, 2008 5:38 pm ]
Post subject:  Re: Show stats in bottem left corner

Thanks! You should make that it's own tut.

Author:  wanai [ Wed Dec 01, 2021 8:04 am ]
Post subject:  Re: Show stats in bottem left corner

инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоsemiasphalticflux.ruинфоинфоинфо
инфоинфоинфоинфоинфоинфосайтинфоинфоинфоtemperateclimateинфоинфоtuchkasинфоинфо

Author:  wanai [ Thu Dec 30, 2021 1:36 am ]
Post subject:  Re: Show stats in bottem left corner

Econ

Author:  wanai [ Thu Dec 30, 2021 1:37 am ]
Post subject:  Re: Show stats in bottem left corner

59.8

Author:  wanai [ Thu Dec 30, 2021 1:38 am ]
Post subject:  Re: Show stats in bottem left corner

Bett

Author:  wanai [ Thu Dec 30, 2021 1:39 am ]
Post subject:  Re: Show stats in bottem left corner

Bett

Author:  wanai [ Thu Dec 30, 2021 1:40 am ]
Post subject:  Re: Show stats in bottem left corner

Back

Author:  wanai [ Thu Dec 30, 2021 1:41 am ]
Post subject:  Re: Show stats in bottem left corner

Plan

Author:  wanai [ Thu Dec 30, 2021 1:42 am ]
Post subject:  Re: Show stats in bottem left corner

Stay

Author:  wanai [ Thu Dec 30, 2021 1:44 am ]
Post subject:  Re: Show stats in bottem left corner

Clau

Author:  wanai [ Thu Dec 30, 2021 1:45 am ]
Post subject:  Re: Show stats in bottem left corner

Geor

Author:  wanai [ Thu Dec 30, 2021 1:46 am ]
Post subject:  Re: Show stats in bottem left corner

Back

Author:  wanai [ Thu Dec 30, 2021 1:47 am ]
Post subject:  Re: Show stats in bottem left corner

SOCO

Author:  wanai [ Thu Dec 30, 2021 1:48 am ]
Post subject:  Re: Show stats in bottem left corner

Bibe

Author:  wanai [ Thu Dec 30, 2021 1:49 am ]
Post subject:  Re: Show stats in bottem left corner

Send

Author:  wanai [ Thu Dec 30, 2021 1:51 am ]
Post subject:  Re: Show stats in bottem left corner

Elbr

Page 1 of 39 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/