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,303

[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
My First Account, boy I'm old.
Registered-December%2030,%202010-blue.png?style=flat
14392495e4a0.png

Offline

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

Mysterion
Member
From: Darkness
Registered: 2016-04-19
Posts: 1,197

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++?


0koussU.pngThanks to DarkComet for this smiley<3 0koussU.png
qDhr3T.gif
Posts: 0 ▎ 100 ▎ 200 ▎ 300 ▎ 400 ▎ 500 ▎ 600 ▎ 700 ▎ 800 ▎ 900 ▎ 1000 ▎ 1100 ▎ 1200 ▎ 1300 ▎ 1400 ▎ 1500 ▎ 1600 ▎ 1700 ▎ 1800 ▎ 1900 ▎ 2000 ▎ ...
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒░░░░
Graphic%20Card-NVIDIA%20GeForce%20GTX%20950M%20with%202GB%20Dedicated%20VRAM-76b900.svgRAM-8GB%20DDR4%20Memory-099FFF.svgProcessor-Intel%20Core%20i5--7200U-0062FF.svg
Damns: 0€ ▎ 50€ ▎ 100€ ▎ 150€ ▎ 200€ ▎ 250€ ▎ 300€ ▎ 350€ ▎ 400€ ▎ 450€ ▎ 500€ ▎ 550€ ▎ ...
?type=online&name=Mysterion?type=energy&name=Mysterion?type=registered&name=Mysterion
Mysterion.jpg ckmGBi.png

Online

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

HG
Member
Registered: 2015-02-18
Posts: 1,253
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.

Offline

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

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

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
My First Account, boy I'm old.
Registered-December%2030,%202010-blue.png?style=flat
14392495e4a0.png

Offline

Wooted by:

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

Mysterion
Member
From: Darkness
Registered: 2016-04-19
Posts: 1,197

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 Mysterion (2017-01-06 21:52:48)


0koussU.pngThanks to DarkComet for this smiley<3 0koussU.png
qDhr3T.gif
Posts: 0 ▎ 100 ▎ 200 ▎ 300 ▎ 400 ▎ 500 ▎ 600 ▎ 700 ▎ 800 ▎ 900 ▎ 1000 ▎ 1100 ▎ 1200 ▎ 1300 ▎ 1400 ▎ 1500 ▎ 1600 ▎ 1700 ▎ 1800 ▎ 1900 ▎ 2000 ▎ ...
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒░░░░
Graphic%20Card-NVIDIA%20GeForce%20GTX%20950M%20with%202GB%20Dedicated%20VRAM-76b900.svgRAM-8GB%20DDR4%20Memory-099FFF.svgProcessor-Intel%20Core%20i5--7200U-0062FF.svg
Damns: 0€ ▎ 50€ ▎ 100€ ▎ 150€ ▎ 200€ ▎ 250€ ▎ 300€ ▎ 350€ ▎ 400€ ▎ 450€ ▎ 500€ ▎ 550€ ▎ ...
?type=online&name=Mysterion?type=energy&name=Mysterion?type=registered&name=Mysterion
Mysterion.jpg ckmGBi.png

Online

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

HG
Member
Registered: 2015-02-18
Posts: 1,253
Website

Re: [Release] Batch/C# Hybrid

@gp68 What about Atom?

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

Offline

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

Mysterion
Member
From: Darkness
Registered: 2016-04-19
Posts: 1,197

Re: [Release] Batch/C# Hybrid

HG wrote:

@gp68 What about Atom?

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


0koussU.pngThanks to DarkComet for this smiley<3 0koussU.png
qDhr3T.gif
Posts: 0 ▎ 100 ▎ 200 ▎ 300 ▎ 400 ▎ 500 ▎ 600 ▎ 700 ▎ 800 ▎ 900 ▎ 1000 ▎ 1100 ▎ 1200 ▎ 1300 ▎ 1400 ▎ 1500 ▎ 1600 ▎ 1700 ▎ 1800 ▎ 1900 ▎ 2000 ▎ ...
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒░░░░
Graphic%20Card-NVIDIA%20GeForce%20GTX%20950M%20with%202GB%20Dedicated%20VRAM-76b900.svgRAM-8GB%20DDR4%20Memory-099FFF.svgProcessor-Intel%20Core%20i5--7200U-0062FF.svg
Damns: 0€ ▎ 50€ ▎ 100€ ▎ 150€ ▎ 200€ ▎ 250€ ▎ 300€ ▎ 350€ ▎ 400€ ▎ 450€ ▎ 500€ ▎ 550€ ▎ ...
?type=online&name=Mysterion?type=energy&name=Mysterion?type=registered&name=Mysterion
Mysterion.jpg ckmGBi.png

Online

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

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

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
Registered: 2015-02-18
Posts: 1,253
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.

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: 4,148

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
?type=lastlogin&name=hummerz5
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,303

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
My First Account, boy I'm old.
Registered-December%2030,%202010-blue.png?style=flat
14392495e4a0.png

Offline

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

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

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,885

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
From: England
Registered: 2016-06-03
Posts: 382

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: 4,148

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
?type=lastlogin&name=hummerz5
rip the creator of this sig, zoey

Offline

Wooted by:

HG

hummerz51483745997642210

Board footer

Powered by FluxBB

[ Started around 1492941177.9506 - Generated in 0.056 seconds, 10 queries executed - Memory usage: 1.34 MiB (Peak: 1.55 MiB) ]