What am I doing wrong with the resources?

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
Jester
Neophyte Poster
Posts: 36
Joined: Mon Jul 07, 2008 2:33 pm

What am I doing wrong with the resources?

Post by Jester »

Im trying to up the resources so they wont ever run out in ever single spot. I changed it in the ore.cfg file and all, changed unitsperarea to like 2000000 and respawn to 1, and capacity to 99999999999 yet they run out after like 3 loops. What I do wrong?
User avatar
CWO
POL Expert
Posts: 1160
Joined: Sat Feb 04, 2006 5:49 pm

Post by CWO »

In this type of situation you should try to see if you could take out the HarvestResource() function from your script and try to improvise without it. If you can get rid of that function, you won't have much of a need to keep up with resources.cfg because it won't actually take any resources away.
Jester
Neophyte Poster
Posts: 36
Joined: Mon Jul 07, 2008 2:33 pm

Post by Jester »

CWO wrote:In this type of situation you should try to see if you could take out the HarvestResource() function from your script and try to improvise without it. If you can get rid of that function, you won't have much of a need to keep up with resources.cfg because it won't actually take any resources away.
The problem is I do not want the whole world to be affected, only certain parts.
User avatar
OldnGrey
POL Expert
Posts: 657
Joined: Sat Feb 04, 2006 6:26 pm

Post by OldnGrey »

Just make up some functions to localise parts of the world.

if ( character.x > 1000 and character.x < 1020 and character.y > 200 and character.y < 220 and charater.realm == _DEFAULT_REALM )
// code here to harvest lots of resources
return 1;
endif
Jester
Neophyte Poster
Posts: 36
Joined: Mon Jul 07, 2008 2:33 pm

Post by Jester »

OldnGrey wrote:Just make up some functions to localise parts of the world.

if ( character.x > 1000 and character.x <1020> 200 and character.y < 220 and charater.realm == _DEFAULT_REALM )
// code here to harvest lots of resources
return 1;
endif
Yeah, why cant I just change it in the resource files? :)
Jester
Neophyte Poster
Posts: 36
Joined: Mon Jul 07, 2008 2:33 pm

Post by Jester »

Yeah I solved it kinda like you guys said with a "IsInArea" script :) Although I was more frustrated that it wouldn't work with changing the resource info. I dislike stuff not working :P
Pierce
Forum Regular
Posts: 420
Joined: Thu Feb 02, 2006 8:33 am

Post by Pierce »

What does your ore.cfg exactly look like and of course the
part of the mining script that is responsible for harvesting?
User avatar
CWO
POL Expert
Posts: 1160
Joined: Sat Feb 04, 2006 5:49 pm

Post by CWO »

Just a thought, is this area with near infinite resources appended to the end of the ore.cfg file or inserted at the beginning? POL reads the config files from top to bottom and anything that comes later overrides anything that comes before. So you want your near infinite area at the bottom so it overrides and covers anything that would already be in that area.
Jester
Neophyte Poster
Posts: 36
Joined: Mon Jul 07, 2008 2:33 pm

Post by Jester »

CWO wrote:Just a thought, is this area with near infinite resources appended to the end of the ore.cfg file or inserted at the beginning? POL reads the config files from top to bottom and anything that comes later overrides anything that comes before. So you want your near infinite area at the bottom so it overrides and covers anything that would already be in that area.

Yeah, it was at the bottom. I fixed it though by using a if statement like suggested to use an alternative value for oreamount :)
Post Reply