Corp Bookmarking Miners (0 viewing)
 | | |
TOPIC: Corp Bookmarking Miners
|
Re: Corp Bookmarking Miners 7 Years, 8 Months ago
|
Karma: 10
|
Got a working mining drone script.
VERY BASIC FUNCTIONS. Will mine the current targeted roids only for now.
Take a look
Warning: Spoiler!
Code: |
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
;By Minesalot basic mining drone operations
;Inspired by Slav and Innominate
/*
vs1.0 - Functional operations
checks for drone type in space
recall them if incorrect
engage them if correct
opens drones in bay if closed
launches the dronetype selected
*/
/* INSTRUCTIONS
Put your Drone overview window in the bottom right corner of the client.
Create 2 groups of drones. Combat & Mine
It does not matter the state you leave Drones in bay, if it is closed, this will open it, if it is open, it only saves .2 seconds
Set your EVE client to use these. Or confirm they are set
Hotkeys Used:
Cntrl + D (All Drones: Return to Drone Bay)
Cntrl + E (All Drones: Engage)
Use Innominates method to save your settings file, to avoid having to go through first run.
*/
SetWorkingDir %A_ScriptDir%\CorpBMImages ; Ensures a consistent starting directory
;set variables
DronesLaunch := "DronesLaunch.png"
DronesInBayOpen := "DronesInBayOpen.png"
DronesInBayClosed := "DronesInBayClosed.png"
DronesInSpaceZero := "DronesInSpaceZero.png"
DronesInSpaceOpen := "DronesInSpaceOpen.png"
DronesInSpaceClosed := "DronesInSpaceClosed.png"
Random, RandomSleep, 300, 450
Random, RandomSleep1, 95, 150
Random, RandomXY, 5, 10
;**********************************************************************************************************
;CHANGE DRONE LAUNCH TYPE HERE :Side note. Could pull an ini read to decide what type to drop in the future
DronesType := "DronesMine.png"
;DronesType := "DronesCombat.png"
;**********************************************************************************************************
IfWinNotActive, EVE - , , WinActivate, EVE - ,
Sleep, %RandomSleep%
CoordMode, Pixel, Window
;Click in some random spot around capicitor to clear any open menues
Random, RandomX, 480, 530
Random, RandomY, 680, 730
MouseMove, %RandomX%, %RandomY%, 8
Click
sleep, %RandomSleep%
;Are there Drones already in space?
;Is drones in space closed?
ImageSearch, FoundX, FoundY, 750, 620, 1024, 750, *30 %DronesInSpaceClosed%
sleep, %RandomSleep1%
If(FoundX != ""){
;Msgbox, "Drones in space is closed"
MouseMove, (FoundX + RandomXY), (FoundY + RandomXY), 10
Click
}
;Is Drones in space open?
ImageSearch, Found1X, Found1Y, 750, 620, 1024, 750, *30 %DronesInSpaceOpen%
sleep, %RandomSleep1%
If(Found1X != ""){
;Msgbox, "Drones in space is Open"
ImageSearch, Found2X, Found2Y, Found1X, Found1Y, Found1X + 100, Found1Y + 100, *30 %DronesType%
If(Found2X != ""){
;Msgbox, "Drones Going Back to Work"
Send, {Ctrl Down}
Sleep 100
Send, e
Sleep 100
Send, {Ctrl Up}
ExitApp
}
Else If(Found2X = ""){
;Msgbox, "Wrong type in space, docking drones"
ImageSearch, FoundX, FoundY, 750, 620, 1024, 750, *30 %DronesInSpaceZero%
sleep, %RandomSleep1%
If(FoundX = ""){
;Dock Drones
Send, {Ctrl Down}
Sleep 100
Send, d
Sleep 100
Send, {Ctrl Up}
}
Loop{ ;Loop until Drones in space = 0
sleep, %RandomSleep1%
ImageSearch, FoundX, FoundY, 750, 620, 1024, 750, *30 %DronesInSpaceZero%
if ErrorLevel = 0
break ; image was found break loop and continue
}
}
}
;Is Drones in bay closed?
ImageSearch, FoundX, FoundY, 750, 620, 1024, 750, *30 %DronesInBayClosed%
sleep, %RandomSleep1%
If(FoundX != ""){
;Msgbox, "Drones in Bay is closed"
MouseMove, (FoundX + RandomXY), (FoundY + RandomXY), 10
Click
}
;Is Drones in bay open?
ImageSearch, Found1X, Found1Y, 750, 620, 1024, 750, *30 %DronesInBayOpen%
sleep, %RandomSleep1%
If(Found1X != ""){
;Msgbox, "Drones in Bay is Open"
ImageSearch, FoundX, FoundY, 750, 620, 1024, 750, *30 %DronesType%
sleep, %RandomSleep1%
If(FoundX != ""){
;Msgbox, % "Found " DronesType " Drones"
MouseMove, (FoundX + RandomXY), (FoundY + RandomXY), 10
Click Right
sleep, %RandomSleep1%
ImageSearch, tempX, tempY, FoundX, FoundY, FoundX + 100, FoundY + 100, *30 %DronesLaunch%
sleep, %RandomSleep1%
If(tempX != ""){
;Msgbox, "Found Launch Drones"
MouseMove, (tempX + RandomXY), (tempY + RandomXY), 10
sleep, %RandomSleep%
Click, Left
sleep, 4000
Send, {Ctrl Down}
Sleep 100
Send, e
Sleep 100
Send, {Ctrl Up}
}
}
}
|
I'll test this for a few days to see if it needs adjusted. and also run some numbers testing. Then I'll put up all the files in a new thread to share.
1st things first. Where to change the script module to run this, and then make another version of this for combat drones to launch them for fight module.
in front of
270: MiningModeEx
or
370: MiningLasersControl()
|
|
|
Last Edit: 2017/05/17 22:20 By Minesalot.
|
|
Re: Corp Bookmarking Miners 7 Years, 8 Months ago
|
Karma: 33
|
Wow, that was quick! Nice job. I went the route of making classes so that it was easier in the long run. I also made it so that they mine a different roid so that they didn't affect EP's ore calculations.
Here's mine. It doesn't loot because I had enough miners so that my looter goes almost full time. Never tried it as tank so others go to it because all my characters are on separate VMs.
In case it isn't obvious, I have code to detect if the drones have shield damage.
Just wondering, how many characters you have?
Warning: Spoiler!Code: |
;Orca Miner 3.0 by innominate
000: Goto()[010+]
001: StopClient(;true;false)[001]
002: CloseEveWindow()[001;001]
003: GroupMode(true;true;false;false)[004;004]
004: CloseEveWindow()[001;005]
005: CustomDelay(;;;;)[003;006;005]
006: FleetMode(true)[002;020+;002;002;002]
010: CheckTraveling()[030+;040+]
020: CheckTraveling()[030+;050+]
025: FleetMode(true)[002;030+;002;002;002]
030: StartEveAndLogin(true)[001+;140;130;030]
040: StartEveAndLogin(true)[001+;070;070;040]
050: StartEveAndLogin(true)[001+;070;100;050]
060: Sleep(600000)[060;090]
070: ReturnHome()[100+;110+]
075: Barrier(1)[080;075;085]
080: PlanetManager()[900+;080;085]
085: Barrier(2)[120;085;120]
090: DownTimeCheck()[060;006+]
100: SetNextSystem(+0)[110;320+]
110: SetNextSystem(0)[002+;320+]
120: AFKLogOffTimers()[900;165+;025+;120;075]
130: BookmarkSetup()[900;180+]
140: ResetBeltStatus()[900;180+]
150: Random()[210+;160+]
160: HangarOps()[900;210+;240+]
165: CheckLocalWait()[900+;170+;120;120]
170: CustomDelay(;;;;)[900;205+;170]
180: StationSpaceCheck()[900;900;120+;238;900]
190: CloseEveWindow()[001+;090]
200: DockDrones()[240+]
205: RefineOre()[900;220+;220+;210+;150+]
210: EmergencyWarpOut(false)[242+]
220: UnloadCargoEx(;true;true;20)[003+;240+;002+;150+;210+]
230: DockingToStation(;;)[900;240+;230;640+;640+]
238: AutoHotkey(DronesReconnect.ahk;70;False;False;)[WO;240+;240+;240+;239+]
239: CheckLocal(;;)[900+;238+;240+]
240: WarpingToStation()[900;640+;240;230+;290+]
242: FleetMode()[900+;250+;242;250;250]
250: Refit()[900;270+;270+;270+]
260: GetLasersData(False;90000;20000;100;60)[003+;350+]
266: AutoHotkey(BookmarkBelt.ahk;25;False;False;)[270;270;270;270;270]
270: MiningModeEx()[002+;340;730+;310+;730+]
280: StationSpaceCheck()[900;190+;190+;285+;190+]
285: WarpingToStation()[190+;190+;285;286+;287]
286: DockingToStation(;;)[190+;285+;286;190+;190+]
287: Unstuck()[190+;287;190+;285+]
290: Unstuck()[003+;290;003+;240+]
295: CheckTraveling()[345+;730+]
300: AvoidShips()[900;120;620+;270+;295+]
310: CalcBeltToWarp()[002+;240+;600+;310;270+]
320: TravelToNextSystem()[003+;320;320;140+;110]
330: SetNextSystem(+1)[110;320+]
340: CreateBookMarks()[003+;340;390+;270+;730+]
345: WarpingToStation()[900+;435+;345;395;437+]
350: CustomDelay(;;;;)[900;450+;350]
355: CheckLocalWait()[900+;356+;120;355]
356: CheckTank()[310;360+]
360: UndockSub()[900;360;260+]
369: AutoHotkey(BookmarkCan.ahk;25;False;False;)[370;370;370;370;370]
370: MiningLasersControl()[900+;120+;470+;371;380+]
371: AutoHotkey(OrcaMiner.ahk;70;False;False;MiningDrones\EPVars.ini|EPSection|EPResult)[WO;410;410;372;FM]
372: GoToSelectedObject(;3000;;;)[900;372;410+;410+;410+]
374: JettisonCargo()[900+;240+;370;640;369+]
375: JettisonCargo()[376;240+;370;640;369+]
376: CloseWindow(1)[900;377]
377: CloseWindow(8)[900;374]
378: AutoHotkey(DronesReconnect.ahk;70;False;False;)[WO;380;380;380;379]
379: CheckLocal(;;)[900+;378+;240+]
380: StopOperation(;;;)[900;375+;266+;002+;384+]
384: AutoHotkey(BookmarkBelt.ahk;25;False;False;)[385;385;385;385;385]
385: GroupMode(False;True;False;False)[240+;240+]
390: WarpingToStation()[002+;340;390;430+;003+]
395: DockingToStation(;;)[900+;345;395;436;436]
400: WarpingToLocation()[900;120+;400;300+;440+]
410: Maneuvering(;;)[900;380;420;420+]
420: GoToSelectedObject(;2500;;;)[900;420;380;380+;380]
430: DockingToStation(;;)[002+;390;430;340;340]
435: Sleep(60000)[435;436]
436: MiningMode()[002+;120;120;120;435]
437: Unstuck()[900+;437;900+;345+]
440: Unstuck()[003+;440;003+;400+]
450: CheckLocalWait()[900+;455+;230+;450]
455: Barrier(3)[400+;455;400+]
460: GetLasersData(False;90000;20000;100;60)[003+;380+]
470: AutoHotkey(OrcaMiner.ahk;70;False;False;MiningDrones\EPVars.ini|EPSection|EPResult)[WO;472;472;471;FM]
471: GoToSelectedObject(;3000;;;)[900;471;472+;472+;472+]
472: AvoidShipsDuringMining()[900+;120;370;270+;295+]
500: Looter(;;;;)[900+;510+;500+;460+]
510: GoToSelectedObject(;2500;1;false;)[900+;510;500;500+;500]
600: GroupMode(true;false;true;false)[355+;600]
620: GroupMode(false;true;false;true)[378+;240+]
640: GroupMode(true;true;false;false)[120+;640]
660: GroupMode(true;true;false;false)[200+;200+]
705: CheckLocal(;;True)[270+;240+;002+]
710: CheckTraveling()[760+;330+]
715: AnomalyRecheckTimer()[280+;240+;715;730+]
720: CheckTraveling()[280+;330+]
730: CheckAnomalies()[900+;710+;705+;735+;720+]
735: CheckLocalWait()[900+;740+;120+;735]
740: UndockSub()[900+;740;730+]
750: DockingToStation(;;)[900+;760+;750;715+;715+]
760: WarpingToStation()[900+;715+;760;750+;770+]
770: Unstuck()[900+;770;900+;760+]
900: StationSpaceCheck()[902;902;902+;901;902]
901: AutoHotkey(EmergencyDock.ahk;70;False;False;)[902;902;902;902;902]
902: ErrorHandler()[002+;003+;003+]
CL: Goto()[900+]
EC: Goto(30)[900+]
FM: FightModule()[900;FM2;WO+;LO+;500+]
FM2: AutoHotkey(FightDrones.ahk;70;False;False;)[WO;FM;FM;FM;FM]
LO: AutoHotkey(EmergencyDock.ahk;70;False;False;)[LO1;LO1;LO1;LO1;LO1]
LO1: Goto()[002+]
WO: AutoHotkey(EmergencyDock.ahk;70;False;False;)[WO1;WO1;WO1;WO1;WO1]
WO1: EmergencyWarpOut()[660+]
|
|
|
|
|
|
Re: Corp Bookmarking Miners 7 Years, 8 Months ago
|
Karma: 10
|
Wow, that was quick! Nice job.
Thanks
I also made it so that they mine a different roid so that they didn't affect EP's ore calculations.
in Later versions I'll probably do this, now that I know how to do it.
, I have code to detect if the drones have shield damage.
This is your EPScript not your AHK lol, I can't see shit.
Just wondering, how many characters you have?
I have between 5-9. I wont say for sure. I am not even registered here with the same email I use for eve. Can't be too safe.
|
|
|
|
|
Re: Corp Bookmarking Miners 7 Years, 8 Months ago
|
Karma: 33
|
I agree, can't be too safe.
Well, I can't release the core code, (because I've found that it can be applied to create bots that each yield 350 to 1,000 million per day with normal play times) but here is what I can share that you might find helpful.
Warning: Spoiler!Snip...
|
|
|
Last Edit: 2017/05/23 19:22 By innominate.
|
|
Re: Corp Bookmarking Miners 7 Years, 8 Months ago
|
Karma: 10
|
Here is the fun stuff.
Testing out new code and changes to EPscript, gets hung up and autocloses Eve.
So I revert back to original MinerCorpBMV1.txt script, and it warps to POS and gets in a loop at unloadcargoX for 5 minutes then closes out, won't go any further.
Now I got to figure out how I broke it.
Found it: It thinks I am in a pod now.
??:??:??: UnloadCargoEx(220)
---> ??:??:??: ExitCode 2. Method consumed 132 sec. in 1 runs (average 132 secs/run), Next Line: 002+
---> Desc: Returns 2 if pod detected
|
|
|
Last Edit: 2017/05/18 03:30 By Minesalot.
|
|
Re: Corp Bookmarking Miners 7 Years, 8 Months ago
|
Karma: 16
|
Welcome to the wide world of scripting! Awesome to see you've started so strong and so quickly. Innominate shared his code above, but obviously refers to a lot of classes that you don't have. What I'd infer from them, if you want to replicate his functionality, is to either A. make a class yourself, modeled after his, or B. look at the functionality achieved by the class functions (e.g., dmgr.Dock_Some(wrongDrones, False), dmgr.Launch("Mining",False) and replicate it outside of a class. The classes would take a much longer time to make, but after you've made them, you could re-use them and scale them for any kind of bot/functionality you want.
You mentioned using the Orca as a booster, and there are a few potential pitfalls to bear in mind:
1. Range from Booster: with an Orca in a HS belt, this is a moot point, even a modestly skilled Orca will have boosts that extend over an entire belt. If you're in nullsec and working on anomalies (which can be hundreds of km across), you'll need some way to keep the miners close to the Orca. However, then there's the problem of what happens if keeping a bot close-enough-for-boosts makes them too-far-to-mine? Also, how do you keep them close without them all targeting the same rocks and reducing efficiency that way?
2. Yield Calculations: Slav's bot checks the yield once when you log-in, and saves those values. That's how it determines (with estimation) when to turn mining lasers on/off to reduce wasted cycle time. If you dramatically increase yield/reduce cycle time, those calculations will be off. Thought: make the bot look for the Boost icon above the HUD/Capacitor, and if it finds it, make it go to GetLaserData() (or whatever it's called) with pre-calculated numbers for range, yield, etc. If it doesn't find the Boost icon, make it go to a *different* GetLaserData() with default values.
Separately, your prototype drone script looks awesome, I'd just caution one thing. When you use just numbers for things like ImageSearch, you run the risk of the script breaking if those windows move. Granted, there may never be a reason for a window to move, but Eve and EP can be tricky sometimes  One alternative method is to find an "Anchor" image first (like the unique name of the window, like "Drone Manager"), and then make every other reference point relative to that, e.g., AnchorX + 20, AnchorY + 50. To go deeper with the example: you know that "Drones In Bay" is going to be so many pixels from "Drone Manager", so you can find that. Then, you know that if it's collapsed, it will A. have an arrow pointing to the right next to "Drones In Bay" or an arrow pointing down. Depending on which you find, you'll know that "Drones in Space" must be so many pixels beneath it (depending on if the menu is expanded or collapsed). This way, no matter who's using the script or where their drone manager is, it'll be able to find those windows. That's how my Mail Call script works (when it works, that is...), excluding instances where 1. There are transparencies that make finding the image exceedingly difficult and 2. they are fixed GUI components that cannot move.
It's awesome that you're interested in developing more scripts for this, the sky really is the limit when you start to think about everything you could automate. Between AHK and a few EP methods (things like OverviewScan and Slav's OCR text reader), believe me when I say you can automate nearly anything...
|
|
|
|
|
|
 | | |
|
|
© Macro Laboratory 2025
All rights reserved!
|