Jump to content
Eternal Lands Official Forums
Sign in to follow this  
Guest Celembidor

Awareness Of 3d_objects

Recommended Posts

Guest Celembidor

I know you programmers are busy working on improving our gaming experience so I will keep this as brief as possible and if you choose not to answer or flame me, with the stress you're likely under, I'll understand.

 

First of all my question pertains to having a bot notice harvestable 3-d objects. Before you say it's not allowed, I scanned through the approved bots list and a bot that harvested ONLY to keep it's own health/hunger level up WAS approved, so I believe this to be a valid use for this bot. There is no self-gain invovled.

 

Inparticular in interfaces.c I noticed the pattern used 'command harvest' but more than that I'm unsure how to load the maps 3-d object lists. Any advice, even a point in the direction, would be of immeasurable help.

 

Thank you for your undoubtablely valuable time...

 

Celembidor,

The Helpful Elf.

Share this post


Link to post
Share on other sites

You could make the bot aware of its own hunger, and then start to eat the edible things in inv.

If it doesnt have that anymore, then there is a problem.

 

I assume you already got this far :

 

You could do the following. I won't go into details as i never coded a bot before, but i'll point anyway.

 

There is a list of items in your Eternal Lands folder that's named 'harvestable.lst'

I suggest, pick out the edibles and compare them with your surroundings.

if you find an edible harvestable object, walk to it and harvest, if not, move on and run that again.

 

you can compare the harvestable list with the e3dobjects list get the ID codes.

 

Again, this is not the set in stone procedure, but my take on how i would tackle your problem.

 

If anyone knows better or could fill in the huge gaps, please be my guest :D

 

oh, if you manage to get it done, would you mind sharing how you did it ?

Thinking of coding my own bot sometime..

Edited by DarkWarriorBOW

Share this post


Link to post
Share on other sites
Inparticular in interfaces.c I noticed the pattern used 'command harvest' but more than that I'm unsure how to load the maps 3-d object lists. Any advice, even a point in the direction, would be of immeasurable help.

 

Thank you for your undoubtablely valuable time...

 

Celembidor,

The Helpful Elf.

160092[/snapback]

 

Have a read through the load_map function in map_io.c - 3D objects are more in the middle of the file though, so I'd recommend computing the offset from the header information, and then lseek()'ing it.

Share this post


Link to post
Share on other sites
Guest Celembidor

ACK. Lol. I totally missed that and thank you both for pointing out vital clues, lol.

 

Guess staring at this code for so long gave me brain-freeze on the issue. Thanks alot.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×