Harvest Resource Questions
Posted: Tue May 23, 2006 11:47 pm
In the POL docs the HarvestResource function is defined as:
I am trying to figure out how to regulate the number of resource units I get from chopping a tree. As I understand it I can change the value for b and that will determine the maximum units harvested per each function call. Now if I want to make the resources run out faster but not give all the resources to the player I can do this:
but is there a way to control that on the function call side of the equation? Will changing the value of b affect how many of the actual resources get sent to the player during the whole process of lumberjacking one tree? As it is with a .1 lumberjacking the script will give as many as 70 logs to my player. That seems just a bit high for a .1 skill level.
My question is where is a defined? Is it a random number generated by the core?HarvestResource( resource, x, y, b, n )
Where: resource is a string, x and y are integer world coordinates, b is an integer and n is an integer
Attempts to harvest a resource from a location.
Notes: Harvests a*b resource units, where 0 is less than or equal to 'a' and 'a' is less than or equal to n. Thus you can request 0-40 units in groups of 5, etc.
I am trying to figure out how to regulate the number of resource units I get from chopping a tree. As I understand it I can change the value for b and that will determine the maximum units harvested per each function call. Now if I want to make the resources run out faster but not give all the resources to the player I can do this:
Code: Select all
var wood_amount - := HarvestResource( "wood", tree.x, tree.y, 1, 10, me.realm );
wood_amount := CInt(wood_amount/2);