Results 1 to 9 of 9
  1. #1
    fireXtract's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    In a chair
    Posts
    64
    Reputation
    10
    Thanks
    434
    My Mood
    Amazed

    Connect To TF2 Server

    I need to be able to connect to a team fortress 2 server straight from my idling program im making i have everything else i want in it but i cant think of how to get the one line to work here is my whole code for reference and ill post the problem line after it.
    [SPOILER]
    Code:
    Public Class Form1
        Dim streamer As IO.StreamReader
    
    
        Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
    
        End Sub
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Process.Start("steam://rungameid/440-textmode -nosound -noipx -novid -nopreload -nojoy +volume 0 +connect")
        End Sub
    
        Private Sub AddToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddToolStripMenuItem1.Click
            ListBox1.Items.Add(ToolStripTextBox1.Text)
        End Sub
    
        Private Sub SaveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripMenuItem.Click
            SaveFD.InitialDirectory = "C:\Users\Lucas\Desktop"
            SaveFD.Title = "Save a Text file with servers in IP:PORT format"
            SaveFD.Filter = "Text Files in IP:Port format|*.txt"
            SaveFD.OverwritePrompt = True
            Dim DidWork As Integer = OpenFD.ShowDialog()
            If DidWork = DialogResult.OK Then
                Dim S As New IO.StreamWriter(SaveFD.FileName)
                Dim i As Integer
                For i = 0 To ListBox1.Items.Count - 1
                    S.WriteLine(ListBox1.Items.Item(i))
                Next
                S.Close()
            End If
        End Sub
    
        Private Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenToolStripMenuItem.Click
            OpenFD.InitialDirectory = "C:\Users\Lucas\Desktop"
            OpenFD.Title = "Open a Text file with servers in IP:PORT format"
            OpenFD.Filter = "Text Files in IP:Port format|*.txt"
            Dim DidWork As Integer = OpenFD.ShowDialog()
            If DidWork = DialogResult.OK Then
                ListBox1.Items.Clear()
                Dim R As New IO.StreamReader(OpenFD.FileName)
                Dim str() As String = R.ReadToEnd.Split(vbNewLine)
                ListBox1.Items.AddRange(str)
                R.Close()
            End If
        End Sub
    
        Private Sub ToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem1.Click
            ListBox1.Items.Clear()
        End Sub
    
        Private Sub AboutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutToolStripMenuItem.Click
            MsgBox("Made by fireXtract on 8/25/2012")
        End Sub
    
        Private Sub MultiLoaderToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MultiLoaderToolStripMenuItem.Click
            OpenFD.InitialDirectory = "C:\Users\Lucas\Desktop"
            OpenFD.Title = "Open a Text file with servers in IP:PORT format"
            OpenFD.Filter = "Text Files in IP:Port format|*.txt"
            Dim DidWork As Integer = OpenFD.ShowDialog()
            If DidWork = DialogResult.OK Then
                Dim R As New IO.StreamReader(OpenFD.FileName)
                Dim str() As String = R.ReadToEnd.Split(vbNewLine)
                ListBox1.Items.AddRange(str)
                R.Close()
            End If
        End Sub
    
    End Class
    [/SPOILER]

    Problem lines

    [SPOILER]
    Code:
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Process.Start("steam://rungameid/440-textmode -nosound -noipx -novid -nopreload -nojoy +volume 0 +connect'RIGHT HERE I WANT TO BE ABLE TO SAY WHAT I HAVE SELECTED FROM THE LISTBOX'")
        End Sub
    [/SPOILER]

  2. #2
          ( ° ͜ʖ͡°)╭∩╮
    Former Staff
    MarkHC's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    127.0.0.1
    Posts
    2,750
    Reputation
    66
    Thanks
    14,529
    My Mood
    Angelic
    if you're going to be idle.. why you don't create a own server for it?

    Code:
    -textmode -nosound -noipx -novid -nopreload -nojoy -sw -maxplayers 2 +sv_lan 1 +map "itemtest"


    CoD Minion from 09/19/2012 to 01/10/2013

  3. #3
    fireXtract's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    In a chair
    Posts
    64
    Reputation
    10
    Thanks
    434
    My Mood
    Amazed
    Does it work the same as a achievment idle server, i mean same pickup rates? Also i was thinking it would be less CPU/RAM intensive if you didnt host the server on your own.

  4. #4
          ( ° ͜ʖ͡°)╭∩╮
    Former Staff
    MarkHC's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    127.0.0.1
    Posts
    2,750
    Reputation
    66
    Thanks
    14,529
    My Mood
    Angelic
    I let my computer idling with that almost every night and works pretty fine... usually I got like 5-10 items....

    Anyways, if you have a list box like:

    Ip:Port
    Ip:Port
    ....

    You can get the selected one with ListBox1.SelectedItem.ToString(); I think.. its been a while since a dont mess with .NET tho


    CoD Minion from 09/19/2012 to 01/10/2013

  5. #5
    fireXtract's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    In a chair
    Posts
    64
    Reputation
    10
    Thanks
    434
    My Mood
    Amazed
    I did
    Code:
    Process.Start("steam://rungameid/440-textmode -nosound -noipx -novid -nopreload -nojoy +volume 0 +connect" ListBox1.SelectedItem.ToString())
    And it still didnt join a server and also i noticed its not going into console mode... doesnt -textmode do that? or is it -console

  6. #6
    fireXtract's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    In a chair
    Posts
    64
    Reputation
    10
    Thanks
    434
    My Mood
    Amazed
    Ok well ill go with your server idea but i cant do the itemtest in quotes because it stops the string and ' ' doesnt work either! im confused on how to bypass that.
    EDIT: for anyone who stumbled upon this the answer i found was to do
    Code:
    "steam://rungameid/440-textmode -nosound -noipx -novid -nopreload -nojoy -sw -console -maxplayers 2 +sv_lan 1 +map " & Chr(34) & "itemtest" & Chr(34)
    & Chr(34) is the " in the character map
    Last edited by fireXtract; 08-25-2012 at 09:40 PM.

  7. #7
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    Marked solved.

  8. #8
    fireXtract's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    In a chair
    Posts
    64
    Reputation
    10
    Thanks
    434
    My Mood
    Amazed
    Could anybody test my program for me now or where would i post that and who would need to approve my file?
    i have one virus scan out of 2 just for a check https://www.virustotal.com/file/b5a5...is/1345993787/
    Last edited by fireXtract; 08-26-2012 at 10:14 AM.

  9. #9
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    Quote Originally Posted by fireXtract View Post
    Could anybody test my program for me now or where would i post that and who would need to approve my file?
    i have one virus scan out of 2 just for a check https://www.virustotal.com/file/b5a5...is/1345993787/
    Upload it to MPGH ! Click Go Advanced when writing a reply and click upload attachments at the bottom to attach the file. Then take two virus scans of the same file that you uploaded and link it on the post.

Similar Threads

  1. Why does Combat Arms keep losing connection to the server?!
    By Shamrock in forum Combat Arms Hacks & Cheats
    Replies: 8
    Last Post: 12-30-2008, 03:56 PM
  2. Failed to Connect to Verification Server? :(
    By Offspring316 in forum Combat Arms Hacks & Cheats
    Replies: 21
    Last Post: 11-04-2008, 11:23 AM
  3. "Connection to the server has ended"
    By Drab in forum Combat Arms Hacks & Cheats
    Replies: 1
    Last Post: 10-29-2008, 01:28 AM
  4. Can't Connect to the server
    By Gutobr1234 in forum Combat Arms Hacks & Cheats
    Replies: 13
    Last Post: 10-13-2008, 06:44 PM
  5. Replies: 6
    Last Post: 09-05-2008, 01:16 PM