Author Topic: Gaderian's Remove Trap trainer  (Read 15340 times)

0 Members and 1 Guest are viewing this topic.

Offline quammibox

  • Jr. Member
  • **
  • Posts: 10
  • Activity:
    0%
  • Reputation Power: 1
  • quammibox has no influence.
  • Gender: Male
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Gaderian\'s Remove Trap trainer
« Reply #15 on: November 13, 2020, 08:51:11 PM »
0
No, the puzzle does not solve - im not sure what to edit - but i am not really experiencing any lag. and it flew through to 77.

any suggested edits?


Post Merge: November 13, 2020, 08:56:19 PM
Can you describe what happens?
Does it solve puzzles? I expect that it does not.

Since it gained to 77, your setup must be correct.
I suspect internet lag/packet loss. How many retry attempts have you set? There is a variable that controls this feature

Gaderian


I am now at 80.9  - did 77 to 80.9 by hand  - Im curious what the time to complete one puzzle is - at this level. Like after 5 minutes should i reset it?
« Last Edit: November 13, 2020, 08:56:19 PM by quammibox »

Offline GaderianTopic starter

  • Elite
  • *
  • *
  • Posts: 486
  • Activity:
    0%
  • Reputation Power: 10
  • Gaderian barely matters.Gaderian barely matters.
  • Respect: +50
  • Referrals: 3
    • View Profile
Re: Gaderian's Remove Trap trainer
« Reply #16 on: November 14, 2020, 01:08:31 PM »
0
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 1


That 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:
Code: easyuo
  1. 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

"Go ahead ask me: 'Should I use hard waits or timers?'"
You say:"Should I"
Gaderian:"Timers!"
You Say:"use hard waits or timers?"

The serious side of timer use is illustrated here: http://www.scriptuo.com/index.php?topic=12094.msg101926#msg101926

However, every time I go back and look at this [AutoLooter] script, I realize I had wrote it in my zen state of EUO scripting - so it makes my brain hurt.

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: Gaderian's Remove Trap trainer
« Reply #17 on: November 14, 2020, 03:19:27 PM »
0
before Garderian  loss his head over this.   Their is a chance  that your toon is bug.,ATL was bug for me.    I have use multiple time and it work,   On one account I can't run the script because he never solde the puzzle.  I had to train on other shard and move skill via stone,  we  try for day to figure it out.    So do myself a favour and try another guy and event other shard to see if the problem stay.   

I event Xfer to test center with my guy and still he was bug.

Offline GaderianTopic starter

  • Elite
  • *
  • *
  • Posts: 486
  • Activity:
    0%
  • Reputation Power: 10
  • Gaderian barely matters.Gaderian barely matters.
  • Respect: +50
  • Referrals: 3
    • View Profile
Re: Gaderian's Remove Trap trainer
« Reply #18 on: November 14, 2020, 03:53:14 PM »
0
before Garderian  loss his head over this.   Their is a chance  that your toon is bug.,ATL was bug for me.    I have use multiple time and it work,   On one account I can't run the script because he never solde the puzzle.  I had to train on other shard and move skill via stone,  we  try for day to figure it out.    So do myself a favour and try another guy and event other shard to see if the problem stay.   

I event Xfer to test center with my guy and still he was bug.

To be fair, when this was happening, I also tried running it on Atlantic and was able to gain. I was having great difficulty with lag (packet loss) to Atlantic when The Ghost was doing this. It helped me write the version 2.1 to add the repeats for the clicks. :) I was only able to solve the puzzle about 1 in 4 or 1 in 5 attempts when that was happening. Atlantic was suffering that night. ;)

Gaderian
"Go ahead ask me: 'Should I use hard waits or timers?'"
You say:"Should I"
Gaderian:"Timers!"
You Say:"use hard waits or timers?"

The serious side of timer use is illustrated here: http://www.scriptuo.com/index.php?topic=12094.msg101926#msg101926

However, every time I go back and look at this [AutoLooter] script, I realize I had wrote it in my zen state of EUO scripting - so it makes my brain hurt.

Offline quammibox

  • Jr. Member
  • **
  • Posts: 10
  • Activity:
    0%
  • Reputation Power: 1
  • quammibox has no influence.
  • Gender: Male
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Gaderian's Remove Trap trainer
« Reply #19 on: November 14, 2020, 04:16:29 PM »
0
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 1


That 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:
Code: easyuo
  1. 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


OK, first off - thank you for being so responsive and thorough. I feel bad for having the issue but i looked at your previous response where you spoke about lag spikes and such, and even though it did not appear to me that i was lagging at all - i did shut off about 20 things running on my computer and all my browsers and such. When I did that, I immediately began solving puzzles. In fact, I gm'd it a lot faster than expected. I did nothing to the script, i just closed mt status bar, skill menu and shut down everything but UO and EasyUO - it ran flawlessly after that - with just one hiccup where it got caught in a loop of sorts. when that happened, I just finished the puzzle by hand - restarted on a fresh puzzle and it ran smooth the rest of the time.

Thank you for your Script and for your continued support!  :angel:

Offline GaderianTopic starter

  • Elite
  • *
  • *
  • Posts: 486
  • Activity:
    0%
  • Reputation Power: 10
  • Gaderian barely matters.Gaderian barely matters.
  • Respect: +50
  • Referrals: 3
    • View Profile
Re: Gaderian's Remove Trap trainer
« Reply #20 on: November 14, 2020, 04:25:28 PM »
0
So with that much stuff open on your computer, had you minimized the UO Client?

I ask that because it will not work if the client is minimized. The attempt to read the pixel on the UO client will always return no data when trying to read the results of the puzzle attempt.

Gaderian
"Go ahead ask me: 'Should I use hard waits or timers?'"
You say:"Should I"
Gaderian:"Timers!"
You Say:"use hard waits or timers?"

The serious side of timer use is illustrated here: http://www.scriptuo.com/index.php?topic=12094.msg101926#msg101926

However, every time I go back and look at this [AutoLooter] script, I realize I had wrote it in my zen state of EUO scripting - so it makes my brain hurt.

Offline GaderianTopic starter

  • Elite
  • *
  • *
  • Posts: 486
  • Activity:
    0%
  • Reputation Power: 10
  • Gaderian barely matters.Gaderian barely matters.
  • Respect: +50
  • Referrals: 3
    • View Profile
Re: Gaderian's Remove Trap trainer
« Reply #21 on: November 14, 2020, 05:15:10 PM »
0

I tried a different computer (I was running UO in macOS under Parallels Desktop) and it works.  May be an issue running it under VM, but that won't trouble 99% of people.

I would expect that if there is an issue it would be with the OCR reading pixels. Maybe someday I can fire it up on my Mac and see what happens...

Gaderian
"Go ahead ask me: 'Should I use hard waits or timers?'"
You say:"Should I"
Gaderian:"Timers!"
You Say:"use hard waits or timers?"

The serious side of timer use is illustrated here: http://www.scriptuo.com/index.php?topic=12094.msg101926#msg101926

However, every time I go back and look at this [AutoLooter] script, I realize I had wrote it in my zen state of EUO scripting - so it makes my brain hurt.

Offline quammibox

  • Jr. Member
  • **
  • Posts: 10
  • Activity:
    0%
  • Reputation Power: 1
  • quammibox has no influence.
  • Gender: Male
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Gaderian's Remove Trap trainer
« Reply #22 on: November 14, 2020, 09:54:44 PM »
0
So with that much stuff open on your computer, had you minimized the UO Client?


i did minimize briefly (literally 1.5 seconds) but that was not an issue - I recall watching it look in the first three boxes for like 15 minutes. that's when i stopped it, finished the puzzle by hand and restarted it .

Offline gabrielo

  • Jr. Member
  • **
  • Posts: 16
  • Activity:
    0%
  • Reputation Power: 1
  • gabrielo has no influence.
  • Respect: +1
  • Referrals: 0
    • View Profile
Re: Gaderian's Remove Trap trainer
« Reply #23 on: December 05, 2020, 07:10:44 PM »
0
Thank you very much for this script, I finally managed to GM with it.  Once it gets going the gains motor, however, I was getting about 5.0 points of gain and it would stop.  For me I watched it when it got stuck and it just didn’t solve the puzzle and would repeat the same sequence of colours every 2 or 3 minutes.  The solution in my case was to manually solve the puzzle and start the script again and within a few minutes the script would start solving the puzzle and gaining.  May not be the case for everyone, but it worked well for me.

Offline vva

  • Restricted
  • *
  • Posts: 1
  • Activity:
    0%
  • Reputation Power: 1
  • vva has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Gaderian's Remove Trap trainer
« Reply #24 on: December 28, 2020, 04:59:12 PM »
0
Thanks! :o

Offline Crisis

  • Global Moderator
  • *
  • *
  • Posts: 2998
  • Activity:
    3.4%
  • Reputation Power: 41
  • Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.
  • Gender: Male
  • Scripting well enough to break things!
  • Respect: +205
  • Referrals: 2
    • View Profile

Offline formerlyrara

  • Full Member
  • ***
  • Posts: 137
  • Activity:
    0%
  • Reputation Power: 2
  • formerlyrara has no influence.
  • Respect: +19
  • Referrals: 0
    • View Profile
Re: Gaderian's Remove Trap trainer
« Reply #26 on: January 29, 2021, 02:09:42 PM »
0
Works like a champ - already up to 80.5. Super awesome script.
« Last Edit: January 29, 2021, 02:11:23 PM by formerlyrara »

Offline wi

  • Jr. Member
  • **
  • Posts: 13
  • Activity:
    0%
  • Reputation Power: 1
  • wi has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Gaderian's Remove Trap trainer
« Reply #27 on: November 17, 2021, 08:44:41 AM »
0
Works Great!

Thank you!
and once again, A big Thanks to everyone that shares their work here with us/me (70% plus...of my skills would still be at zero if it wasn't for all of you) so thank you!

Remove trap...(started yesterday)
paid training 28.? to 75 unbelievably fast!!!
switched over and got stuck at 98.3...finish box manually, restarted script and was at 100 within an hour...

Started yesterday and 100.0 this morning....I'd say it works very well  8)



Offline GameOgre

  • Newbie
  • *
  • Posts: 2
  • Activity:
    0%
  • Reputation Power: 1
  • GameOgre has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Gaderian's Remove Trap trainer
« Reply #28 on: February 12, 2023, 03:43:04 AM »
0
I hate to necro a year old thread, but this is the only script I've found to work this skill with the circuit kit.
Does it only work for EasyUO or is there a way to get it to run properly on Razor Enhanced?

Offline GaderianTopic starter

  • Elite
  • *
  • *
  • Posts: 486
  • Activity:
    0%
  • Reputation Power: 10
  • Gaderian barely matters.Gaderian barely matters.
  • Respect: +50
  • Referrals: 3
    • View Profile
Re: Gaderian's Remove Trap trainer
« Reply #29 on: February 19, 2023, 04:14:02 PM »
0
I am not familiar with Razor Enhanced and it's ability to interact with gumps. This is designed, of course, to run with easyuo, which you can still run with Razor/Razor Enhanced, but you have to use the OSI client. Easyuo doesn't work with the 64 bit client - CUO.
"Go ahead ask me: 'Should I use hard waits or timers?'"
You say:"Should I"
Gaderian:"Timers!"
You Say:"use hard waits or timers?"

The serious side of timer use is illustrated here: http://www.scriptuo.com/index.php?topic=12094.msg101926#msg101926

However, every time I go back and look at this [AutoLooter] script, I realize I had wrote it in my zen state of EUO scripting - so it makes my brain hurt.

Tags: