SRL Archive - OSR Help

Writing in Java


Large Lamp

2012-01-09 22:49:44

I just recently stumbled across SRL and have become interested in the prospect of writing bots once again. I've been programming in Java for a few years now, and started scripting about a year ago. I took a look at SMART's source code, and figured that I could rewrite my own version of it to accept Java-based scripts instead of Pascal (since the color buffer is handled by SMART, not Simba). However, to save myself time and help the community here, I was wondering if this would be integrable with the existing SRL framework. I could also write Pascal, but I can do so much more with Java that I feel like I would be limited :3.

Sorry if this has already been asked, but a search yielded no information about this particular subject. Thanks!

Brandon

2012-01-09 22:52:05

I've seen scar++ but never seen anyone attempt to re-write Smart to a full on java bot :S How do you plan to load it into a plugin to have simba read it? Or are u planning on writing a java version of simba? oh and smart is C++ And Java.

Large Lamp

2012-01-09 22:59:25

Smart is in Java. The C++ parts are for integration with SCAR and Simba from what I can gather, and simply call methods (I have a runnable, very highly modified version of SMART in Eclipse right now). I would not have Simba at all, I would simply implement my own color detection methods and script handling system, but if something like this is already possible I'd love to use a system that others are using so I could contribute :s

x[Warrior]x3500

2012-01-09 22:59:35

if i am reading his post correctly, i believe he would be creating his own bot (not simba) that utilized smart. if so, i have thought about that many times, just was always busy with college . :( good luck to u!

Large Lamp

2012-01-09 23:02:32

That's sort of a last resort haha. My only real objective is to be able to write scripts in Java. If I have to make my own client, so be it, but I'd rather not.

x[Warrior]x3500

2012-01-09 23:09:49

no no no. i mean, write scripts in eclipse that can utilize smart :). thats wat i meant by a bot. no need to actually have a client. thats just the pretty stuff that leachers like. but anyway, once again, i think it is a fun and great idea. best of luck to you

EDIT: and even though i dont have too much time to spare, i will help, just ask(or pm)

Large Lamp

2012-01-09 23:11:48

Alright, thanks. And I wouldn't release the client to the public, but I already have it written haha. I started the project a lil while ago with some IRL programming buddies. I'll be sure to hit you with a PM if I continue to develop

Brandon

2012-01-09 23:13:21

From: Large Lamp
Alright, thanks. And I wouldn't release the client to the public, but I already have it written haha. I started the project a lil while ago with some IRL programming buddies. I'll be sure to hit you with a PM if I continue to develop



But what would be the point of us working on it, if its not open source or public :S doesn't that defeat the purpose of a community?

ShawnjohnSJ

2012-01-09 23:13:36

It is possible, only thing you won't be able to do with pure java (that I can think of) is getting window handles to search a specific window like SCAR and Simba does with its DC window functions. You'd have to use JNI for that.. but it sounds like you just want to use a variation of SMART with it - so yes it'd be possible. Although IMO you're better off writing a complete rewrite of SMART in java.. its not too complicated.

Edit: Also, to use SRL you would have to translate it to Java, unless you made a java-based PascalScript interpreter.

Large Lamp

2012-01-09 23:26:39

From: ggzz
But what would be the point of us working on it, if its not open source or public :S doesn't that defeat the purpose of a community?


Sorry if I wasn't clear… I would be completely open to releasing the client itself, just not the source to the entire internet public (registered users may be able to get it, as an example of what I mean by restriction). I would include a method library and everything for scripters to use to develop their own bots. At this point, I'm really deviating from SRL, and as mentioned before, I may as well write the bot from the ground up (not something I'm against..).

Dgby714

2012-01-09 23:35:01

You cannot use SMART code at all, if your project is not going to be open sawse.

Please read SMART's license here.

Large Lamp

2012-01-09 23:44:36

Which is why I would be re-writing the entire thing. Not modifying, replacing. SMART, while admirable, is not exactly what I need anyways. It is designed to be integrated with other platforms which I do not want or need.

KingKong

2012-01-09 23:47:27

From: Large Lamp
I just recently stumbled across SRL and have become interested in the prospect of writing bots once again. I've been programming in Java for a few years now, and started scripting about a year ago. I took a look at SMART's source code, and figured that I could rewrite my own version of it to accept Java-based scripts instead of Pascal (since the color buffer is handled by SMART, not Simba). However, to save myself time and help the community here, I was wondering if this would be integrable with the existing SRL framework. I could also write Pascal, but I can do so much more with Java that I feel like I would be limited :3.

Sorry if this has already been asked, but a search yielded no information about this particular subject. Thanks!


You don't need to modify SMART for it to work with other languages, its a dll, any language that can load/call dll's can use it. All you need to do is create a java version of the srl include(or something similar to simba) and voila scripts can be written in java. Also, take a look at libmml.

Brandon

2012-01-10 00:07:08

From: Large Lamp
Which is why I would be re-writing the entire thing. Not modifying, replacing. SMART, while admirable, is not exactly what I need anyways. It is designed to be integrated with other platforms which I do not want or need.


If not modifying, that would also require you to write your own colour procedures :S And upon request of the owner, would u not have to show source code in order to prove that it's not copied?

Seems like a lot of work to me tbh. But hey I support u anyway if your doing something good. I like programs so meh.

i need to bot!

2012-01-13 20:04:41

This would b a really good idea :) you obviously have skill in coding

btw, could you publish your modified version plz