Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

Advertisement

Hello, visitor! These forums are run off of the revenue generated from these ads. If you'd like to support us, please whitelist us or consider donating:

#1 2017-01-06 21:48:35

ninjasupeatsninja
Member
From: USA (hooray!)
Registered: 2015-04-05
Posts: 1,131
Website

[Release] Batch/C# Hybrid

Hello! I present unto you... uhh... something useless but... neat I guess.

Its a batch file that compiles itself as a C# application, so you can make bots in notepad now.

/*>nul
cls

::Batch Code

@echo off

echo Hello! I am a batch hybrid.

set PATH=%PATH%;;C:\Windows\Microsoft.NET\Framework\v4.0.30319

CSC /t:exe /r:PlayerIOClient.dll /out:bot.exe /o+ /debug- %0

bot.exe
del bot.exe

pause

goto :eof
*/

//C# Code
using System;
using PlayerIOClient;

namespace BatchHybrid {
	class Program {
		public static Connection con;
		
		static void Main(string[] args) {
			Write("Hello World! From a C# Batch Hybrid!", true);
			Write("Email: ", false);
			string email = Input(true);
			Write("Password: ", false);
			string password = Input(true);
			Write("World Id: ", false);
			string worldid = Input(true);
			
			Client c = PlayerIO.QuickConnect.SimpleConnect( "everybody-edits-su9rn58o40itdbnw69plyw", email, password, null );
			con = c.Multiplayer.JoinRoom(worldid, null);
			
			con.OnMessage += con_OnMessage;
			con.Send("init");
			System.Console.ReadKey();
		}
		
		public static void con_OnMessage(object sender, Message e) {
			switch( e.Type ) {
				case "init":
					con.Send("init2");
					break;
				case "init2":
					con.Send("say", "Hello World!");
					break;
			}
		}
		
		static string Input(bool newLine) {
			string ret = System.Console.ReadLine();
			if(newLine) {
				System.Console.WriteLine("");
			}
			return ret;
		}
		
		static void Write(string r, bool newLine) {
			System.Console.Write(r);
			if(newLine) {
				System.Console.WriteLine("");
			}
		}
	}
}

All you need is PlayerIOClient.dll next to the batch file and it works!
So you can make bots in notepad now...

yea i guess it's cool whatever.


Link Explorer | My Website | FDWhXKY.png do not click on fred...

sf.php
cd52b21ab951ce53a7308bd64e9748ef9913a94d.gif
avatar.php
REFRESH FOR A NEW PICTURE EVERY TIME

Offline

Wooted by:

#2 2017-01-06 21:49:27

gp68
Member
From: North-Hessen, Germany
Registered: 2016-04-19
Posts: 704
Website

Re: [Release] Batch/C# Hybrid

ninjasupeatsninja wrote:

Hello! I present unto you... uhh... something useless but... neat I guess.

Its a batch file that compiles itself as a C# application, so you can make bots in notepad now.

/*>nul
cls

::Batch Code

@echo off

echo Hello! I am a batch hybrid.

set PATH=%PATH%;;C:\Windows\Microsoft.NET\Framework\v4.0.30319

CSC /t:exe /r:PlayerIOClient.dll /out:bot.exe /o+ /debug- %0

bot.exe
del bot.exe

pause

goto :eof
*/

//C# Code
using System;
using PlayerIOClient;

namespace BatchHybrid {
	class Program {
		public static Connection con;
		
		static void Main(string[] args) {
			Write("Hello World! From a C# Batch Hybrid!", true);
			Write("Email: ", false);
			string email = Input(true);
			Write("Password: ", false);
			string password = Input(true);
			Write("World Id: ", false);
			string worldid = Input(true);
			
			Client c = PlayerIO.QuickConnect.SimpleConnect( "everybody-edits-su9rn58o40itdbnw69plyw", email, password, null );
			con = c.Multiplayer.JoinRoom(worldid, null);
			
			con.OnMessage += con_OnMessage;
			con.Send("init");
			System.Console.ReadKey();
		}
		
		public static void con_OnMessage(object sender, Message e) {
			switch( e.Type ) {
				case "init":
					con.Send("init2");
					break;
				case "init2":
					con.Send("say", "Hello World!");
					break;
			}
		}
		
		static string Input(bool newLine) {
			string ret = System.Console.ReadLine();
			if(newLine) {
				System.Console.WriteLine("");
			}
			return ret;
		}
		
		static void Write(string r, bool newLine) {
			System.Console.Write(r);
			if(newLine) {
				System.Console.WriteLine("");
			}
		}
	}
}

All you need is PlayerIOClient.dll next to the batch file and it works!
So you can make bots in notepad now...

yea i guess it's cool whatever.

notepad or notepad++?


0--20--50--100---200---300---400---500---600---700---800---900---1000
unknown.pngunknown.pngunknown.pngunknown.pngfn3wmq.png
WebGL just ruinied games
2015 - Demod Bleed
2016 - Demod speedstrike

2017 - Demod Hummerz5

Offline

#3 2017-01-06 21:50:02

HG
Member
From: PWA0gEDooycEI
Registered: 2015-02-18
Posts: 1,039
Website

Re: [Release] Batch/C# Hybrid

Yes, all what you need is PlayerIOClient.dll and CSC and mscorlib.dll and all the other libraries for .NET Framework to work.


Check out The Tower Remastered, the best limited-time challenge world by HG Crew, NOW WITH A GAME-PLAY VIDEO!

Offline

#4 2017-01-06 21:50:54

ninjasupeatsninja
Member
From: USA (hooray!)
Registered: 2015-04-05
Posts: 1,131
Website

Re: [Release] Batch/C# Hybrid

gp68 wrote:

notepad or notepad++?

either one will do

HG wrote:

Yes, all what you need is PlayerIOClient.dll and CSC and mscorlib.dll and all the other libraries for .NET Framework to work.

tongue smile


Link Explorer | My Website | FDWhXKY.png do not click on fred...

sf.php
cd52b21ab951ce53a7308bd64e9748ef9913a94d.gif
avatar.php
REFRESH FOR A NEW PICTURE EVERY TIME

Offline

Wooted by:

#5 2017-01-06 21:52:18

gp68
Member
From: North-Hessen, Germany
Registered: 2016-04-19
Posts: 704
Website

Re: [Release] Batch/C# Hybrid

ninjasupeatsninja wrote:
gp68 wrote:

notepad or notepad++?

either one will do

HG wrote:

Yes, all what you need is PlayerIOClient.dll and CSC and mscorlib.dll and all the other libraries for .NET Framework to work.

tongue smile

ok, ninjasupeatsninja, thx for the info

Last edited by gp68 (2017-01-06 21:52:48)


0--20--50--100---200---300---400---500---600---700---800---900---1000
unknown.pngunknown.pngunknown.pngunknown.pngfn3wmq.png
WebGL just ruinied games
2015 - Demod Bleed
2016 - Demod speedstrike

2017 - Demod Hummerz5

Offline

#6 2017-01-06 21:53:17

HG
Member
From: PWA0gEDooycEI
Registered: 2015-02-18
Posts: 1,039
Website

Re: [Release] Batch/C# Hybrid

@gp68 What about Atom?

Last edited by HG (2017-01-06 21:53:24)


Check out The Tower Remastered, the best limited-time challenge world by HG Crew, NOW WITH A GAME-PLAY VIDEO!

Offline

#7 2017-01-06 21:56:28

gp68
Member
From: North-Hessen, Germany
Registered: 2016-04-19
Posts: 704
Website

Re: [Release] Batch/C# Hybrid

HG wrote:

@gp68 What about Atom?

idk what this is and i can't install it tongue


0--20--50--100---200---300---400---500---600---700---800---900---1000
unknown.pngunknown.pngunknown.pngunknown.pngfn3wmq.png
WebGL just ruinied games
2015 - Demod Bleed
2016 - Demod speedstrike

2017 - Demod Hummerz5

Offline

#8 2017-01-06 23:19:37

Swarth100
Formerly: Spinastar
Registered: 2015-07-18
Posts: 264

Re: [Release] Batch/C# Hybrid

gp68 wrote:
HG wrote:

@gp68 What about Atom?

idk what this is and i can't install it tongue

Atom is a very good IDE, strongly recommended due to the massive in-built support of github plug-ins for the various languages.

EDIT: Recommended for the less-used languages (I used it for Haskell and GoLang), if you wanna go with mainstream Python, Java or C, there might be IDEs with a lot more functionalities around.

Last edited by Swarth100 (2017-01-06 23:21:01)


fsR7puc.png

Offline

Wooted by:

HG

#9 2017-01-06 23:22:09

HG
Member
From: PWA0gEDooycEI
Registered: 2015-02-18
Posts: 1,039
Website

Re: [Release] Batch/C# Hybrid

Swarth100 wrote:
gp68 wrote:
HG wrote:

@gp68 What about Atom?

idk what this is and i can't install it tongue

Atom is a very good IDE, strongly recommended due to the massive in-built support of github plug-ins for the various languages.

EDIT: Recommended for the less-used languages (I used it for Haskell and GoLang), if you wanna go with mainstream Python, Java or C, there might be IDEs with a lot more functionalities around.

Atom is a text editor, not a solution manager.


Check out The Tower Remastered, the best limited-time challenge world by HG Crew, NOW WITH A GAME-PLAY VIDEO!

Offline

#10 2017-01-06 23:27:42

hummerz5
Forum Mod
From: wait I'm not a secret mod huh
Registered: 2015-08-10
Posts: 3,845

Re: [Release] Batch/C# Hybrid

HG wrote:

Yes, all what you need is PlayerIOClient.dll and CSC and mscorlib.dll and all the other libraries for .NET Framework to work.

yeah so let's be objective and less "boo this is another" for a moment

what do we actually gain through this method over other things? i.e., is the tradeoff ninja suggests simply the VS suite for mscorlib and CSC? I mean, PIOC.DLL and the .NET framework are already required under normal sistuations

so disregarding whether or not that's actually useful, is that what we're facing?


fT09tOL.png
rip the creator of this sig, zoey

Offline

Wooted by:

HG

#11 2017-01-06 23:40:58

ninjasupeatsninja
Member
From: USA (hooray!)
Registered: 2015-04-05
Posts: 1,131
Website

Re: [Release] Batch/C# Hybrid

hummerz5 wrote:
HG wrote:

Yes, all what you need is PlayerIOClient.dll and CSC and mscorlib.dll and all the other libraries for .NET Framework to work.

yeah so let's be objective and less "boo this is another" for a moment

what do we actually gain through this method over other things? i.e., is the tradeoff ninja suggests simply the VS suite for mscorlib and CSC? I mean, PIOC.DLL and the .NET framework are already required under normal sistuations

so disregarding whether or not that's actually useful, is that what we're facing?

1-
hummerz pls
pls
every 1 of my topics has a debate shh pls no

2-
im just making it so people can make a bot in a plain text editor
give or take the different directory structure of everyone's computer.

pls no judge ;-;


Link Explorer | My Website | FDWhXKY.png do not click on fred...

sf.php
cd52b21ab951ce53a7308bd64e9748ef9913a94d.gif
avatar.php
REFRESH FOR A NEW PICTURE EVERY TIME

Offline

#12 2017-01-06 23:47:53

Swarth100
Formerly: Spinastar
Registered: 2015-07-18
Posts: 264

Re: [Release] Batch/C# Hybrid

HG wrote:
Swarth100 wrote:
gp68 wrote:
HG wrote:

@gp68 What about Atom?

idk what this is and i can't install it tongue

Atom is a very good IDE, strongly recommended due to the massive in-built support of github plug-ins for the various languages.

EDIT: Recommended for the less-used languages (I used it for Haskell and GoLang), if you wanna go with mainstream Python, Java or C, there might be IDEs with a lot more functionalities around.

Atom is a text editor, not a solution manager.

Let me taste the spice through the keyboard.

Yup.

It worked.


fsR7puc.png

Offline

Wooted by:

HG

#13 2017-01-06 23:56:37

SmittyW
Member
Registered: 2015-03-13
Posts: 1,866

Re: [Release] Batch/C# Hybrid

ninjasupeatsninja wrote:

1-
hummerz pls
pls
every 1 of my topics has a debate shh pls no

2-
im just making it so people can make a bot in a plain text editor
give or take the different directory structure of everyone's computer.

pls no judge ;-;

If you're going to keep posting topics you should be susceptible to criticism. We only improve because of people who say "hey, this isn't good enough" or "we could do better". This is a forum for discussing topics. If you only want to link your creations then get your own repo or something.

Offline

Wooted by:

#14 2017-01-07 00:24:22

destroyer123
Member
Registered: 2016-06-03
Posts: 29

Re: [Release] Batch/C# Hybrid

ninjasupeatsninja wrote:

so you can make bots in notepad now.

You always could make a bot in notepad, just you'd need to have a way to compile it. I used this sort of idea a while ago (although implemented differently) for my minigame bot (that I didnt have enough time to properly complete, so it never really took off)

I guess this would be useful though, for those who dont want / can't get VS for some reason, and dont know how to use the command prompt themselves. Also I'd compile to the same directory as the file, and put the delete at the start instead, so this acts as a simple way to compile, that you can run when you make a change to the code, unless there was a reason for putting it at the end. (As you seem to be worried about efficiency, I'm not sure compiling a bot every time you run it is a good idea)

Last edited by destroyer123 (2017-01-07 00:26:47)

Offline

#15 2017-01-07 00:39:57

hummerz5
Forum Mod
From: wait I'm not a secret mod huh
Registered: 2015-08-10
Posts: 3,845

Re: [Release] Batch/C# Hybrid

so csc is already the thing that does the thing, this batch just automates the CSC.exe call?

can someone answer this?

hummerz5 wrote:
HG wrote:

Yes, all what you need is PlayerIOClient.dll and CSC and mscorlib.dll and all the other libraries for .NET Framework to work.

yeah so let's be objective and less "boo this is another" for a moment

what do we actually gain through this method over other things? i.e., is the tradeoff ninja suggests simply the VS suite for mscorlib and CSC? I mean, PIOC.DLL and the .NET framework are already required under normal sistuations

so disregarding whether or not that's actually useful, is that what we're facing?

if anything, ninja, you should be considering this question instead of assuming I just want to write you off.

Doesn't CSC come with VS, not just the regular OS? Therefore, you should mention the need to bundle CSC or whatever the answer to my question is so that people know what's up if they do choose to use your setup.

edit: OP apparently decided to lock the thread. peculiar move, I'm genuinely interested in the discussion

Last edited by hummerz5 (2017-01-07 01:42:56)


fT09tOL.png
rip the creator of this sig, zoey

Offline

Wooted by:

HG

hummerz51483745997642210

Board footer

Powered by FluxBB

[ Started around 1485197847.1963 - Generated in 0.133 seconds, 12 queries executed - Memory usage: 1.28 MiB (Peak: 1.49 MiB) ]