Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Instant Messenger
#1
Hello all,
Ok I know right off this is probably in the wrong place as usual, but it'll get moved if it is...

I was working on a instant messenger for MSE but I am unable to get it working...

Ok I 'll give the code I was using and let you guy/girls mess with it and see what comes out for you. Little heads up the txtMyText seems to never send to the txtMyTextBox. I would appreciate if you would post the full code on here when your done.

1. Ok make a window called picPrivateTalk
2. Inside that window make 2 text boxes, name the smaller one txtMyChat
and the bigger one txtMyTextBox.
3. In sub game loop near the top somewhere dim the two textboxes
4. Then type this code >
Code:
' Blit the txt they are putting in
        frmPrivateTalk.txtMyTextBox.Text = MyChat
        If Len(MyText) > 4 Then
        frmPrivateTalk.txtMyTextBox.SelStart = Len(frmPrivateTalk.txtMyTextBox.Text) + 1
        End If
in right under " 'blit the text they are putting in
5. Then in modText add
Code:
Public Sub AddText2(ByVal Msg As String, ByVal Color As Integer)
Dim s As String
  
    s = vbNewLine & Msg
    frmPrivateChat.txtMyChat.SelStart = Len(frmMirage.txtChat.Text)
    frmPrivateChat.txtMyChat.SelColor = QBColor(Color)
    frmPrivateChat.txtMyChat.SelText = s
    frmPrivateChat.txtMyChat.SelStart = Len(frmMirage.txtChat.Text) - 1
End Sub

But yeah I was just wondering if someone could point out whats wrong here, and assist me in fixing it.
Reply
#2
well one problem that i see right off the bat is that there is no packet sent, sending the information from the client to the server, to other people's clients. if that's the main problem you're having just do a quick send data and it to the server, then another packet back. when the packet is recieved just do frmW/e.txtW/e.text = frmw/e.txtw/e.text & *parse(#)

and i know that i don't always give overly clear explanations, but i know if you check the "milestone" source it has an "instant messenger" already installed, it would just need a bit of tweaking, but it might be a good place to look for examples.
Reply
#3
Ok thanks; I was kind of confused; I was using other instant messengers as a example, and none of them were coming out correctly because they were not able to use the same server no matter how many modifacations I made to it. Thanks I'll have a look at that... Does the Esylium Blue (I think it is) have the code in it? I was wondering if someone could tell me if it's possible to make it so you can pick the person you want to talk to, or point me in the right direction.
Reply
#4
I know that all of the elysiums, and konfuze sources should have that chat system built in. i'm not sure if EB was open source so i can't really tell you much in that area, but it worked by doing this...

Player 1 sets his target (by clicking) to player 2
Player 1 hits the "chat" button (just a chat request packet)
Player 2 either accepts or declines the chat.

Instant message is started upon the acceptance of the invitation.
Reply
#5
I'm not exactly sure how that works, but I am unable to get the invitation to send to the other player.
Reply
#6
Ok I got the code for sending and recieving messages correctly. But still having trouble with it, I am unable to get the (target player) and send invite down correctly... I pretty sure that the code won't work correctly when there's two copies of the client running on one computer but that is my only way of testing it currently since none of the people who are willing to test mine so far are smart enough to even install MSE correctly... anyway I was wondering if you could give me some hints on how to make the client (invite) code work correctly for all- and make it so that a message appears showing the name of the player who invited you... been messing with that one for acouple of hours now.

Thank you ahead of time.
Korrey D.
Reply
#7
But right now how I have it is there are 3 buttons on the main interface that, you click the player and it sends an invite... then click one of the other buttons to accept or decline. I'm still working out some bugs, since I'm having inssues with it wanting to send the invite to the first person that you wanted to talk to rather than the one you want to talk with now... it's kinda wierd.
If anyone wants to try and help I'd appreciate it.

Thank you,
Korrey D.
Reply
#8
Just a notice please dont ask for help with elysium here, Sonire is right, it gets kind of nnoying. (i know your orignal topic wasnt pointed to elysium, but your later posts suggested it).


And as for sending to the first person, just make sure you clear all the person related info before allowing them to talk to someone else.
Reply
#9
I wasn't directing it at Elysium, I had come to refrenced my choice off of Elysium's chat system. After a short while I was having trouble with getting the code correct, so I based it off of a code a friend of mine wrote, then took the idea to click the player and invite from Elysium. But I'm working on other ways to send the message and to select the player to whom you wish to send the message. Acouple of my friends and I are trying to figure out how to use the list online to send the invite.
Reply
#10
why don't you just do what i did and made a new window for JUST pm's... and when you get a message it puts it in the PM window instead of the main window (change the handledata stuff for messages).

then make an online-player list/drop-down in the PM window and make a lil chat system in there?

it's easy... even i could make it... wait... i did lol
Reply
#11
The way I found was by: adding the online list for client side, then making it a double click type, and it automatically sends the invite, but I still want it to send a little message pic that says accept and decline.
Reply
#12
Then have a little picture box, with 'Accept' and 'Decline' buttons in it, when the invite is recieved, the box becomes visible, if the 'Accept' button is clicked, then you accept the chat request, if the 'Decline' button is pressed, you don't.

If you ripped it from Elysium, have a quick look in the 'Handlekeypresses' sub... or mod... and find the '/accept' and '/decline' packets.

~Kite
Reply
#13
Well, I'm still figuring it out with some extra's to it, and again "It's only refrenced from Elysium" so please stop saying "If you ripped it" it's kind of annoying. But thanks for the suggestions.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)