As I understand that to be written, a is the random number being generated.
You get a*b... b is sent to the function.
a will be >= 0 and <= n. So by setting n, you are setting the range that a will be in. Then it is multiplied by b, and that's your result.
So 0 would be the minimim ((a=0)*b), and n*b would be the max ((a=n)*b)
With that said, I can't say I know for a fact that's how it works. I know our players don't get anything close to 70 logs per chop, though. That said, we don't use the return value from that function to determine how much wood they get...
Code:
var wood_amount := HarvestResource ("wood", tree.x, tree.y, 1, 8);
if (!wood_amount)
SendSysmessage(me, "There's not enough wood here to chop.");
return 0;
endif
var skill := GetEffectiveSkill (me, SKILLID_LUMBERJACKING);
wood_amount := RandomInt(CINT(skill/33)) + CINT(skill/33) + 1;
if (!wood_amount)
wood_amount := 1;
endif
With this code, they get a reasonable amount, and the tree runs out in a reasonable amount of time. As you can see, though, we don't really use that return value at all, except to see when the tree is all out. Incidentally, the wood.cfg in /regions:
Code:
UnitsPerArea 50
SecondsPerRegrow 1800
Capacity 10000
Range 0 0 5119 4095
It seems possible that the max 8 value is what is coming out, and that when it hits 50, it's all done for that area, and the player has to move on. I haven't tested it extensively, but I wouldn't be surprised to see it that way, or something close.
Hope this helps!