AutoHotkey Community

It is currently May 25th, 2012, 1:33 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: EVE Online Script
PostPosted: July 21st, 2006, 7:22 pm 
I have an eve online script that I am trying to get to work that is working 100% on my computer but not on others and I suspect it has to do with the fact that i use colors to see if something is on their screen. Anyone who is willing to help me with this code or has EVE online please post here. Thanks

[Moderator's note: duplicate post, removed the other (problem with colors)]


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 21st, 2006, 7:28 pm 
Offline

Joined: July 18th, 2006, 12:18 pm
Posts: 403
What is the script doing in the game

and ye i would use the matrix search instead pixel and image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 21st, 2006, 9:01 pm 
What exactly is Matrix search? Does it search an area for a color? The script macro mines for the user and tries to use colors to know when the approach button is available or when it is in range to mine, etc. But I believe colors are different on different comps even when I make the settings the same.


Report this post
Top
  
Reply with quote  
 Post subject: Eve Online
PostPosted: July 24th, 2006, 3:21 pm 
I also play eve. can you post the script so i can test it on mine. Maybe we can work togeather on it. Also i have been buildin a script myself and have come accross the same problem. Have u tried using the same window resolution you used on you computer? i found that if the resolution changes the mouse locations also do.


Report this post
Top
  
Reply with quote  
 Post subject: Just did it for fun
PostPosted: December 23rd, 2006, 1:28 am 
I HATE MINING in Eve. (but I love the ISK :lol: )
So I did a little time programming here. You can repeatedly mine/haul back to station in a safe zone. I will try to further develop the script, but I think you could just use the following code:

Code:
SetKeyDelay, 250
SetDefaultMouseSpeed, 10

InteliSleep(sec)
{   
   cnt := 0
   mvtime := 0
   Random, mvtime, 10, 60
   Loop, %sec%
   {
      cnt := cnt + 1
      if cnt >= %mvtime%
      {
         Random, randx, 1, 1279
         Random, randy, 1, 1023
         MouseMove, %randx%, %randy%
         Random, mvtime, 10, 60
         cnt := 0
      }
      Sleep, 1000
   }
}

Loop
{
   WinWait, EVE,
   IfWinNotActive, EVE, , WinActivate, EVE,
   WinWaitActive, EVE,   
   Sleep, 10000

   ; UnDock
   MouseClick, left,  16,  995
   InteliSleep(30)
   ;Sleep, 30000

   ; Full spd
   MouseClick, left,  685,  969
   InteliSleep(2)
   MouseClick, WheelUp, 600, 500, 10
   InteliSleep(10)
   ;Sleep, 10000

   ; Select DST
   MouseClick, left,  1080,  227
   InteliSleep(2)
   ;Sleep, 4000

   ; Jump
   MouseClick, left,  996,  128
   InteliSleep(60)
   ;Sleep, 60000

   ; Select Steroid
   MouseClick, left,  1071,  285
   InteliSleep(2)
   ;Sleep, 4000

   ; Approach
   MouseClick, left,  960,  127
   InteliSleep(120)
   ;Sleep, 120000
   
   ; Press F1
   Send {F1}
   InteliSleep(1)

   ; Press F2
   Send {F2}
   InteliSleep(1)

   ; Lock
   MouseClick, left,  1093,  130
   InteliSleep(10)
   ;Sleep, 10000
   
   ; Mining time
   InteliSleep(365)
   ;Sleep, 400000
   
   ; Select Station
   MouseClick, left,  1083,  188
   InteliSleep(4)
   ;Sleep, 2000

   ; Dock
   MouseClick, left,  1028,  128
   InteliSleep(100)
   ;Sleep, 120000

   ; Move Cargo
   MouseClickDrag, left, 982, 942, 807, 845
   InteliSleep(10)
   ;Sleep, 30000
}


How the hell can you use this ? Simple: AutoIt and a stop watch. All the followind coordinates go @ 1280x1024 resolution. Here it goes:

1. start Eve
2. select on the overview only stations, asteroid belts, asteroid types
3. sort by name - upper sort (so station is 1st, asteroid belts next, then ore) and save
4. start AutoIt & ALT-TAB to Eve
5. press the undock button
6. press the max speed dial
7. press on the location of the desired asteroid belt
8. press jump
9. press first ore slot on the overview
10. press approach
11. press lock
12. press on the station slot
13. press dock
14. mark 2 drag points by clicking in the cargo window and items window
15. switch back and stop AutoIt

You now should have the coordinates.
Now some other info:

- InteliSleep does the following: sleeps a number of seconds (taken as param) and it randomly moves the mouse on the screen at a randomly timing from 10 - 60 secs provided the delay given is long enough to reach the mouse move code.

- UnDock - presses the corner button. Take your first coordinate and put it here. Do allow some slack, cause some undockings are laggy and take long.

- FullSpeed. Why ? 2 reasons for better avoiding unpleasant situations. 1st if you didn't get outside in the time proposed it gives you more wait time, because it's not essential to accelerate at exit. 2nd is that some asteroid fields' position could jam you into the station. The wheel-up is just for design :P

- Select DST and Jump. Will get you to your asteroid belt. Allow proper timing by using your stopwatch + added 10 secs for the ship to turn there. Think about coliding with an incoming ship that could increase your warp time greatly. It is essential to be out of warp when @ asteroid field

- Select Steroid & Approach - only stopwatch determined. Put here the time it gets your ship bumped into the target.

- Now insert the F keys that get your mining equip started then get to the lock sequence.

- Do the math about the time it takes you to fill your hold.

- Select station & Dock. Allow proper timing for jumping/docking

- Make your cargo drag now, using the 2 designated points.

This is all for now. Works pretty good for me. I've left it alone for 8 hrs and was still doing it's job when I checked it.
Now I'm currently on the thinking phase. Should improve it soon, by taking one step at a time the time and position dependency.
What would be great to find out is how Eve client renders it's api. I think that they have some skinned listboxes, windows and buttons. I will probably concentrate on this matter. It should be sufficient if you can find a window location in the client, also the button locations and the listbox items in the overview. Using a proper database (dictionary) you could get some great AI engine in place.
Please post your code if you advanced in this matter.
Regards


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 23rd, 2007, 12:50 pm 
Offline

Joined: July 19th, 2007, 1:13 am
Posts: 12
Location: Sydney
Hello there EVE players :)
I've been checking around and I saw your code; I adopted it and modify it for myself, therefore I made some changes. Please check it and reply me if you can do some improvements on it.

I am also looking forward to change things and to try to find out how to do pixel/image search to find out when the cargo is full or not in a given range of pixels ... and Dock to station. The problem is that i dont know how to do that. Any help would be apreciated.

Another thing would be nice to check if the shield/armour is going red , than you could go and dock again.

The major problem that i have is that when an Asteroid is Depleeted , than my miners go crazy and inverse the program( when they should be mining they are not .. and so on). That blinking green problem on turets is also a problem. Meaning that they sometimes still stay in mining state after the asteroid is vanished.

this is the code, please feel free to ask anything.

Code:

SetKeyDelay, 200
SetDefaultMouseSpeed, 15

InteliSleep(sec)
{   
   cnt := 0
   mvtime := 0
   Random, mvtime, 10, 30
   Loop, %sec%
   {
      cnt := cnt + 1
      if cnt >= %mvtime%
      {
         Random, randx, 200, 1000
         Random, randy, 200, 800
         MouseMove, %randx%, %randy%
         Random, mvtime, 10, 30
         cnt := 0
      }
      Sleep, 1000
   }
}

;Start Main Program
Loop
{
 Loop, 5
 {
   WinWait, EVE,
   IfWinNotActive, EVE, , WinActivate, EVE,
   WinWaitActive, EVE,   
   Sleep, 3000
   UnDock(1)
   GoToAB1(1)
   ; Mining time
   MiningCicle(11)
   Dock(1)
   Unload(1)
 }

 Loop, 5
 {
   WinWait, EVE,
   IfWinNotActive, EVE, , WinActivate, EVE,
   WinWaitActive, EVE,   
   Sleep, 3000
   UnDock(1)
   GoToAB2(1)
   ; Mining time
   MiningCicle(10)
   Dock(1)
   Unload(1)
 }

 Loop, 5
 {
   WinWait, EVE,
   IfWinNotActive, EVE, , WinActivate, EVE,
   WinWaitActive, EVE,   
   Sleep, 3000
   UnDock(1)
   GoToAB3(1)
   ; Mining time
   MiningCicle(10)
   Dock(1)
   Unload(1)
 }
}
;End Main Program

UnDock(Un)
{
   Un := 1
   Loop, %Un%
   {
   ; UnDock
   MouseClick, left,  22,  1016
   InteliSleep(30)
   ;Sleep, 30000
   ; Full spd
   MouseClick, left,  688,  994
   InteliSleep(2)
   MouseClick, WheelUp, 600, 500, 25
   InteliSleep(10)
   ;Sleep, 10000   
   }
}

GoToAB1(Go)
{
   Go := 1
   Loop, %Go%
   {
   ; Select BM
   MouseClick, left,  172,  177
   InteliSleep(1)
   ; right click BM
   MouseClick, right,  172,  177
   InteliSleep(1)
   ; Approach BM
   MouseClick, left,  280,  187
   InteliSleep(60)
   ; Full stop
   MouseClick, left,  595,  994
   InteliSleep(20)
   ; Just to make sure :)
   Send {Ctrl}+{Space}
   InteliSleep(0)
   ; Start AB
   ;MouseClick, left,  765,  953
   }
}


GoToAB2(Go)
{
   Go := 1
   Loop, %Go%
   {
   ; Select BM
   MouseClick, left,  172,  197
   InteliSleep(1)
   ; right click BM
   MouseClick, right,  172,  197
   InteliSleep(1)
   ; Approach BM
   MouseClick, left,  280,  207
   InteliSleep(60)
   ; Full stop
   MouseClick, left,  595,  994
   InteliSleep(20)
   ; Just to make sure :)
   Send {Ctrl}+{Space}
   InteliSleep(0)
   ; Start AB
   ;MouseClick, left,  765,  953
   }
}

GoToAB3(Go)
{
   Go := 1
   Loop, %Go%
   {
   ; Select BM
   MouseClick, left,  172,  217
   InteliSleep(1)
   ; right click BM
   MouseClick, right,  172,  217
   InteliSleep(1)
   ; Approach BM
   MouseClick, left,  280,  227
   InteliSleep(60)
   ; Full stop
   MouseClick, left,  595,  994
   InteliSleep(20)
   ; Just to make sure :)
   Send {Ctrl}+{Space}
   InteliSleep(0)
   ; Start AB
   ;MouseClick, left,  765,  953
   }
}

Dock(D)
{
  D := 1
  Loop, %D%
  {
   ; Select Station
   MouseClick, left,  165,  160
   InteliSleep(1)
   ; Aproach
   MouseClick, right,  165,  160
   InteliSleep(1)
   MouseClick, left,  200,  170
   InteliSleep(80)
   ; Aproach
   MouseClick, right,  165,  160
   InteliSleep(1)
   MouseClick, left,  200,  170
   InteliSleep(10)
   ; Full spd
   MouseClick, left,  688,  994
   InteliSleep(10)
   ; Dock
   MouseClick, right,  165,  160
   InteliSleep(1)
   MouseClick, left,  230,  185
   InteliSleep(20)
   ; Dock
   MouseClick, right,  165,  160
   InteliSleep(1)
   MouseClick, left,  230,  185
   InteliSleep(15)
  }
}

Unload(U)
{
   U := 1
   Loop, %U%
   {
    ; Select all from cargo
    MouseClick, left, 92, 974
    InteliSleep(1)
    MouseClick, left, 92, 974
    InteliSleep(1)
    Send, {Control down}
    InteliSleep(1)
    Send, {a}
    InteliSleep(1)
    Send, {Control up}
    InteliSleep(1)
    ; Move Cargo
    MouseClickDrag, left, 92, 974, 850, 110
    InteliSleep(10)
   }
}

Fire(F)
{
   F := 1
   Loop, %F%
   {
    ; Fire Lasers
    Send {F1}
    Send {F2}
    Send {F3}
    Send {F4}
    Send {F5}
    Send {F6}
    Send {F7}
   }
}

Target(T)
{
   T := 1
   Loop, %T%
   {
    ; Lock 3 targets
    Send, {Control down}
    MouseClick, left, 1000, 212
    InteliSleep(1)
    MouseClick, left, 1000, 232
    InteliSleep(1)
    MouseClick, left, 1000, 252
    InteliSleep(1)
    ;MouseClick, left, 1000, 272
    ;InteliSleep(1)
    ;MouseClick, left, 1000, 292
    ;InteliSleep(1)
    Send, {Control up}
    InteliSleep(1)
   }
}

MiningCicle(times)
{
  Target(1)
  InteliSleep(3)
      Loop, %times%
      {
        Target(1)
        ; Select AST
        MouseClick, left,  850,  70
        InteliSleep(1)
        Fire(1)
        ; Orbit
        ;MouseClick, left,  1019,  151
        ;InteliSleep(1)
        InteliSleep(60)
        ; UNLock ASTEROID
        MouseClick, left,  1086,  151
        Fire(1)
      }
}




Note: I am not a programer, if you can simplify these code of make it more light please feel free to do it and let me know. :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 30th, 2007, 4:06 pm 
I am not a good programmer but it would help me if you would say in what language the programm is written.

Greetings


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 30th, 2007, 6:11 pm 
Online
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8647
Location: Salem, MA
Pinky wrote:
I am not a good programmer but it would help me if you would say in what language the programm is written.

Greetings


Since this is a forum having to do with the AHK programming/scripting language, I would expect most code to be AHK code.
click on the AHK logo at the top of any forum page.

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 30th, 2007, 11:35 pm 
Offline

Joined: July 19th, 2007, 1:13 am
Posts: 12
Location: Sydney
engunneer are you an EVE player? do you have a few minutes to look at the code above , any help would be apreciated. ty.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 30th, 2007, 11:38 pm 
Online
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8647
Location: Salem, MA
I don't have time for games most of the time. I can't look at the code above for actual testing.

I spend my time answering posts here - it's more rewarding and I learn more.

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
PostPosted: May 13th, 2011, 8:27 pm 
run eve in vmware.... run macro outside... here is sample code to make it even harder.

1. pick 4 clickable corner of a selectable area ie ore.. randomize xy coordinated so mouse if clicking on a different region of the selectable icon, and randomize the speed (human achievable speeds) and randomize the placement of the icon withinn the destination window...

miner1(m1)
{
m1 := 1
Loop, %m1%
{
; Select virtual tabbed machine iceminer
MouseClick, left, 164, 93
WinWait, iceminer - VMware Workstation,
IfWinNotActive, iceminer - VMware Workstation, , WinActivate, iceminer - VMware Workstation,
WinWaitActive, iceminer - VMware Workstation,
PixelSearch, Px, Py, 42, 330, 52, 335, 0xf8f8f8, 10, Fast
if ErrorLevel
{
MsgBox,0,Ice Mining Notice,Icicle NOT Found in iceminer Cargo Bay. Switching to next VM...,2
return
}
else
{
MsgBox,0,Ice Mining Notice,Icicle Found in iceminer Cargo Bay. Moving to Orca...,2
Random, mousespeed, 0, 100
SetDefaultMouseSpeed, %mousespeed%
Random, s_iconx, 25, 50
Random, s_icony, 325, 345
Random, d_iconx, 480, 1400
Random, d_icony, 325, 700
MouseClick, left, %s_iconx%, %s_icony%
MouseClickDrag, left, %s_iconx%, %s_icony%, %d_iconx%, %d_icony%
}
InteliSleep(3)

}
}


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: AndyJenk, engunneer, gemisigo, Prankie, Pulover, toddintr, Yahoo [Bot] and 18 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group