Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 05:27

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

Advertisement



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

Discussion on [HELP!!] game socket_connession with VisualBasic.NET!!!! within the Metin2 Private Server forum part of the Metin2 category.

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 = "@SHOWMETHEMONEY.@BLOCK 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
 
Mashkin's Avatar
 
elite*gold: 44
Join Date: May 2010
Posts: 2,053
Received Thanks: 1,747
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 = "@SHOWMETHEMONEY.@BLOCK 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\n@BLOCK_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 M@shkin 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\n@BLOCK_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


Similar Threads Similar Threads
[VisualBasic] Game Spambot Hilfe
05/14/2011 - General Coding - 5 Replies
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 ganz nützlich. Also wenn man Sachen sucht, nimmt man diesen Bot und lässt ihn laufen, zum Beispiel "Suche XY für Level XY PN an mich". Ich habe nirgendwo eine Anleitung gefunden wie ich soetwas selber machen kann, weder auf Youtube oder hier oder per Google. Es gibt immer nur diese "normalen" Spambots für Skype,Editor,MSN etc.. Ich habe aber...
Help in VisualBasic 6..
12/14/2010 - General Coding - 0 Replies
`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 connection of adodb method?
[VisualBasic] Installationsdatei
07/13/2010 - Tutorials - 7 Replies
Hallo com , Ich wollte euch nun meinen Video hier reinsetzten und euch meinen Installationsdatei Tutorial zur verfügung stellen. - Hoffe es gefällt euch! Was hat des fürn Zweck? : - Damit kann man das Selbstprogrammierte *Programme von VisualBasic als Installationsdatei Umwandeln! - Wenn das dann Installiert, kommt dann euer Programm Installiert raus! =) Hier ist mein Tutorial ~
[VisualBasic]Frage
12/02/2009 - General Coding - 6 Replies
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 geht das?
VB (VisualBasic)
07/19/2008 - Metin2 - 5 Replies
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 ne super Idee die nicht Pub gemacht werden soll erstmal. LG BLodas



All times are GMT +2. The time now is 05:27.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.