MMOMinion

Full Version: gathering nodes, gather attemps and bot rotation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello,

first of all im really sorry if this seems... repetitive because i've seen many ppl had been posting about gatherer skills are not being use on specific gather attempts.

so far what i've found
[Image: nCHCB5x.png]
from the dev module we can see the part "gatherattempts"
as for normal mining nodes, it starts with value of 4. as your character swing, the value decrease by one. with that in mind, i decided to put 3 in the skill manager. so that, the bot will use the specific skill before before 'second' attempt which will be 3 as will be shown by the dev module.
[Image: WDIHuJs.png]
but still the bot will keep on using the skill before the first gathering attempt.

next i decided to take a look into the skillmgr.lua
under the function of skillmgr.gather i've found how the bot check before using skill
Code:
            if ((skill.gpmin > 0 and Player.gp.current > skill.gpmin) or
(skill.gpmax > 0 and Player.gp.current < skill.gpmax) or
(skill.gatherattempts > 0 and node.gatherattempts <= skill.gatherattempts) or
(skill.hasitem ~="" and not NodeHasItem(skill.hasitem)) or
(skill.isunspoiled == "1" and not IsUnspoiled(node.contentid)))
then castable = false
end
from the code, the bot will use the skill if the gatherattempts in dev module is bigger than the one i've put in the skill manager, which is somehow... different from what we want.

i've decided to alter the code into something
Code:
            if ((skill.gpmin > 0 and Player.gp.current > skill.gpmin) or
(skill.gpmax > 0 and Player.gp.current < skill.gpmax) or
(skill.gatherattempts > 0 and node.gatherattempts < skill.gatherattempts) or
(skill.gatherattempts > 0 and node.gatherattempts > skill.gatherattempts) or
(skill.hasitem ~="" and not NodeHasItem(skill.hasitem)) or
(skill.isunspoiled == "1" and not IsUnspoiled(node.contentid)))
then castable = false
end
but still the bot will not use the skills at second attempt or when dev module shown gathering attempt as 3 but if i put 4 the bot will use the skill before first attempt.

so i've conclude that the bot only check for one time before the first swing. although i believe the bot counts every swing as i've seen swingcount in gather.lua
Code:
    newinst.swingCount = 0

i cant fix the bot myself as im not really good in coding but i hope this will give an insight for the dev and to ppl with coding skills.

lastly, i would like to apologize if this not really helping >.<
You're misreading the skill condition. If you expand it further, you will see that it says "Gather Attempts Left >".
By putting "3" in this value, it will only be valid on the first attempt since 4 > 3.

If you're wanting to use a specific skill only if the attempt number is exactly equal to, I can add another condition that does this.
i see, thank you for clearing that up. my bad but i think that would be nice too because that will work nicely with skills such as solid reason on unspoiled node. dont wanna bot use that before opening the unreachable slot(unless i missed something on that part too)