Mirage Source
Chat Channels? - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: Chat Channels? (/showthread.php?tid=2518)



Chat Channels? - timster0 - 23-01-2009

How would I set up chat channels? What I need are Global and Battle(the messages that come when your in combat) chat Channels. Similar to how the XW looks. How would this work?


Re: Chat Channels? - wisefire - 23-01-2009

Find "Social packets"
You'll notice all social packets use the same, "Call AddText(Parse(1), Val(Parse(2)))".
Duplicate the sub AddText and change it to Sub AddTextGlobal.
Now create a new textbox on frmMirage called chtGlobal.
Now in your new Sub AddTextGlobal Change, txtChat to, chtGlobal.
Now Back to the Social Packets create a new Case for Global and remove it from the old Case. So you have something that looks like;
Code:
If (LCase(Parse(0)) = "globalmsg") Then
        Call AddTextGlobal(Parse(1), Val(Parse(2)))
        Exit Sub
    End If

Now all you need to do is create a way to set the visibility of each box. So say, create a label named Global Chat, and When you click on it, chtGlobal.visible = true, and so on.

Hopefully this will help. I haven't tested this, But I am almost 100% positive it will work.


Re: Chat Channels? - Tony - 23-01-2009

Why would you need a channel for battle messages? Battle messages aren't going to be broadcasted to anyone but you from the server. There's already battle messages.. o.O


Re: Chat Channels? - Coke - 23-01-2009

To split it away from your chat messages so you can follow conversations easier.


Re: Chat Channels? - Matt - 23-01-2009

Fox Wrote:To split it away from your chat messages so you can follow conversations easier.

Ding ding ding! We have a winner!

Someone, tell him what he wins!


Re: Chat Channels? - Nean - 23-01-2009

[Image: 1_free_internet.jpg]

I believe congratulations are in order.


Re: Chat Channels? - timster0 - 24-01-2009

I tried it and got "Wrong number of arguments or invalid property assignment" and it said the problem was with this:

Code:
Sub HandleGlobalMsg(ByRef Parse() As String)
    Call AddTextGlobal(Parse(1), Val(Parse(2)))
End Sub

Highlighting This Code:
Code:
Call AddTextGlobal



Re: Chat Channels? - wisefire - 24-01-2009

timster0 Wrote:I tried it and got "Wrong number of arguments or invalid property assignment" and it said the problem was with this:

Code:
Sub HandleGlobalMsg(ByRef Parse() As String)
    Call AddTextGlobal(Parse(1), Val(Parse(2)))
End Sub

Highlighting This Code:
Code:
Call AddTextGlobal

Did you create Sub AddTextGlobal?


Re: Chat Channels? - Matt - 24-01-2009

I believe he's either passing too many variables to the sub, or not enough.


Re: Chat Channels? - Tony - 24-01-2009

Matt Wrote:I believe he's either passing too many variables to the sub, or not enough.

Yeah meaning Call Something(ShouldBeSomething, ShouldBeSomething, ShouldBeSomething) or Call Something(ShouldBeSomething)

Give us your AddTextGlobal sub.