Register for your free account! | Forgot your password?

You last visited: Today at 12:00

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

Advertisement



c# LF help

Discussion on c# LF help within the Rappelz Private Server forum part of the Rappelz category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2014
Posts: 13
Received Thanks: 2
c# LF help

Hello guys hope u r all fine
first i'm not professional in c# i used to make some programs that help me in dev only , as a way to reduce time
PS : i'm lazy

i tried to make a bat laucher.exe that save the name of sframe and argument and send the argument to the sframe to start the game as away to stop editing the *.txt files " simple one "

now i'm looking for a way to make the program send codes to the gameserver or to Auth as Hawasman @ made one "" but i think he didn't make it in c# ""
Ps : codes like (start_service / #refresh("script") ....etc)

BTW if anyone can help i want to contact with him/her or u can contact with me faster from here
Ty all for reading ♥ ♥
moddypepo is offline  
Old 06/03/2018, 04:04   #2
 
Dark Blaze's Avatar
 
elite*gold: 0
Join Date: Mar 2016
Posts: 297
Received Thanks: 89
Connect to the game server console and send the commands.
Dark Blaze is offline  
Thanks
1 User
Old 06/05/2018, 15:34   #3
 
elite*gold: 0
Join Date: Mar 2014
Posts: 13
Received Thanks: 2
Quote:
Originally Posted by Dark Blaze View Post
Connect to the game server console and send the commands.
Can u help with the code plz ?
moddypepo is offline  
Old 06/05/2018, 19:47   #4
 
Dark Blaze's Avatar
 
elite*gold: 0
Join Date: Mar 2016
Posts: 297
Received Thanks: 89
What do you need help with?
Dark Blaze is offline  
Old 06/05/2018, 21:26   #5
 
elite*gold: 36
Join Date: Oct 2014
Posts: 13
Received Thanks: 4
This is Example Console C# class for console connect and send commands.

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.IO;
using System.Threading;

namespace ConsoleExampletool{
    class Client{

        StreamReader input = null;

        public Client(StreamReader input){
            this.input = input;
        }

        public void Run(){
            String line;
            while ((line=input.ReadLine())!=null){
                Console.Write(line+"\r\n");
           

            }
        }
     

        static void Main(string[] args){
            Console.Title = "EC Tool";
            Console.ForegroundColor = ConsoleColor.Blue;
            Console.WindowWidth = (Console.LargestWindowWidth * 6 / 10);
            Console.WindowHeight = (Console.LargestWindowHeight * 8 / 10);
       

            Console.Write("\r\n");
            Console.Write("                          ...::::EXample Console::::...");
          
        
            Console.Write("*-history -->To get commands history.");
            Console.Write("\r\n");
            Console.Write("*-set --> to set a new value.");
            Console.Write("\r\n");
            Console.Write("*-getcwd -->to get the working dir.");
            Console.Write("\r\n");
            Console.Write("*-list --> to get the operation list.");
            Console.Write("\r\n");

                Console.Write("Server IP: ");
                string host=Console.ReadLine();
                Console.Write("Port: ");
                int port;
                try{
                    port=int.Parse(Console.ReadLine());
                }
                catch(Exception){
                    Console.WriteLine("Wrong parameter. Using 4502 instead");
                    port=4515;
                }
                TcpClient socket=null;
                try{
                    socket = new TcpClient(host, port);
                }
                catch(SocketException){
                    Console.WriteLine("Unknown host - " + host + ". Quitting");
                    Console.ReadKey();
                    Environment.Exit(0);
                }
                NetworkStream stream = socket.GetStream();
                StreamWriter output = new StreamWriter(stream);
                StreamReader input = new StreamReader(stream);

                Client cliobj = new Client(input);
                Thread t = new Thread(new ThreadStart(cliobj.Run));
                t.Start();

                while(true){
                    output.Write(Console.ReadLine()+"\r\n");
                    output.Flush();
                }
        }

        public static string line { get; set; }

        public static string text { get; set; }

        public static object Write { get; set; }
    }
}
DARK-REVO is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[HELP]HELP HELP HELP[HELP]
09/23/2013 - Facebook - 3 Replies
GUYS ^^ THIS IS A HELP THREAD NOT REQUEST THREAD BUT YOU CAN CONSIDER IT AS REQUEST THREAD DOES ANYONE OF YOU KNOW THE AUTO SUBMIT PHP CODE? THANKS!
[HELP][HELP][HELP][HELP]!!
09/11/2009 - Soldier Front - 3 Replies
Microsoft Visual C++ Run time error! :(:( **HELP ME PLEASE!!***
help help help help help help
06/28/2009 - Say Hello - 0 Replies
how i can dowmload Mangos 6385 ??????????????????????????????????? please give me the limk i can't see that i know it is in www.elitepvpers.com/.../153716-release-mangos-relea ses-blackscorpian-win32-2-4-3-a.html - but give me link sent it to my email plz



All times are GMT +1. The time now is 12:01.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.