Jump to content

Recommended Posts

Posted

If anyone's intrested, I've done quite a bit of work with text translation and could help. Background color's no problem and even shade variation can be accounted for as long as text color's consistent. I have code for a single symbol translation based on a set accuracy. The only setback is the time needed to map out each letter.

  • 1 month later...
  • Replies 74
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

If anyone's intrested, I've done quite a bit of work with text translation and could help. Background color's no problem and even shade variation can be accounted for as long as text color's consistent. I have code for a single symbol translation based on a set accuracy. The only setback is the time needed to map out each letter.

Yeah, actually, I'd love to see your work. I am in the middle of trying to write a more powerful version of this macro in Python, but would like to see your stab at ocr.

Posted

If anyone's intrested, I've done quite a bit of work with text translation and could help. Background color's no problem and even shade variation can be accounted for as long as text color's consistent. I have code for a single symbol translation based on a set accuracy. The only setback is the time needed to map out each letter.

Hi Trait,

I would like to have a look at that as well. Can you please post or pm me?

cheers,

Muz

  • 1 month later...
Posted

Wow...

Intrest in my work! lol

My mining bot doesn't use text translation. (It DOES produce over 2 mill a night with a frigate though)

My ocr was developed for a card game called HI/LO by moola.com

The principles SHOULD be the same though.

I created a function that reads in an array let's say 10X20 pixels, compares against a text color ( TWO text colors for the card game) and counts that as a hit or miss. By doing this you have 200 checks per letter. You can then set an accuracy count against that to allow for slight background changes. In EVE's case though, the array would be much smaller, maybe a 4X5.

Setup includes a sample of each text letter and making a DB entry that maps out in True/False the array scan. I compare that with what I've just read then total up the matches. If matches > accuracyCheck then you have a match and return that letter.

Still interested? If so, msg me and we can talk more.

:)

Posted

...

And can u give an example of your script? :D

[size="1"]My bear is so cute asleep in the closet, not even drinking vodka. My nuclear bomb name is Natasha.[/size]

Posted (edited)

Pleaze help me!Your bot looks really cool but heres my problem.

I have a retriever mining barge with 2 strip miners.

I windowed the screen and set it to 1280x1024 mode.

I also did the widescreen check.

Every time I start the bot the mouse arrow drifts down to the corner of the screen missing the undock button and it cant undock.

Pleaze reply soon and I hope this is simple to fix! :D

P.S.Do I need premium graphics to use this bot?

Edited by galebob
Posted

Pleaze help me!Your bot looks really cool but heres my problem.

I have a retriever mining barge with 2 strip miners.

I windowed the screen and set it to 1280x1024 mode.

I also did the widescreen check.

Every time I start the bot the mouse arrow drifts down to the corner of the screen missing the undock button and it cant undock.

Pleaze reply soon and I hope this is simple to fix! :D

P.S.Do I need premium graphics to use this bot?

You need to check the script's stored coord's and compare them to your own. If it's missing the undock button, you need to find the part of the script that gives it that location and correct it with your own...

Unless of course you can just move the window to make it work!

Good luck

Posted

Wow...

Intrest in my work! lol

My mining bot doesn't use text translation. (It DOES produce over 2 mill a night with a frigate though)

My ocr was developed for a card game called HI/LO by moola.com

The principles SHOULD be the same though.

I created a function that reads in an array let's say 10X20 pixels, compares against a text color ( TWO text colors for the card game) and counts that as a hit or miss. By doing this you have 200 checks per letter. You can then set an accuracy count against that to allow for slight background changes. In EVE's case though, the array would be much smaller, maybe a 4X5.

Setup includes a sample of each text letter and making a DB entry that maps out in True/False the array scan. I compare that with what I've just read then total up the matches. If matches > accuracyCheck then you have a match and return that letter.

Still interested? If so, msg me and we can talk more.

:D

CODE
Func Translate($Card)

IDini();Import values for our cards

Local $Acrcy = .90 ;--------- Set accuracy level

Local $Cntr = 0

Local $CardC = $Card

Local $CardCt = 0

; - Reset accuracy counter for each card

Local $AcCntr2 = 0

Local $AcCntr3 = 0

Local $AcCntr4 = 0

Local $AcCntr5 = 0

Local $AcCntr6 = 0

Local $AcCntr7 = 0

Local $AcCntr8 = 0

Local $AcCntr9 = 0

Local $AcCntr10 = 0

Local $AcCntrJ = 0

Local $AcCntrQ = 0

Local $AcCntrK = 0

Local $AcCntrA = 0

Local $St = 0 ; Reset variable to hold string trims.

Local $2 = $2id ;Duplicate global ID for card 2

Local $3 = $3id

Local $4 = $4id

Local $5 = $5id

Local $6 = $6id

Local $7 = $7id

Local $8 = $8id

Local $9 = $9id

Local $10 = $10id

Local $J = $Jid

Local $Q = $Qid

Local $K = $Kid

Local $A = $Aid

Do; run compare on 2

$St = StringTrimLeft($2,StringLen($2)-1);Trims one value off the end of string.

$2 = StringTrimRight($2,1)

$CardCt = StringTrimLeft($CardC,StringLen($CardC)-1);Trims one value off the end of string.

$CardC = StringTrimRight($CardC,1)

;TrayTip("Debug:", $St & "/" & $CardCt,10)

;sleep(500)

If $St = $CardCt Then

;TrayTip("Debug:", $St & "/" & $CardCt & " is true",10)

;sleep (500)

$AcCntr2 = $AcCntr2 + 1

$Cntr = $Cntr+1

Else

$Cntr = $Cntr+1

EndIf

until $Cntr > 62

TrayTip("HiLo Ninja: ", "Accuracy count for 2 is :" & $AcCntr2,0)

;sleep(500)

If $AcCntr2/64 > $Acrcy Then

return "2"

Else

$Cntr = 0

$CardC = $Card

$CardCt = 0

EndIf

Do ; run compare on 3

$St = StringTrimLeft($3,StringLen($3)-1);Trims one value off the end of string.

$3 = StringTrimRight($3,1)

$CardCt = StringTrimLeft($CardC,StringLen($CardC)-1);Trims one value off the end of string.

$CardC = StringTrimRight($CardC,1)

If $St = $CardCt Then

$AcCntr3 = $AcCntr3 + 1

$Cntr = $Cntr+1

Else

$Cntr = $Cntr+1

EndIf

until $Cntr > 62

TrayTip("HiLo Ninja: ", "Accuracy count for 3 is :" & $AcCntr3,0)

;sleep(500)

If $AcCntr3/64 > $Acrcy Then

return "3"

Else

$Cntr = 0

$CardC = $Card

$CardCt = 0

EndIf

Do ; run compare on 4

$St = StringTrimLeft($4,StringLen($4)-1);Trims one value off the end of string.

$4 = StringTrimRight($4,1)

$CardCt = StringTrimLeft($CardC,StringLen($CardC)-1);Trims one value off the end of string.

$CardC = StringTrimRight($CardC,1)

If $St = $CardCt Then

$AcCntr4 = $AcCntr4 + 1

$Cntr = $Cntr+1

Else

$Cntr = $Cntr+1

EndIf

until $Cntr > 62

TrayTip("HiLo Ninja: ", "Accuracy count for 4 is :" & $AcCntr4,0)

;sleep(500)

If $AcCntr4/64 > $Acrcy Then

return "4"

Else

$Cntr = 0

$CardC = $Card

$CardCt = 0

EndIf

Do ; run compare on 5

$St = StringTrimLeft($5,StringLen($5)-1);Trims one value off the end of string.

$5 = StringTrimRight($5,1)

$CardCt = StringTrimLeft($CardC,StringLen($CardC)-1);Trims one value off the end of string.

$CardC = StringTrimRight($CardC,1)

If $St = $CardCt Then

$AcCntr5 = $AcCntr5 + 1

$Cntr = $Cntr+1

Else

$Cntr = $Cntr+1

EndIf

until $Cntr > 62

TrayTip("HiLo Ninja: ", "Accuracy count for 5 is :" & $AcCntr5,0)

;sleep(500)

If $AcCntr5/64 > $Acrcy Then

return "5"

Else

$Cntr = 0

$CardC = $Card

$CardCt = 0

EndIf

Do ; run compare on 6

$St = StringTrimLeft($6,StringLen($6)-1);Trims one value off the end of string.

$6 = StringTrimRight($6,1)

$CardCt = StringTrimLeft($CardC,StringLen($CardC)-1);Trims one value off the end of string.

$CardC = StringTrimRight($CardC,1)

If $St = $CardCt Then

$AcCntr6 = $AcCntr6 + 1

$Cntr = $Cntr+1

Else

$Cntr = $Cntr+1

EndIf

until $Cntr > 62

TrayTip("HiLo Ninja: ", "Accuracy count for 6 is :" & $AcCntr6,0)

;sleep(500)

If $AcCntr6/64 > $Acrcy Then

return "6"

Else

$Cntr = 0

$CardC = $Card

$CardCt = 0

EndIf

Do ; run compare on 7

$St = StringTrimLeft($7,StringLen($7)-1);Trims one value off the end of string.

$7 = StringTrimRight($7,1)

$CardCt = StringTrimLeft($CardC,StringLen($CardC)-1);Trims one value off the end of string.

$CardC = StringTrimRight($CardC,1)

If $St = $CardCt Then

$AcCntr7 = $AcCntr7 + 1

$Cntr = $Cntr+1

Else

$Cntr = $Cntr+1

EndIf

until $Cntr > 62

TrayTip("HiLo Ninja: ", "Accuracy count for 7 is :" & $AcCntr7,0)

;sleep(500)

If $AcCntr7/64 > $Acrcy Then

return "7"

Else

$Cntr = 0

$CardC = $Card

$CardCt = 0

EndIf

Do ; run compare on 8

$St = StringTrimLeft($8,StringLen($8)-1);Trims one value off the end of string.

$8 = StringTrimRight($8,1)

$CardCt = StringTrimLeft($CardC,StringLen($CardC)-1);Trims one value off the end of string.

$CardC = StringTrimRight($CardC,1)

If $St = $CardCt Then

$AcCntr8 = $AcCntr8 + 1

$Cntr = $Cntr+1

Else

$Cntr = $Cntr+1

EndIf

until $Cntr > 62

TrayTip("HiLo Ninja: ", "Accuracy count for 8 is :" & $AcCntr8,0)

;sleep(500)

If $AcCntr8/64 > $Acrcy Then

return "8"

Else

$Cntr = 0

$CardC = $Card

$CardCt = 0

EndIf

Do ; run compare on 9

$St = StringTrimLeft($9,StringLen($9)-1);Trims one value off the end of string.

$9 = StringTrimRight($9,1)

$CardCt = StringTrimLeft($CardC,StringLen($CardC)-1);Trims one value off the end of string.

$CardC = StringTrimRight($CardC,1)

If $St = $CardCt Then

$AcCntr9 = $AcCntr9 + 1

$Cntr = $Cntr+1

Else

$Cntr = $Cntr+1

EndIf

until $Cntr > 62

TrayTip("HiLo Ninja: ", "Accuracy count for 9 is :" & $AcCntr9,0)

;sleep(500)

If $AcCntr9/64 > $Acrcy Then

return "9"

Else

$Cntr = 0

$CardC = $Card

$CardCt = 0

EndIf

Do ; run compare on 10

$St = StringTrimLeft($10,StringLen($10)-1);Trims one value off the end of string.

$10 = StringTrimRight($10,1)

$CardCt = StringTrimLeft($CardC,StringLen($CardC)-1);Trims one value off the end of string.

$CardC = StringTrimRight($CardC,1)

If $St = $CardCt Then

$AcCntr10 = $AcCntr10 + 1

$Cntr = $Cntr+1

Else

$Cntr = $Cntr+1

EndIf

until $Cntr > 62

TrayTip("HiLo Ninja: ", "Accuracy count for 10 is :" & $AcCntr10,0)

;sleep(500)

If $AcCntr10/64 > $Acrcy Then

return "10"

Else

$Cntr = 0

$CardC = $Card

$CardCt = 0

EndIf

Do ; run compare on J

$St = StringTrimLeft($J,StringLen($J)-1);Trims one value off the end of string.

$J = StringTrimRight($J,1)

$CardCt = StringTrimLeft($CardC,StringLen($CardC)-1);Trims one value off the end of string.

$CardC = StringTrimRight($CardC,1)

If $St = $CardCt Then

$AcCntrJ = $AcCntrJ + 1

$Cntr = $Cntr+1

Else

$Cntr = $Cntr+1

EndIf

until $Cntr > 62

TrayTip("HiLo Ninja: ", "Accuracy count for J is :" & $AcCntrJ,0)

;sleep(500)

If $AcCntrJ/64 > $Acrcy Then

return "J"

Else

$Cntr = 0

$CardC = $Card

$CardCt = 0

EndIf

Do ; run compare on Q

$St = StringTrimLeft($Q,StringLen($Q)-1);Trims one value off the end of string.

$Q = StringTrimRight($Q,1)

$CardCt = StringTrimLeft($CardC,StringLen($CardC)-1);Trims one value off the end of string.

$CardC = StringTrimRight($CardC,1)

If $St = $CardCt Then

$AcCntrQ = $AcCntrQ + 1

$Cntr = $Cntr+1

Else

$Cntr = $Cntr+1

EndIf

until $Cntr > 62

TrayTip("HiLo Ninja: ", "Accuracy count for Q is :" & $AcCntrQ,0)

;sleep(500)

If $AcCntrQ/64 > $Acrcy Then

return "Q"

Else

$Cntr = 0

$CardC = $Card

$CardCt = 0

EndIf

Do ; run compare on K

$St = StringTrimLeft($K,StringLen($K)-1);Trims one value off the end of string.

$J = StringTrimRight($K,1)

$CardCt = StringTrimLeft($CardC,StringLen($CardC)-1);Trims one value off the end of string.

$CardC = StringTrimRight($CardC,1)

If $St = $CardCt Then

$AcCntrK = $AcCntrK + 1

$Cntr = $Cntr+1

Else

$Cntr = $Cntr+1

EndIf

until $Cntr > 62

TrayTip("HiLo Ninja: ", "Accuracy count for K is :" & $AcCntrK,0)

;sleep(500)

If $AcCntrK/64 > $Acrcy Then

return "K"

Else

$Cntr = 0

$CardC = $Card

$CardCt = 0

EndIf

Do ; run compare on A

$St = StringTrimLeft($A,StringLen($A)-1);Trims one value off the end of string.

$A = StringTrimRight($A,1)

$CardCt = StringTrimLeft($CardC,StringLen($CardC)-1);Trims one value off the end of string.

$CardC = StringTrimRight($CardC,1)

If $St = $CardCt Then

$AcCntrA = $AcCntrA + 1

$Cntr = $Cntr+1

Else

$Cntr = $Cntr+1

EndIf

until $Cntr > 62

TrayTip("HiLo Ninja: ", "Accuracy count for A is :" & $AcCntrA,0)

;sleep(500)

If $AcCntrA/64 > $Acrcy Then

return "A"

Else

$Cntr = 0

$CardC = $Card

$CardCt = 0

EndIf

EndFunc

I use another function to read an .ini file and set what each card SHOULD be.

As I said. You'd have to sample each letter from EVE and translate them. Once you build the alphabet and number index. It's just a matter of figuring out their spacing used for each letter and going from there. I would't use it to read whole sentences though. That'd take forever.

  • 1 month later...
  • 5 months later...
Posted

cheers for the reply. I meant to post back here sooner. I gave the bot another go, and for some reason the problem went away. I did change a couple of things tho. The only major one being that I got the bot to orbit instead of aproach the roid, as I found that if it locked onto a rock that was 10km away, it would start the aproach and then instanly stop, so there was a possibility of the ship drifting out of mining range. I dont really know if this will be a problem in the larger mining ships, but it has no effect on my bantam :mellow:

Other then thats its a wicked little bot. The only thing that I have noticed is that sometimes it doesnt detect that mining has finished, but that only happened once or twice in quite a few runs.

I know, late reply....however, I made a few addtitions to this script also. The most notable is the use of an 'Afterburner' to get you to the asteriods quicker. Just edit the 'main.au3' and change this section... I think I might have changed the "Selected Items" section, so ignore that if need be. You can just add the "Afterburner start and stop" bits to your code. I will edit this code some more and post all my changes when I've finished. Thanks for a great project.

Also, if you are concerned about stopping too close to the 10km limit, just add a sleep timer before the stop ship order, although, I have not had that problem yet, as most of my lasers work from 12km, so I suggest you upgrade your ship to Carrier or Barge class (strip miners FTW!).

For all those interested, yes this does work fine, I've been using it for the past 3 months, you just need to be prepared to edit the code yourself to get it working on your screen layout.

;; -------------------------------------
;; Approach()
;; -------------------------------------
Func Approach()
; Click on the approach button in the overview window.
    Sleep(500)
    If (PixelGetColor($DistandM[0], $DistandM[1]) = 0) Then
        PrintStatus("Approaching.")
        MouseClick("left", $ApproachLoc[0], $ApproachLoc[1], 1, $MouseSpeed)
        Sleep(200)
                ;Fire the Afterburner
        MouseClick("Left", 770, 960, 1, $MouseSpeed)
        
    EndIf
    Do
    ; Wait for the end of the M in "Distance: X,XXX M" in the Overview Info
    Until PixelGetColor($DistandM[0], $DistandM[1]) > 0
; Set speed to 0.0 M/s
    MouseClick("left", $clientWidth / 2 - 43, $clientHeight - 24, 1, $MouseSpeed)
    WaitFullStop()
    Return 5
EndFunc  ;==>Approach

;; -------------------------------------
;; LockTarget()
;; -------------------------------------
Func LockTarget()
    PrintStatus("Locking Asteriod.")
; Stop the afterburner
    MouseClick("Left", 770, 960, 1, $MouseSpeed)
    Sleep(200)
       ; Click on the first button in the Overview Info window.
    MouseClick("left", $TargetLoc[0], $TargetLoc[1], 1, $MouseSpeed)
    Do
; looking for the Red X in the Lock/Unlock button in Overview Info window.
    Until (_ColorGetRed(PixelGetColor($TargetLoc[0], $TargetLoc[1])) > Dec("D0"))
    Return 6
EndFunc  ;==>LockTarget
Posted

do we have any way of reading the IP package out of eve port or reading some info from memory? because simply depending everything on reading pixels on screen is extremely unreliable in many ways: 1.Extremely difficult to setup 2.extremely difficult to achieve cross compatibility 3.extremely difficult to implement smart/contingency/robust routines 4.Have to revise coordinates everytime there is a new patch.

A good example, How do you control drones? (before they introduced hotkeys for it, that is)

  • 2 months later...
Posted (edited)

Bot Updated : Old outdated script removed : Due to conflicts, I do not want to post updated code unless Andraax agrees it would be okay and not a conflict of interest.

Edited by Ealric

My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic]

Posted (edited)

Bot Updated : Old outdated script removed : Due to conflicts, I do not want to post updated code unless Andraax agrees it would be okay and not a conflict of interest.

Edited by Ealric

My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic]

  • 5 months later...
  • 2 months later...
Posted

I downloaded the .exe and gave it a try with all the right gui settings and it undocks just fine, warps to the belt, and sits there. It remains inactive (I let it sit for 2 minutes) until you start trying to do things with the mouse or you alt tab, at which point it flies into action but generally accomplishes nothing more than flying around crazily and never once approaching, targeting, or mining a single asteroid. Any help?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...