Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO] Chat on picScreen


telewizor
 Share

Recommended Posts

This tutorial isint working. I tried it out, sorted out all the errors, they were msotly because i wasent defined. But other than not being able to find For i = 1 To MAX_BYTE        Call BltActionMsg(i)    Next i Everythign seemed fine. But in the end it did not work.
Link to comment
Share on other sites

@Hdom:

> This tutorial isint working. I tried it out, sorted out all the errors, they were msotly because i wasent defined. But other than not being able to find For i = 1 To MAX_BYTE        Call BltActionMsg(i)    Next i Everythign seemed fine. But in the end it did not work.

**LRN2SEARCH**.
Ctrl+f and then click 'Current Project'
Link to comment
Share on other sites

@Captain:

> **LRN2SEARCH**.
> Ctrl+f and then click 'Current Project'

Its not there dont you think i already tried this, i woulnt post if i didnt try that,i know how to search, it's so basic… man use your brain for once in your life, if you woudl have bothered to read even one more post of this thread you would have know that otehr peopel are also having trouble with this tutorial. Ive looked it up i even went an extra step and searched the whole modDirectDraw7 manually, only line that even remotely resembles that line is```
For i = 1 To Action_HighIndex
        Call BltActionMsg(i)
    Next i
```Which is clearly not the same as whats posted on the tutorial.
```
For i = 1 To MAX_BYTE        Call BltActionMsg(i)    Next i
```So im guessing its a different version of EO. All im saying is that this dosent work for EO 2.0 The version i used.

I also followed the tutorial by placing the code above that line instead of the lines that were provided and it still did not work.

So how about you dont waste my time and either help figure out how to do it in EO 2 or dont post.
Link to comment
Share on other sites

Fixed tutorial.

This is what is will look like in the end…
http://www.freemmorpgmaker.com/files/imagehost/pics/b8c6ecbd22059c902e02870e780e52c4.png

NOTE: Most of this work is telewizor's however his was not completely in English, had bad code references, and overall, in a clean version of EO, would have been drawing the text OFF the screen.

I PERSONALLY do not recommend using this or even trying it without SOME vb6 knowledge. If you reference the screenshot all this does is draw the text to the screen but DOES NOT remove the chatbox which, if removed will create a lot of errors. (Hence the need for some background knowledge to know what to delete or fix)

So let's start:

Add new variables in modGlobals:
```
Public LineText(0 To 4) As String
Public LineColor(0 To 4) As Long
```
In mod DirectDraw7 **AFTER**:
```
    For i = 1 To Action_HighIndex
        Call BltActionMsg(i)
    Next i
```
Add:
```
    For i = 0 To 4
        Call DrawChat(i)
    Next i
```
In modText add this sub.
```
Public Sub DrawChat(ByVal i As Byte)
Dim x, y As Long
x = Camera.Left + 4
y = Camera.top + (frmMain.picScreen.height - 90) + (i * 15)
    Call DrawText(TexthDC, x, y, LineText(i), LineColor(i))
End Sub
```
Next, find **Public Sub AddText** and in this Sub,
Find
```
Dim S As String
```
Replace it with
```
Dim S As String, i as long
```
Find:
```
    frmMainGame.txtChat.SelStart = Len(frmMainGame.txtChat.text) - 1
```
Add this under it:
```
    For i = 0 To 4
        If LineText(i) = "" Then
            LineText(i) = Msg
            LineColor(i) = QBColor(color)
            i = 4
        Else
            If i = 4 Then
                LineText(0) = LineText(1)
                LineColor(0) = LineColor(1)
                LineText(1) = LineText(2)
                LineColor(1) = LineColor(2)
                LineText(2) = LineText(3)
                LineColor(2) = LineColor(3)
                LineText(3) = LineText(4)
                LineColor(3) = LineColor(4)
                LineText(4) = Msg
                LineColor(4) = QBColor(color)
            End If
        End If
    Next
```
Next, in modHandleData, find **Private Sub HandleSayMsg**:
Find:
```
Dim saycolour As Long
```
Replace with
```
Dim saycolour As Long, i as long
```

**frmMainGame.txtChat.SelStart = Len(frmMainGame.txtChat.text) - 1**
Add:
```
For i = 0 To 4
        If LineText(i) = "" Then
            LineText(i) = vbNewLine & Header & Name & ": " & message
            LineColor(i) = colour
            i = 4
        Else
            If i = 4 Then
                LineText(0) = LineText(1)
                LineColor(0) = LineColor(1)
                LineText(1) = LineText(2)
                LineColor(1) = LineColor(2)
                LineText(2) = LineText(3)
                LineColor(2) = LineColor(3)
                LineText(3) = LineText(4)
                LineColor(3) = LineColor(4)
                LineText(4) = vbNewLine & Header & Name & ": " & message
                LineColor(4) = colour
            End If
        End If
    Next
```
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...