[Eclipse Worlds] Chat Drawn to screen

100% Credits to evilbunnie!

DOWNLOAD FIRST!

http://eclipseorigins.com/community/filehost/15ae53c777c9ce5119cbb34e142d89a7.rar

**IMAGE

!

First, open the client and add at the very bottom of “modText”:**


'Evilbunnie's DrawnChat system
Public Sub DrawChat()

' If debug mode, handle error then exit out
    If App.LogMode = 1 And Options.Debug = 1 Then On Error GoTo ErrorHandler

Dim i As Integer
    For i = 1 To 6
        RenderText Font_Default, Chat(i).text, frmMain.picForm.Left + 5, (frmMain.picForm.Top + 555) - (i * 20), White
    Next

Exit Sub

' Error handler
ErrorHandler:
    HandleError "DrawChat", "modText", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear    
End Sub

'Evilbunnie's DrawChat system
Public Sub ReOrderChat(ByVal nText As String, nColor As Long)
Dim i As Integer

    For i = 19 To 1 Step -1
        Chat(i + 1).text = Chat(i).text
        Chat(i + 1).Color = Chat(i).Color
    Next

    Chat(1).text = nText
    Chat(1).Color = nColor
End Sub

Then replace the sub “AddText” with:


Public Sub AddText(ByVal Msg As String, ByVal Color As Integer)
Dim S As String

    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo ErrorHandler

    S = vbNewLine & Msg
    frmMain.txtChat.SelStart = Len(frmMain.txtChat.text)
    frmMain.txtChat.SelColor = QBColor(Color)
    frmMain.txtChat.SelText = S
    frmMain.txtChat.SelStart = Len(frmMain.txtChat.text) - 1

    'Evilbunnie's DrawnChat System
    ReOrderChat Msg, QBColor(Color)

    ' Error handler
    Exit Sub
ErrorHandler:
    HandleError "AddText", "modText", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub

Then in “HandleSayMsg” under:


frmMain.txtChat.SelStart = Len(frmMain.txtChat.Text) - 1

Add:


ReOrderChat Header & Name & ": " & message, Color

Then in “modTypes” under:


Public Options As OptionsRec

Add:


'Evilbunnie's DrawnChat system
Public Chat(1 To 20) As ChatRec

'Evilbunnie's DrawnChat system
Private Type ChatRec
    text As String
    Color As Long
End Type

In Sub “Render_Graphics” above:


' draw fps

Add:


'Evilbunnie's DrawnChat System
DrawChat

**Go to frmMain and delete picChatbox and replace it with the one found in extrafiles.**rar

Replace chatbox.bmp inEclipse Worlds\Client\data files\graphics\gui\main with the file in extrafiles.rar

i get a .txt method or data member not found

i get a .txt method or data member not found

add a Textbox on frmMain and name it txtChat, you baka!

Compiled error : Method or data member not found

Public Sub DrawChat()

’ If debug mode, handle error then exit out
    If App.LogMode = 1 And Options.Debug = 1 Then On Error GoTo ErrorHandler

Dim i As Integer
    For i = 1 To 6
        RenderText Font_Default, Chat(i).text, frmMain.picForm.Left + 5, (frmMain.picForm.Top + 555) - (i * 20), White
    Next

Exit Sub

’ Error handler
ErrorHandler:
    HandleError “DrawChat”, “modText”, Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
End Sub

'Evilbunnie’s DrawChat system
Public Sub ReOrderChat(ByVal nText As String, nColor As Long)
Dim i As Integer

For i = 19 To 1 Step -1
        Chat(i + 1).text = Chat(i).text
        Chat(i + 1).Color = Chat(i).Color
    Next

Chat(1).text = nText
    Chat(1).colour
= nColor
End Sub

replace “Colour” to “Color”

You could give me the frmMain file please?

I get a debug error whenever I run it.

I followed the tutorial 3 times and had the same problem each time.

Looks good for the new members, i made this on Orion Mod. I think you need work on the Split Text because if you write a Long Line this don’t have a line jump.

Log in to reply