You need to describe what it does.
You can't imagine how many hours I have watched this script run, but I have trained about 4-5 characters with it that retained the skill. I have retrained a character on test center probably a dozen times to test issues. I have probably watched this run (not to count programming and debugging) for 200 hours or more.
Issues I have witnessed (some fixed in the script, so may not happen to everyone else):
1) kalocr.txt not in the correct folder (kalocr.txt belongs in the same folder/subdirectory as your Easyuo.EXE program)
2) game gump moving off screen
3) the slots not assigned the color (this is a lag issue where the click is actually dropped)
4) bad kalocr.txt version (this was out there from the late fall 2019 to winter 2020 - I have removed all the bad kalocr.txt versions. So if your kalocr is version 6.10 or higher then it is fine.)
5) the character reaches it's skill point limit of 700 or 720 and now the puzzles are solved but no gains (Admit it, I am not the only one that has done this - you have too!
)
These puzzles are solving the classic game "Mastermind". Here is the basic logic in 2.1:
Phase 1:
If the puzzle is reset or purchased new so the puzzle starts with no saved colors from the previous attempt:
-Start by using 2 slots for each color
-Cycle through the colors
-Set how many slots we have used as the 'highest used', but reset to 2 if no color matches (because the left over colors in other slots do not give false-positive results)
-keep cycling until either 5 colors have been accounted for or all but the last color have been tried (assume any remaining part of the count is that last color - an optimization)
-keep track of the last color without a match (this is sometimes the last color tried, when the untested color has the assumed matches remaining - it was supposed to be an optimization, but I did not take advantage of it fully to skip over resetting the same color on the slots)
-If correct and wrong slots add up to how many slots we used, then increase the slots to use by 1.
continue that cycle until we know the colors and how many for each.
Phase 2:
-set all 5 slots to a non-used color up to the high used mark
-for each color, set the next available slot with the color to test if it is placed correctly
-once all 5 have been set, the puzzle will reset to fresh
If the puzzle is not solved with the solution at the end of Phase 2:
-use a routine to find a non-used color and set all 5 slots to this color, then go back to Phase 1That is everything that must happen in the version 2.1. If at any time a residual color is left from a previous step, then you ARE experiencing lag. It means the click to set the color was dropped on the Internet and you will not get accurate results. All the script's logic to solve the puzzle is invalid when that happens. It is not a scripting problem. Since I can't watch it on your computer, you have to be able to evaluate this yourself.
Now let's say that you are experiencing this 'lag', it is not an insult or excuse. I had it happen to me, too. This is the reason the version 2.1 exists. My simple solution was to repeat the click loop attempt a number of times. The assumption is that you are getting enough traffic through for the connection not to drop completely, so you may be able to solve puzzles when the network traffic works. We already know that this works to solve the puzzles, we just have to overcome these "dropped" packets.
You can increase how many attempts it makes to click by adjusting this variable near the top of the script, immediately after the commented header:
set %HowManyAttemptsToSet 1 ; If you are experiencing internet issues, you can set this to more than 1
Setting it to 2 means it will repeat the click operation to set the color slot 2 times, 3 = repeat 3 times, etc. It is very direct.
I have thought about this for a long time and how to make it more resilient. Here is my unimplemented idea:
After the script clicks to select the color for each slot:
-insert a test that the color is what I expect and repeat this click/check until it passes. (There is the concept for the improvement: If someone wanted to post the update here in this thread, I wouldn't be offended and would link to it in the header as long as it is posted here in the thread.)
Before I would consider making a new version of this, you should run the Basic version. It is much slower. There is probably no optimizations in any of the logic. There are 2x-3x more clicks to solve each puzzle. It is much easier to follow and exposes missed clicks (internet lag/dropped packets) because it sets all 5 slots to each color. If a slot does not get the same color as the rest of the turn, then clearly clicks are being dropped. However it also solves the puzzles without requiring the player to click and think - which is the goal to this
training script.
Training scripts like this one are essentially disposable. Once the skill is trained, we do not go back to use it, unless for a different character/account.
Contrast training with scripts used for playing, like a healer or loot script that we use again and again. Optimizations here are much more useful!
I did the optimized version when I was out of work recuperating from surgery and I wanted something to do. I was bored. It worked and I have shared it because it is useful. The basic one works, too, it just takes longer.
So give that original version a shot and let me know how it performed for you. Pay attention to the colors being set as it investigates and solves the puzzle.
Gaderian