Jester87's Bot Tutorial For Newbies

Forum for alternative clients, mods & discussions on the same.

Moderator: Phades

Re: Jester87's Bot Tutorial For Newbies

Postby Jester87 » Tue Jan 17, 2012 2:51 am

ddhoward wrote:I am having the same issue. Even when running the bat on the command line, I am shortly sent to the next line, prompted to enter another command. Javaw.exe appears and disappears in the task manager after a few seconds.

I am attempting to troubleshoot this.


Did you try replacing it with:

Code: Select all
"C:\Program Files (x86)\Java\jre6\bin\java.exe" -Djava.library.path="C:\users\david\desktop\bot" -cp groovy-1.7.5.jar -Xms256m -Xmx512m -jar haven.jar moltke.seatribe.se


Where you change the path to reflect where your bot folder is located?
User avatar
Jester87
 
Posts: 195
Joined: Mon Dec 12, 2011 8:19 am
Location: Hell

Re: Jester87's Bot Tutorial For Newbies

Postby ddhoward » Tue Jan 17, 2012 3:21 am

Code: Select all
"c:\Program Files\Java\jre7\bin\javaw.exe" -Djava.library.path="C:\GroovyBot" -cp groovy-1.7.5.jar -Xms256m -Xmx512m -jar haven.jar moltke.seatribe.se


I also specified the full addresses of both jar files called. This did not work.

Code: Select all
"c:\Program Files\Java\jre7\bin\javaw.exe" -Djava.library.path="C:\GroovyBot" -cp "C:\GroovyBot\groovy-1.7.5.jar" -Xms256m -Xmx512m -jar "C:\GroovyBot\haven.jar" moltke.seatribe.se


I also attempted to replace "jre7" with "jre6." This, too, did not have any apparent effect.

Thanks for your time!
ddhoward
 
Posts: 180
Joined: Fri Nov 11, 2011 1:59 am

Re: Jester87's Bot Tutorial For Newbies

Postby Jester87 » Tue Jan 17, 2012 3:27 am

ddhoward wrote:
Code: Select all
"c:\Program Files\Java\jre7\bin\javaw.exe" -Djava.library.path="C:\GroovyBot" -cp groovy-1.7.5.jar -Xms256m -Xmx512m -jar haven.jar moltke.seatribe.se


I also specified the full addresses of both jar files called. This did not work.

Code: Select all
"c:\Program Files\Java\jre7\bin\javaw.exe" -Djava.library.path="C:\GroovyBot" -cp "C:\GroovyBot\groovy-1.7.5.jar" -Xms256m -Xmx512m -jar "C:\GroovyBot\haven.jar" moltke.seatribe.se


I also attempted to replace "jre7" with "jre6." This, too, did not have any apparent effect.

Thanks for your time!


Post a screenshot of the error you are getting, maybe I can help further that way.
User avatar
Jester87
 
Posts: 195
Joined: Mon Dec 12, 2011 8:19 am
Location: Hell

Re: Jester87's Bot Tutorial For Newbies

Postby Jester87 » Tue Jan 17, 2012 3:28 am

Also, did you try linking to java.exe instead of javaw.exe?
User avatar
Jester87
 
Posts: 195
Joined: Mon Dec 12, 2011 8:19 am
Location: Hell

Re: Jester87's Bot Tutorial For Newbies

Postby ddhoward » Tue Jan 17, 2012 4:25 am

That was what made it difficult; there was NO error message. As far as cmd.exe was concerned, javaw.exe completed without issue. No error message was ever given; I had nothing to go off of, or take a screenshot of.

It turned out to be an issue with Java, and not with the client or batch file. Uninstalling and reinstalling Java seemed to do the trick; I am now able to run the client with two of four Java installations (i586, both JRE6 and JRE7.)
ddhoward
 
Posts: 180
Joined: Fri Nov 11, 2011 1:59 am

Re: Jester87's Bot Tutorial For Newbies

Postby Jester87 » Tue Jan 17, 2012 4:34 am

ddhoward wrote:That was what made it difficult; there was NO error message. As far as cmd.exe was concerned, javaw.exe completed without issue. No error message was ever given; I had nothing to go off of, or take a screenshot of.

It turned out to be an issue with Java, and not with the client or batch file. Uninstalling and reinstalling Java seemed to do the trick; I am now able to run the client with two of four Java installations (i586, both JRE6 and JRE7.)


Ah good, you are one step ahead. I was going to suggest fresh install because thats what I did when I booted into windows and it worked flawlessly.
User avatar
Jester87
 
Posts: 195
Joined: Mon Dec 12, 2011 8:19 am
Location: Hell

Re: Jester87's Bot Tutorial For Newbies

Postby danvath » Tue Jan 17, 2012 4:40 am

First thing I would assume is:

pauseTime = 4000;

which could end up being either 60 minutes or 1 minute. Usually values like this are based off of your clock speed, so a higher clock speeds and less lag means less time to complete. If there is more lag or a slower CPU then it will go on longer.

Another thin I saw was a statement that said if(i<200) and i++ each cycle. You could try changing I to a double and then make it I < max double value.
danvath
 
Posts: 84
Joined: Fri Nov 26, 2010 2:05 am

Re: Jester87's Bot Tutorial For Newbies

Postby Jester87 » Tue Jan 17, 2012 4:51 am

danvath wrote:First thing I would assume is:

pauseTime = 4000;

which could end up being either 60 minutes or 1 minute. Usually values like this are based off of your clock speed, so a higher clock speeds and less lag means less time to complete. If there is more lag or a slower CPU then it will go on longer.

Another thin I saw was a statement that said if(i<200) and i++ each cycle. You could try changing I to a double and then make it I < max double value.


I honestly don't think its that long. The loop is just to repeat the actions over and over. I was under the impression that int covers up to 200.
User avatar
Jester87
 
Posts: 195
Joined: Mon Dec 12, 2011 8:19 am
Location: Hell

Re: Jester87's Bot Tutorial For Newbies

Postby danvath » Tue Jan 17, 2012 5:00 am

It depends on your computer, each computer has different representations for int, float, double, etc... There is a test to see, I think it goes something like:
In a dos box:

run like a hellow world app, but then include

printf (cout, printline, whatever your languages command for printing to screen is) << float
printf << double
printf << int


This should make it print to screen what your computer can set the maximum value to. I think the maximum for int is in the thousands, but that i<200 can still cause many problems. In a situation like this were you don't know exactly how long you need it to run its best to do a do while or while loop. This way you do not need to specify i<200 and you can continue on. So like while(logs<400) go on from there. This way instead of it being 200 run throughs of the code, which can still cause I to go up without collecting a log, now you have it running until it collects 400 logs.
danvath
 
Posts: 84
Joined: Fri Nov 26, 2010 2:05 am

Re: Jester87's Bot Tutorial For Newbies

Postby Jester87 » Tue Jan 17, 2012 5:12 am

danvath wrote:It depends on your computer, each computer has different representations for int, float, double, etc... There is a test to see, I think it goes something like:
In a dos box:

run like a hellow world app, but then include

printf (cout, printline, whatever your languages command for printing to screen is) << float
printf << double
printf << int


This should make it print to screen what your computer can set the maximum value to. I think the maximum for int is in the thousands, but that i<200 can still cause many problems. In a situation like this were you don't know exactly how long you need it to run its best to do a do while or while loop. This way you do not need to specify i<200 and you can continue on. So like while(logs<400) go on from there. This way instead of it being 200 run throughs of the code, which can still cause I to go up without collecting a log, now you have it running until it collects 400 logs.


Thats not a bad idea. Although I do think it has to do with not dropping a log when going back into the "find / chop tree" loops. Try it out and see what your results yield.
User avatar
Jester87
 
Posts: 195
Joined: Mon Dec 12, 2011 8:19 am
Location: Hell

PreviousNext

Return to The Wizards' Tower

Who is online

Users browsing this forum: No registered users and 1 guest