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 Oddity » Tue Jan 17, 2012 5:35 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.

This is not C or C++. This is Groovy, which is based on Java.
jadamkaz wrote:ah i remember my run in with odditown they are good ppl im sure the only reason they killed ME is because they are troll hunters and i was a troll
User avatar
Oddity
 
Posts: 1979
Joined: Sun Jun 20, 2010 12:04 am
Location: BC, Canadia

Re: Jester87's Bot Tutorial For Newbies

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

Haven't messed with Java or groovy much yet, plan on doing so when I got some free time soon. Jester you said you got it cleaned up some, what you do to get some kinks out?
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:59 am

danvath wrote:Haven't messed with Java or groovy much yet, plan on doing so when I got some free time soon. Jester you said you got it cleaned up some, what you do to get some kinks out?


I added an additional line to make it drop the log before checking to chop. Not really sure if it is working, though.
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 6:39 am

For picking up the extra logs you could add a if statement before finding a tree to look for a log, that way it would grab that before chopping a new tree down.
danvath
 
Posts: 84
Joined: Fri Nov 26, 2010 2:05 am

Re: Jester87's Bot Tutorial For Newbies

Postby Jester87 » Tue Jan 17, 2012 6:49 am

danvath wrote:For picking up the extra logs you could add a if statement before finding a tree to look for a log, that way it would grab that before chopping a new tree down.


Yeah, its just a matter of adding the loops. Think you could tackle it?
User avatar
Jester87
 
Posts: 195
Joined: Mon Dec 12, 2011 8:19 am
Location: Hell

Re: Jester87's Bot Tutorial For Newbies

Postby exiva » Tue Jan 17, 2012 7:15 am

I got the bot client working and I added ur script as groovy file.
Can't run it tho by typing
Code: Select all
bot loggin_bot

Also tried adding to hotkey.. nothing happens.. My char just says what I typed.

But if I click f1 then some other script starts that want me to mark 2 different tiles.
How do we know what exactly the already existing scripts do?

Hope we get a curio gathering bot soon :)
exiva
 
Posts: 3
Joined: Tue Jan 17, 2012 7:10 am

Re: Jester87's Bot Tutorial For Newbies

Postby BangPow » Tue Jan 17, 2012 10:29 am

Jester thanks for all your help. Thank you for putting up with my dumb ass.
Before enlightenment - chop wood, carry water. After enlightenment - chop wood, carry water. ~Zen Buddhist Proverb
User avatar
BangPow
 
Posts: 427
Joined: Tue May 31, 2011 4:15 am
Location: Now.......... Awakened

Re: Jester87's Bot Tutorial For Newbies

Postby BangPow » Tue Jan 17, 2012 10:41 am

Jester thanks for all your help. Thank you for putting up with my dumb ass.
Before enlightenment - chop wood, carry water. After enlightenment - chop wood, carry water. ~Zen Buddhist Proverb
User avatar
BangPow
 
Posts: 427
Joined: Tue May 31, 2011 4:15 am
Location: Now.......... Awakened

Re: Jester87's Bot Tutorial For Newbies

Postby Jester87 » Tue Jan 17, 2012 2:17 pm

BangPow wrote:Jester thanks for all your help. Thank you for putting up with my dumb ass.


No problem. Sorry I had to go to bed.

You'll want to make sure the bot script is placed in the scripts folder, and you will want to make sure it has a .groovy extension. After that, while you are in game hit colon ":" and then set_bot1 logger_bot

Or you can rename your bot to something simple like logger.
User avatar
Jester87
 
Posts: 195
Joined: Mon Dec 12, 2011 8:19 am
Location: Hell

Re: Jester87's Bot Tutorial For Newbies

Postby exiva » Tue Jan 17, 2012 2:58 pm

Jester87 wrote:
BangPow wrote:Jester thanks for all your help. Thank you for putting up with my dumb ass.


No problem. Sorry I had to go to bed.

You'll want to make sure the bot script is placed in the scripts folder, and you will want to make sure it has a .groovy extension. After that, while you are in game hit colon ":" and then set_bot1 logger_bot

Or you can rename your bot to something simple like logger.


It is in script folder with groovy extension already and I just tried placing the ":" before the command and it didn't make any difference.
exiva
 
Posts: 3
Joined: Tue Jan 17, 2012 7:10 am

PreviousNext

Return to The Wizards' Tower

Who is online

Users browsing this forum: No registered users and 4 guests