Mirage Source

Free ORPG making software.
It is currently Sun Apr 28, 2024 12:22 pm

All times are UTC


Forum rules


Make sure your tutorials are kept up to date with the latest MS4 releases.



Post new topic Reply to topic  [ 974 posts ]  Go to page 1, 2, 3, 4, 5 ... 39  Next
Author Message
PostPosted: Fri Sep 26, 2008 1:42 am 
Offline
Regular

Joined: Sat Sep 13, 2008 1:41 am
Posts: 97
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


Top
 Profile  
 
PostPosted: Fri Sep 26, 2008 2:21 am 
Offline
Knowledgeable
User avatar

Joined: Sun Feb 10, 2008 7:40 pm
Posts: 200
Could you post a pic so I can see what it does?

_________________
I is back!


Top
 Profile  
 
PostPosted: Fri Sep 26, 2008 2:57 am 
Offline
Knowledgeable
User avatar

Joined: Sat Jun 09, 2007 3:16 am
Posts: 276
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

_________________
Image
Island of Lost Souls wrote:
Dr. Moreau: Mr. Parker, do you know what it means to feel like God?


Top
 Profile  
 
PostPosted: Fri Sep 26, 2008 9:53 am 
Offline
Regular

Joined: Sat Sep 13, 2008 1:41 am
Posts: 97
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.


Top
 Profile  
 
PostPosted: Fri Sep 26, 2008 9:08 pm 
Offline
Knowledgeable
User avatar

Joined: Sun Feb 10, 2008 7:40 pm
Posts: 200
Thanks for the pic, looks nice.

_________________
I is back!


Top
 Profile  
 
PostPosted: Sat Sep 27, 2008 12:02 am 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
It's a cool idea, but what good is it? I mean... The status bar is in the top right... Anyways, great job.

_________________
Image
GIAKEN wrote:
Since I'm into men, not women

GIAKEN wrote:
I can't take these huge penises anymore! All that's left is shame! And blood


Top
 Profile  
 
PostPosted: Sat Sep 27, 2008 12:08 am 
Offline
Knowledgeable
User avatar

Joined: Sun Feb 10, 2008 7:40 pm
Posts: 200
I want to know hot to change the 100% on the menu to something like 25/25. Anyone know how to do that?

_________________
I is back!


Top
 Profile  
 
PostPosted: Sat Sep 27, 2008 12:11 am 
Offline
Knowledgeable
User avatar

Joined: Wed Jul 26, 2006 11:22 pm
Posts: 143
Location: Virginia, USA
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.


Top
 Profile  
 
PostPosted: Sat Sep 27, 2008 6:05 am 
Offline
Knowledgeable
User avatar

Joined: Sat Jun 09, 2007 3:16 am
Posts: 276
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

_________________
Image
Island of Lost Souls wrote:
Dr. Moreau: Mr. Parker, do you know what it means to feel like God?


Top
 Profile  
 
PostPosted: Sat Sep 27, 2008 5:38 pm 
Offline
Knowledgeable
User avatar

Joined: Sun Feb 10, 2008 7:40 pm
Posts: 200
Thanks! You should make that it's own tut.

_________________
I is back!


Top
 Profile  
 
PostPosted: Wed Dec 01, 2021 8:04 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 490527
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоsemiasphalticflux.ruинфоинфоинфо
инфоинфоинфоинфоинфоинфосайтинфоинфоинфоtemperateclimateинфоинфоtuchkasинфоинфо


Top
 Profile  
 
PostPosted: Thu Dec 30, 2021 1:36 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 490527
Econ


Top
 Profile  
 
PostPosted: Thu Dec 30, 2021 1:37 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 490527
59.8


Top
 Profile  
 
PostPosted: Thu Dec 30, 2021 1:38 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 490527
Bett


Top
 Profile  
 
PostPosted: Thu Dec 30, 2021 1:39 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 490527
Bett


Top
 Profile  
 
PostPosted: Thu Dec 30, 2021 1:40 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 490527
Back


Top
 Profile  
 
PostPosted: Thu Dec 30, 2021 1:41 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 490527
Plan


Top
 Profile  
 
PostPosted: Thu Dec 30, 2021 1:42 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 490527
Stay


Top
 Profile  
 
PostPosted: Thu Dec 30, 2021 1:44 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 490527
Clau


Top
 Profile  
 
PostPosted: Thu Dec 30, 2021 1:45 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 490527
Geor


Top
 Profile  
 
PostPosted: Thu Dec 30, 2021 1:46 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 490527
Back


Top
 Profile  
 
PostPosted: Thu Dec 30, 2021 1:47 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 490527
SOCO


Top
 Profile  
 
PostPosted: Thu Dec 30, 2021 1:48 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 490527
Bibe


Top
 Profile  
 
PostPosted: Thu Dec 30, 2021 1:49 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 490527
Send


Top
 Profile  
 
PostPosted: Thu Dec 30, 2021 1:51 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 490527
Elbr


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 974 posts ]  Go to page 1, 2, 3, 4, 5 ... 39  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 37 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group