Valhalla Legends Forums Archive | Battle.net Bot Development | Bots in Java - info please!

AuthorMessageTime
After-Death
Are there any open source bots written in Java?

Im interested in writing a bot in Java but I can't read C or VB particularly well so it would be easier to find a Java bot.
January 22, 2004, 1:34 PM
ChR0NiC
I believe.....DM Bot made by Dark Minion is an open source C++ bot.....I do not have the source, because I am not learning C++ but I am sure some people have it,
January 22, 2004, 1:41 PM
warz
[quote author=After-Death link=board=17;threadid=4844;start=0#msg40621 date=1074778462]
Are there any open source bots written in Java?

Im interested in writing a bot in Java but I can't read C or VB particularly well so it would be easier to find a Java bot.
[/quote]

He's asking for Java, not C++.
January 22, 2004, 1:45 PM
ChR0NiC
[quote author=After-Death link=board=17;threadid=4844;start=0#msg40621 date=1074778462]
Are there any open source bots written in Java?

Im interested in writing a bot in Java but I can't read C or VB particularly well so it would be easier to find a Java bot.
[/quote]

[quote author=warz link=board=17;threadid=4844;start=0#msg40624 date=1074779137]
He's asking for Java, not C++.
[/quote]

Maybe I was informed....but aren't they pretty much the same thing?? This is what I was told.....
January 22, 2004, 1:48 PM
warz
Similar.
January 22, 2004, 1:56 PM
iago
[quote author=ChR0NiC link=board=17;threadid=4844;start=0#msg40626 date=1074779325]
[quote author=After-Death link=board=17;threadid=4844;start=0#msg40621 date=1074778462]
Are there any open source bots written in Java?

Im interested in writing a bot in Java but I can't read C or VB particularly well so it would be easier to find a Java bot.
[/quote]

[quote author=warz link=board=17;threadid=4844;start=0#msg40624 date=1074779137]
He's asking for Java, not C++.
[/quote]

Maybe I was informed....but aren't they pretty much the same thing?? This is what I was told.....
[/quote]

You were MISinformed. Although they are similar in many ways, and it's easy to learn one when you know the other, they are by no means the same.


Back to the question - I don't know of any open source Java bots. I have an open source javabot that only supports chat, if you want. It's at
http://www.valhallalegends.com/iago/JavaBot.rar or
http://www.valhallalegends.com/iago/JavaBot-gui.rar
Keep in mind that that's a working name, and I'm slowly putting work into making it a real bot, but it doesn't look like that's going to happen anytime soon. And when it does, it probably won't be opensource.
January 22, 2004, 1:58 PM
ChR0NiC
Is Java supported by any Microsoft based programs? like Visual Java or something
January 22, 2004, 2:06 PM
After-Death
Thanks for the source iago, it is quite useful.

Im not sure Im gonna be able to cope with programming a bot though :/
January 22, 2004, 3:11 PM
iago
[quote author=ChR0NiC link=board=17;threadid=4844;start=0#msg40639 date=1074780413]
Is Java supported by any Microsoft based programs? like Visual Java or something
[/quote]

C# is similar to Java...

I would suggest getting the new java SDK with NetBeans. NetBeans is the best IDE I've ever used.
January 22, 2004, 4:44 PM
After-Death
I've been using Eclipse .. it seems to do the job.

What java books do you recommend? I have a firm grasp of OOP and basics of programming but I need to get into Java quickly. Unfortunately I haven't found much useful info on the internet, and relevant networking code seems to be scarce (or I'm looking for the wrong stuff).
January 22, 2004, 6:41 PM
Kp
[quote author=ChR0NiC link=board=17;threadid=4844;start=0#msg40639 date=1074780413]
Is Java supported by any Microsoft based programs? like Visual Java or something[/quote]

ugh, Windows kids and graphical everything. Blech.

If you can stand having a command line interface, there's a java compiler from Sun for Windows (and for other OSes, but since you asked for something Microsoft-based, I assume you want a Windows application).
January 22, 2004, 6:56 PM
K
[quote author=iago link=board=17;threadid=4844;start=0#msg40634 date=1074779887]
...And when it does, it probably won't be opensource.
[/quote]

Just curious; how are you planning on accomplishing that? obfuscation? compiling to native code?
January 22, 2004, 7:12 PM
After-Death
Why use a command line when you have a GUI ? It's about programming not being old school.

Anyway.

I ran netbeans and it couldn't load jvm.dll

January 22, 2004, 7:30 PM
ObsidianWolf
http://www.netbeans.org/kb/

Look there for help, Im trying to recreate the error myself that you spoke of in hopes of helping you.

No such luck yet, 4 Good Installs.

Question... When Prompted to Save file to disk or Open...

DId you choose save?
January 22, 2004, 7:47 PM
Tuberload
[quote author=After-Death link=board=17;threadid=4844;start=0#msg40621 date=1074778462]
Are there any open source bots written in Java?

Im interested in writing a bot in Java but I can't read C or VB particularly well so it would be easier to find a Java bot.
[/quote]

I am working on a guide to creating Battle.net bots. All examples will be written in Java to start with, so when it is released it may be of some help to you.
January 22, 2004, 8:16 PM
iago
[quote author=K link=board=17;threadid=4844;start=0#msg40679 date=1074798763]
[quote author=iago link=board=17;threadid=4844;start=0#msg40634 date=1074779887]
...And when it does, it probably won't be opensource.
[/quote]

Just curious; how are you planning on accomplishing that? obfuscation? compiling to native code?
[/quote]

By not releasing it at all is the easiest way, since I'm writing it for myself :)
January 22, 2004, 8:18 PM
Kp
[quote author=After-Death link=board=17;threadid=4844;start=0#msg40683 date=1074799817]
Why use a command line when you have a GUI ? It's about programming not being old school.[/quote]

It's not about being old school. It's about efficiency. I've found that I can update my project settings more easily, rebuild just as quickly, and generally design better overall by NOT using an IDE. In particular, I've never seen an IDE that had a decent inline editor, and that's the only reason I'd consider an IDE over a command line environment.
January 22, 2004, 8:31 PM
Tuberload
[quote author=Kp link=board=17;threadid=4844;start=15#msg40695 date=1074803481]
[quote author=After-Death link=board=17;threadid=4844;start=0#msg40683 date=1074799817]
Why use a command line when you have a GUI ? It's about programming not being old school.[/quote]

It's not about being old school. It's about efficiency. I've found that I can update my project settings more easily, rebuild just as quickly, and generally design better overall by NOT using an IDE. In particular, I've never seen an IDE that had a decent inline editor, and that's the only reason I'd consider an IDE over a command line environment.
[/quote]

I use JCreator, which offers syntax coloring (makes it easier for me to work with because I am a visual person), compiles my project for me with the push of a button (laziness perhaps ;D), and helps keep it organized for me. I am not doubting what you are saying because I do see the benefits of not using a IDE. My question is how does it help you to design your projects better not using an IDE? I design all my projects on paper, so I don't see how it would be a burden. The main issue with IDE's to me is all the auto-complete and lookup features. I don't think people really learn when all they have to do is get part of it correct, and the IDE does the rest for them. That's why I learn a language without an IDE, and then move to one later.
January 22, 2004, 8:38 PM
Kp
[quote author=Tuberload link=board=17;threadid=4844;start=15#msg40696 date=1074803938]
I use JCreator, which offers syntax coloring (makes it easier for me to work with because I am a visual person), compiles my project for me with the push of a button (laziness perhaps ;D), and helps keep it organized for me. I am not doubting what you are saying because I do see the benefits of not using a IDE. My question is how does it help you to design your projects better not using an IDE? I design all my projects on paper, so I don't see how it would be a burden. The main issue with IDE's to me is all the auto-complete and lookup features. I don't think people really learn when all they have to do is get part of it correct, and the IDE does the rest for them. That's why I learn a language without an IDE, and then move to one later.[/quote]

Syntax highlighting could occasionally be nice, but I much prefer the raw power associated with a non-WYSIWYG editor. :) Compliation is as simple as running make (or !! if the target shell ran make most recently). That's also where ease of maintenance comes in -- with a well configured Makefile, adding new files to a project is as simple as dumping their unadorned names into a macro, from which target macros are derived. Run gcc -MM on the new files to generate their dependency list, dump that into the Makefile, and you're done. This last step could be automated with some good Makefile targets too, but I usually don't bother.

I never use paper.
January 22, 2004, 8:48 PM
Tuberload
[quote author=Kp link=board=17;threadid=4844;start=15#msg40697 date=1074804503]
[quote author=Tuberload link=board=17;threadid=4844;start=15#msg40696 date=1074803938]
I use JCreator, which offers syntax coloring (makes it easier for me to work with because I am a visual person), compiles my project for me with the push of a button (laziness perhaps ;D), and helps keep it organized for me. I am not doubting what you are saying because I do see the benefits of not using a IDE. My question is how does it help you to design your projects better not using an IDE? I design all my projects on paper, so I don't see how it would be a burden. The main issue with IDE's to me is all the auto-complete and lookup features. I don't think people really learn when all they have to do is get part of it correct, and the IDE does the rest for them. That's why I learn a language without an IDE, and then move to one later.[/quote]

Syntax highlighting could occasionally be nice, but I much prefer the raw power associated with a non-WYSIWYG editor. :) Compliation is as simple as running make (or !! if the target shell ran make most recently). That's also where ease of maintenance comes in -- with a well configured Makefile, adding new files to a project is as simple as dumping their unadorned names into a macro, from which target macros are derived. Run gcc -MM on the new files to generate their dependency list, dump that into the Makefile, and you're done. This last step could be automated with some good Makefile targets too, but I usually don't bother.

I never use paper.
[/quote]

What do you use to design your projects then? I do all of my analysis/design on paper because it is low tech, gets me away from the computer, and I can work on it anyware. Don't you ever write notes down?

Addition: I dont like WYSIWYG editors either because they use their own code, so you do not get to create it yourself.
January 22, 2004, 9:03 PM
Kp
[quote author=Tuberload link=board=17;threadid=4844;start=15#msg40701 date=1074805393]What do you use to design your projects then? I do all of my analysis/design on paper because it is low tech, gets me away from the computer, and I can work on it anyware. Don't you ever write notes down?

Addition: I dont like WYSIWYG editors either because they use their own code, so you do not get to create it yourself.
[/quote]

I never take notes on designs, because I've never needed to take notes. I just know what I want when I sit down. Most WYSIWYGs can be convinced to let you start from scratch, I think. Mostly, I like the much more rapid/extensive editing facilities of an editor like vi. [How many keystrokes does it take you to replace all instances of 'fooXXaa' with 'behXXbb' in just one subroutine out of a much larger file, with the XXs held constant between replacements? ;) It would take me 23 plus the number of digits involved in describing the line numbers: :<line1>,<line2>s/foo\(..\)aa/beh\1bb/g<CR>.)

[Edit: made example more elaborate.]
January 22, 2004, 9:15 PM
Tuberload
[quote author=Kp link=board=17;threadid=4844;start=15#msg40703 date=1074806152]
[quote author=Tuberload link=board=17;threadid=4844;start=15#msg40701 date=1074805393]What do you use to design your projects then? I do all of my analysis/design on paper because it is low tech, gets me away from the computer, and I can work on it anyware. Don't you ever write notes down?

Addition: I dont like WYSIWYG editors either because they use their own code, so you do not get to create it yourself.
[/quote]

I never take notes on designs, because I've never needed to take notes. I just know what I want when I sit down. Most WYSIWYGs can be convinced to let you start from scratch, I think. Mostly, I like the much more rapid/extensive editing facilities of an editor like vi. [How many keystrokes does it take you to replace all instances of 'fooXXaa' with 'behXXbb' in just one subroutine out of a much larger file, with the XXs held constant between replacements? ;) It would take me 23 plus the number of digits involved in describing the line numbers: :<line1>,<line2>s/foo\(..\)aa/beh\1bb/g<CR>.)

[Edit: made example more elaborate.]
[/quote]

Well you got me their... After seriously trying to even find a way to do this in JCreator, I failed... I could make a tool to do this an insert it into the tools of the IDE, but that is still more work.

I used to just sit down and work on projects without writing them out on paper first. I then enrolled in a Java class, and my teacher told me that was a horrible, error prone way of doing things so I have since changed my methods. I guess it is a matter of opinion.

Edit (Question): What flavor of Linux do you use? I have been interested in learning to use the operating system for some time now but am yet to attempt it.
January 22, 2004, 10:01 PM
Kp
[quote author=Tuberload link=board=17;threadid=4844;start=15#msg40706 date=1074808899]
Well you got me their... After seriously trying to even find a way to do this in JCreator, I failed... I could make a tool to do this an insert it into the tools of the IDE, but that is still more work.

I used to just sit down and work on projects without writing them out on paper first. I then enrolled in a Java class, and my teacher told me that was a horrible, error prone way of doing things so I have since changed my methods. I guess it is a matter of opinion.

Edit (Question): What flavor of Linux do you use? I have been interested in learning to use the operating system for some time now but am yet to attempt it.[/quote]

I've had an instructor or two try to tell me that years ago, but it didn't take. I do plan first, just that I don't write any of it down. :) I use an antiquated form of Red Hat, which I'm planning on upgrading sometime in the next year or so. There exist vi ports for Windows if you want to start learning it before you switch, though.
January 22, 2004, 10:15 PM
Tuberload
[quote author=Kp link=board=17;threadid=4844;start=15#msg40708 date=1074809708]
[quote author=Tuberload link=board=17;threadid=4844;start=15#msg40706 date=1074808899]
Well you got me their... After seriously trying to even find a way to do this in JCreator, I failed... I could make a tool to do this an insert it into the tools of the IDE, but that is still more work.

I used to just sit down and work on projects without writing them out on paper first. I then enrolled in a Java class, and my teacher told me that was a horrible, error prone way of doing things so I have since changed my methods. I guess it is a matter of opinion.

Edit (Question): What flavor of Linux do you use? I have been interested in learning to use the operating system for some time now but am yet to attempt it.[/quote]

I've had an instructor or two try to tell me that years ago, but it didn't take. I do plan first, just that I don't write any of it down. :) I use an antiquated form of Red Hat, which I'm planning on upgrading sometime in the next year or so. There exist vi ports for Windows if you want to start learning it before you switch, though.
[/quote]

I have a copy of Red Hat 7, and Caldera OpenLinux 2.4(sp?). In your opinion what would you recommend? I have read about the differences/similarities and pros/cons of both, but it never hurts to have a professional opinion.

As soon as I finish the first issue of The Bot Creator, I think I will try and install linux.
January 22, 2004, 10:27 PM
Kp
I've used RedHat 5 series and 6 series, but nothing later than that. I've not used Caldera at all. As such, I don't think I can offer you much guidance. :P
January 22, 2004, 10:45 PM
iago
vim DOES have syntax highlighting, and automated indenting.

The #1 reason I use an IDE (netbeans, incidentally) is because of autocompletion. I have a terrible memory for names (whether it's people's names, function names, etc.), and having a reminder pop up when I sit at '.' for more than a second is handy.

But as far as plain text editors go, vim is by far the best.
January 22, 2004, 11:29 PM
Kp
[quote author=iago link=board=17;threadid=4844;start=15#msg40727 date=1074814183]
vim DOES have syntax highlighting, and automated indenting.[/quote]

I'm using a somewhat old vi clone (not of my own design). I should probably upgrade to a new vim. :P
January 22, 2004, 11:46 PM
iago
On this version of linux (Slackware 9.1), it has syntax highlighting for C/C++, Java, html, and probably some others. I noticed, however, that vi and vim are both symbolic links to a piece of software called elvis, which has this description:

[quote]NAME
elvis - a clone of the ex/vi text editor

SYNOPSIS
elvis [-V...] [-a] [-r] [-R] [-e] [-i] [-S] [-s|-] [-f
session] [-o logfile] [-G gui] [-c command|+command] [-t
tag] [-w scroll] [-b blksize] [file]...

DESCRIPTION
elvis is a text editor. It is intended to be a modern
replacement for the classic ex/vi editor of UNIX fame.
elvis supports many new features, including multiple edit
buffers, multiple windows, multiple user interfaces
(including an X11 interface), and a variety of display
modes.

For a more complete description, you should see elvis's
on-line documentation. To view this documentation, start
elvis and then give the command ":help".

To exit elvis, you can give the command ":q" in each of
its windows. If you've modified the buffer in a window,
and you want to abandon those changes, then give the com-
mand ":q!" instead.
[/quote]
January 23, 2004, 1:23 AM
After-Death
[quote author=Tuberload link=board=17;threadid=4844;start=0#msg40690 date=1074802591]

I am working on a guide to creating Battle.net bots. All examples will be written in Java to start with, so when it is released it may be of some help to you.
[/quote]

Info would be much appreciated.
January 23, 2004, 7:40 PM
hismajesty
[quote author=iago link=board=17;threadid=4844;start=0#msg40653 date=1074789897]
C# is similar to Java...
[/quote]

Correct, Microsoft said C# was made up of (I'm doing this from memory so the percents will be a bit off possibly) 60% Java, 15% C++, 10% Visual Basic, and 15% new.
January 23, 2004, 7:52 PM
Kp
[quote author=hismajesty link=board=17;threadid=4844;start=15#msg40811 date=1074887520]
Correct, Microsoft said C# was made up of (I'm doing this from memory so the percents will be a bit off possibly) 60% Java, 15% C++, 10% Visual Basic, and 15% new.[/quote]

Syntax error: operator new with no associated type. At least at one time, that syntax error would send VC into a loop until it hit 100 errors (in total), then reported encountering 102 errors. :)
January 23, 2004, 9:24 PM
R.a.B.B.i.T
C# (as described by Newby) is a VB GUI interface editor with C++ code syntax.
January 24, 2004, 12:15 AM
Tuberload
[quote author=R.a.B.B.i.T link=board=17;threadid=4844;start=30#msg40846 date=1074903341]
C# (as described by Newby) is a VB GUI interface editor with C++ code syntax.
[/quote]

I dont recommend listening to people with the name newby because they are giving you bad descriptions...
January 24, 2004, 4:32 AM
R.a.B.B.i.T
[quote author=Tuberload link=board=17;threadid=4844;start=30#msg40865 date=1074918747]
[quote author=R.a.B.B.i.T link=board=17;threadid=4844;start=30#msg40846 date=1074903341]
C# (as described by Newby) is a VB GUI interface editor with C++ code syntax.
[/quote]

I dont recommend listening to people with the name newby because they are giving you bad descriptions...
[/quote]

HAH! His aim name is Newby1337. He's trying to confuse me!!
January 24, 2004, 4:41 AM
Twin_One1
Microsoft has J++ which is a visual studio 6.0 thing, J# which is a .NET thing and comes with visual studio 2003 .net. Then there is C# which is what I perfer, although J# is the same thing as java and has the sun packages (although i'm not sure what version) and it also has the .net packages.
January 26, 2004, 7:32 PM
Tuberload
[quote author=Twin_One1 link=board=17;threadid=4844;start=30#msg41203 date=1075145541]
Microsoft has J++ which is a visual studio 6.0 thing, J# which is a .NET thing and comes with visual studio 2003 .net. Then there is C# which is what I perfer, although J# is the same thing as java and has the sun packages (although i'm not sure what version) and it also has the .net packages.
[/quote]

J++/J# is not just like Java, and if you want to use Java I dont recommend using either of the two. I do not remember exact differences, I just remember Microsoft's Java compilers are somewhat of a joke when it comes to Java standards.
January 26, 2004, 7:44 PM
Twin_One1
You can take Java programs open it up in visual studio .net and compile it and have a working J# program.
January 26, 2004, 8:08 PM
Kp
[quote author=Twin_One1 link=board=17;threadid=4844;start=30#msg41212 date=1075147696]
You can take Java programs open it up in visual studio .net and compile it and have a working J# program.
[/quote]

but are you guaranteed that a program which compiles with no warnings/errors in J# will compile on a true to-spec Java compiler? If the IDE allows Microsoft extensions without warning, you may very easily be writing code that isn't truly Java.
January 26, 2004, 9:44 PM
Twin_One1
[quote]Microsoft's newly released Visual J# .Net Beta 1 -- a full clean-room Java implementation -- offers Microsoft Visual J++ (VJ++) developers a migration path to .Net for their VJ++ projects. While J# successfully converts a range of compiled Java code into .Net binaries, its JDK support remains frozen at Java 1.1.4 and the .Net binaries work only on Windows.[/quote]

http://www.javaworld.com/javaworld/jw-11-2001/jw-1121-iw-jsharp.html
January 27, 2004, 1:20 AM
Twin_One1
I don't think there are major differences between Java and J# except for the .NET packages and its missing a couple of Sun's packages.

Whoops, I meant to click modify :(
January 27, 2004, 1:29 AM
Tuberload
[quote]Microsoft's newly released Visual J# .Net Beta 1 -- a full clean-room Java implementation -- offers Microsoft Visual J++ (VJ++) developers a migration path to .Net for their VJ++ projects. While J# successfully converts a range of compiled Java code into .Net binaries, its JDK support remains frozen at Java 1.1.4 and the .Net binaries work only on Windows. (900 words; November 21, 2001)
[/quote]
To me the summary of that article says it all...

Edit: This is just an opinion, but I will never use J# because I see it as just another way for Microsoft to try and control everything.

Edit: Did you even read that article before posting?
January 27, 2004, 7:30 AM
Twin_One1
I read it a while ago, then I just now went and found it again so I wouldn't be basing my statement on memory.
January 27, 2004, 4:27 PM
Myndfyr
[quote author=Twin_One1 link=board=17;threadid=4844;start=30#msg41212 date=1075147696]
You can take Java programs open it up in visual studio .net and compile it and have a working J# program.
[/quote]

Not quite...

IIRC, Microsoft reached the settlement with Sun that they could only distribute Microsoft versions of the JDK up to 1.1.4. Because of this, you can't directly migrate apps from JDK to J# (for instance, I tried to compile Joscar, and there were about 40 classes missing from support because 1.1.4 is so old).

While you would like to think that those are the only three languages that gave to C#, here's what I can figure:

RAD support from Visual Basic, along with properties and events (also related to COM and IDL).
Pointer support, operator overloading, and general syntax (such as ; to end a statement) from C/C++.
Class structure from Java.
Structured Exception Handling based on Ada (IIRC).
Value types, enumerations, and delegates are new.
January 27, 2004, 4:42 PM
Tuberload
[quote author=Twin_One1 link=board=17;threadid=4844;start=30#msg41318 date=1075220835]
I read it a while ago, then I just now went and found it again so I wouldn't be basing my statement on memory.
[/quote]

Ok, because that whole article basicaly explains why J# is not Java...
January 27, 2004, 4:43 PM

Search