Register for your free account! | Forgot your password?

Go Back   elitepvpers > Metin2 > Metin2 PServer - Discussions / Questions
You last visited: Today at 03:31

  • Please register to post and access all features, it's quick, easy and FREE!


[HELP!!] game socket_connession with VisualBasic.NET!!!!

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jun 2011
Posts: 11
Received Thanks: 0
Smile [HELP!!] game socket_connession with VisualBasic.NET!!!!

Hello, i'm trying to connect my software at metin2's server, with socket connection.
But I do not know when i err..
This is the code:
Code:
        Dim query As String = "@[email protected] username 10."
        Dim host As IPAddress = Nothing
        Dim mySock As Socket = Nothing

        Try
            If Not IPAddress.TryParse("5.100.136.100", host) Then
                MessageBox.Show("This IP is not valid")
                Exit Sub
            End If

            Dim ep As IPEndPoint = New IPEndPoint(host, Integer.Parse(30000))
            mySock = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)

            mySock.Connect(ep)

            If mySock.Connected Then

                mySock.Send(Encoding.ASCII.GetBytes(query))

                MsgBox("Sended!")
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
Everything works perfectly, the connection is made, I receive the message "sended", but i have not consequences ingame.

Can you help me?



-Legor- is offline  
Old 02/17/2012, 17:51   #2

 
elite*gold: 44
Join Date: May 2010
Posts: 2,053
Received Thanks: 1,744
Quote:
Originally Posted by -Legor- View Post
Hello, i'm trying to connect my software at metin2's server, with socket connection.
But I do not know when i err..
This is the code:
Code:
        Dim query As String = "@[email protected] username 10."
        Dim host As IPAddress = Nothing
        Dim mySock As Socket = Nothing

        Try
            If Not IPAddress.TryParse("5.100.136.100", host) Then
                MessageBox.Show("This IP is not valid")
                Exit Sub
            End If

            Dim ep As IPEndPoint = New IPEndPoint(host, Integer.Parse(30000))
            mySock = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)

            mySock.Connect(ep)

            If mySock.Connected Then

                mySock.Send(Encoding.ASCII.GetBytes(query))

                MsgBox("Sended!")
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
Everything works perfectly, the connection is made, I receive the message "sended", but i have not consequences ingame.

Can you help me?
Have you checked your query?
I guess there has to be an "newline" character after the two parts of the query.
Also, the command should be "BLOCK_CHAT" rather than "BLOCK".
Code:
@SHOWMETHEMONEY\[email protected]_CHAT charname 10\n
--or--
\0x40SOWMETHEMONEY\0x0A\0x40BLOCK_CHAT charname 10\0x0A
I don't know the correct syntax for VB strings and character escaping but that should be right.


Mashkin is offline  
Old 02/17/2012, 18:43   #3
 
elite*gold: 0
Join Date: Jun 2011
Posts: 11
Received Thanks: 0
Quote:
Originally Posted by [email protected] View Post
Have you checked your query?
I guess there has to be an "newline" character after the two parts of the query.
Also, the command should be "BLOCK_CHAT" rather than "BLOCK".
Code:
@SHOWMETHEMONEY\[email protected]_CHAT charname 10\n
--or--
\0x40SOWMETHEMONEY\0x0A\0x40BLOCK_CHAT charname 10\0x0A
I don't know the correct syntax for VB strings and character escaping but that should be right.
I'm trying.

not seem to work .. But I think the problem is caused by "/ x00" etc.
-Legor- is offline  
Reply



« Special ItemGroup | Vnums | Suche Metin2 P-Server »

Similar Threads
[VisualBasic] Game Spambot Hilfe
Hallo, ich habe mal aus Spaß einen Spambot gemacht. Aber natürlich funktioniert er nicht in einem Online Spiel. Ich dachte zum shoppen wäre der...
5 Replies - General Coding
Help in VisualBasic 6..
`hey im going to make a enrollment system and i want to put a login system with database with adodb. can anyone tell me or teach me for simple...
0 Replies - General Coding
[VisualBasic] Installationsdatei
Hallo com , Ich wollte euch nun meinen Video hier reinsetzten und euch meinen Installationsdatei Tutorial zur verfügung stellen. - Hoffe es gefällt...
7 Replies - Tutorials
[VisualBasic]Frage
Hi, Ich hab ne Frage zu Vb08. Also da gibts doch diesen Befehl: Ich wollte fragen ob man diesen Befehl so machen kann das es an textbox1 sendet...
6 Replies - General Coding
VB (VisualBasic)
Wer von euch kennt sich damit aus? Er solte sich gut damit auskennen und die Programmiersprache C# können. Bsp: c++ Einfach mal hier melden, habe...
5 Replies - Metin2 Main - Discussions / Questions



All times are GMT +2. The time now is 03:31.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.