@flexike
Great script, a few pointers:
1. In the walkToShrimp task, in verify, might want to change <= to just <, it will never be equal anyways because of you if statement in your main but if in the future you want to change anything it might mess it up.
2. In the walkToShrimp task, in execute, might want to think about adding a sleep after the walking event (SleepUntill(() -> ShrimpSpot.contains(myPlayer()), 2000). Again, not necessary but better safe than sorry.
3. In LumbyFishShrimps task, in execute, I would suggest also checking if the fishing spot is within the fishing location. I would also suggest you look into the use of osBot filters.
4. In LumbyFishShrimps task, in execute, before you interact with the spot you might also want to check if it has that action you are trying to do. Again this is just to double check you got to the right place and you don't try to interact with the wrong spot.
Filter<NPC> spotFilter = new Filter<NPC>(){
public boolean match(NPC npc){
return npc.getName().equalsIgnoreCase("Fishing spot") && npc.hasAction(fishingType) && fishingArea.contains(npc) && script.getMap().canReach(fishingSpot);
}
};
5. In LumbyFishShrimps task, in execute, I dont see any reason to sleep until your inv is filled as you are not interacting with the spot if you player is animating anyways. In my opinion that sleep will only cause delay and problems.
6. In LumbyFishShrimps task, in execute, again look into filter for the fishing net, also interact and then sleep (it might spam click the pickup).
if(fishingNet.interact("Take")){
Sleep.sleepUntil(() -> script.getInventory().contains("Small fishing net"), 2000);
}
7.In DropTask, in execute, I would sleep untill inv is empty/only contains the net.
8. In WalkToTrees, in execute, again sleep for the walk. Same with the walkToOak
9. In OakWoodCutTask, in verify, again < and not <= with the finalWcLvl, right now it will train until the final level + 1. In execute, filters xD.
10. In TreeWoodCutTask, just filters
11. In AIO (main), pretty sure dismissing level up msgs is pretty useless as they will stop the animation anyways and once you interact again they will auto dismiss.
A few tips:
- Go over as much of the API as you possibly can.
- Test your script logic with flow charts, make sure you get all of the end situations (Do them in your head like me if you can't, no one really writes them down outside of school )
- Test your script by running it for as long as possible with babysitting it. This will probably show you anything you missed .
- Keep writing scripts because you are a great script writer.
Over all, great script man. Looks like you are a natural .