Changing Mining Crystals in Belts (0 viewing)
 | | |
|
TOPIC: Changing Mining Crystals in Belts
|
|
Re: Changing Mining Crystals in Belts 9 Years, 9 Months ago
|
Karma: 33
|
|
First of all, it is awesome to see someone else on here writing code! Thanks for sharing! (Saved... If you add that little extra bit will you please post the update? I'm working on my project so that MTUs can be used and an Orca can use all it's available space as a looter.)
Minesalot wrote:
I would like to be able to send commands to each VM to tell them to dock, or POS up before stopping the vm. So they are not in space alone, in the dark, where no one can hear you scream.
There is a loop miners go through in belts. The wormhole mining algorithm already has this in place around 370 I think. 370 goes to an ini read that tells the bots what they should do. Just use that part, and have the iniRead go into the logoff branch 5-10 minutes before shut-down.
|
|
|
|
Last Edit: 2016/07/25 12:04 By innominate.
|
|
|
Re: Changing Mining Crystals in Belts 9 Years, 8 Months ago
|
Karma: 10
|
Finished with working version.
??? designates information I don't want public. Need to change it to suit yourself before it will work.
Warning: Spoiler!
#include <AutoItConstants.au3>
#include <WindowsConstants.au3>
#include <File.au3>
#Include <Date.au3>
#include <MsgBoxConstants.au3>
#include <WinAPIFiles.au3>
Global $vmRunstart = '\VMware\VMware Workstation\vmrun.exe start "'
Global $vmRunstop = '\VMware\VMware Workstation\vmrun.exe stop "'
Global $vmMain = "?:\???\???\???.vmx"
Global $vmTeam1 = "?:\???\???\???1.vmx"
Global $vmTeam2 = "?:\???\???\???2.vmx"
Global $vmTeam3 = "?:\???\???\???3.vmx"
Global $vmTeam4 = "?:\???\???\???4.vmx"
Global $vmTeam5 = "?:\???\???\???5.vmx"
Global $LoopTimer, $Resttimer, $Hours = 0, $Minutes = 0, $Seconds = 0
Global $g_bPaused = False
Global $sLogPath = "???:\???\"
Global $sDscanpath = "???:\???\???\SharedDscan.ini" ; path to SharedDScan file
HotKeySet("!{ESC}", "_Terminate") ;Alt Escape
HotKeySet("{PAUSE}", "TogglePause")
$number= InputBox("Runs", "How many runs do you want to do?", "???", "", default, default, 0, 0,10) ; Set to how many runs to make
If @error = 2 Then
$number=??? ;set a default because it times out after 10 seconds
EndIf
For $x = 1 to $number
$LoopTimer = Random(???,???) ; Set to runtime in miliseconds usually 2-4 hrs
$RestTimer = Random(???,???) ; Set breaktime in miliseconds usually 1-3hrs
Sleep(1000)
_Shutdown() ; stop all virtual machines
_Begin() ;start all virtual machines
Sleep(1000)
_Countdown($LoopTimer) ; run time of virtual machines
Sleep(1000)
_Shutdown() ; stop all virtual machines
Sleep(1000)
_Breaktime($RestTimer) ; take a break for a couple hours
_Writelog("Break time over")
Next
Func _Begin()
TrayTip ( "Starting Virtual Machines:", "", 10)
_Writelog("Starting bots:")
_RunVM($vmRunstart,$vmMain)
_RunVM($vmRunstart,$vmTeam1)
_RunVM($vmRunstart,$vmTeam2)
_RunVM($vmRunstart,$vmTeam3)
_RunVM($vmRunstart,$vmTeam4)
_RunVM($vmRunstart,$vmTeam5)
EndFunc
func _Writelog($message)
Local $tCur
$tCur = _Date_Time_GetSystemTime()
_FileWriteLog ( $sLogPath & "\Trackinglog.txt", $message)
EndFunc
Func _Shutdown()
TrayTip ( "Stopping Virtual Machines:", "", 10)
_Writelog("Stopping bots:")
_SafeLogOff("True")
Sleep(90000) ; it doesnt take this long for them to dock or pos up. usually done in 15 seconds or less.
_RunVM($vmRunstop,$vmMain)
_RunVM($vmRunstop,$vmTeam1)
_RunVM($vmRunstop,$vmTeam2)
_RunVM($vmRunstop,$vmTeam3)
_RunVM($vmRunstop,$vmTeam4)
_RunVM($vmRunstop,$vmTeam5)
_SafeLogOff("False")
EndFunc
Func _RunVM($vmAction,$vmpath)
Run(@ProgramFilesDir & $vmAction & $vmpath & '"', @ProgramFilesDir & "\VMware\VMware Workstation\",@SW_HIDE)
sleep(5000)
EndFunc
Func _Countdown($MaxTime)
$timer = TimerInit()
While TimerDiff($timer) < $MaxTime
$Seconds = TimerDiff($timer)/1000
$diff = $Seconds - ($MaxTime/1000)
$Hours = Int($diff / 3600)
$Minutes = Int($diff/ 60)
if ($Minutes*-1 >60) Then
$tHours = $Hours*60
$Minutes = $Minutes-$tHours
EndIf
$SecondsRem = $diff - ($Minutes * 60) - ($Hours*3600)
$Minutes = $Minutes * -1
$SecondsRem = $SecondsRem * -1
$Hours = $Hours * -1
$CountdownTimer = StringFormat("%01i:%02i:%02i", $Hours, $Minutes, $SecondsRem)
ToolTip("Current Run: " & $x & @CRLF & "Time Remaining: " & $CountdownTimer, 1920, 1)
WEnd
EndFunc
Func _Breaktime($MaxTime)
$timer = TimerInit()
While TimerDiff($timer) < $MaxTime
$Seconds = TimerDiff($timer)/1000
$diff = $Seconds - ($MaxTime/1000)
$Hours = Int($diff / 3600)
$Minutes = Int($diff/ 60)
if ($Minutes*-1 >60) Then
$tHours = $Hours*60
$Minutes = $Minutes-$tHours
EndIf
$SecondsRem = $diff - ($Minutes * 60) - ($Hours*3600)
$Minutes = $Minutes * -1
$SecondsRem = $SecondsRem * -1
$Hours = $Hours * -1
$CountdownTimer = StringFormat("%01i:%02i:%02i", $Hours, $Minutes, $SecondsRem)
ToolTip("Break Time: " & $x & @CRLF & "Break Time Remaining: " & $CountdownTimer, 1920, 1)
WEnd
EndFunc
Func _SafeLogOff($value)
IniWrite($sDscanpath, "GroupVars", "Safelogoff", $value)
EndFunc
Func TogglePause()
$g_bPaused = Not $g_bPaused
While $g_bPaused
Sleep(100)
ToolTip('Script is "Paused"', 0, 0)
WEnd
ToolTip("")
EndFunc ;==>TogglePause
Func _Terminate()
Exit 0
EndFunc
|
|
|
|
|
|
|
Re: Changing Mining Crystals in Belts 9 Years, 8 Months ago
|
Karma: 10
|
|
I just came across the "MenuOpenLineClick" so i decided to give that a whirl. I ended coming back here and rereading the OP and I see why you abandoned that route.
However, I think I am going to go about it a little different. I intend on only mining A, then Spod on1 B then spod on another, C then Spod on another.... so only 2
Warptostation while warping unload.
MenuOpenLineClick "Unload to Cargo" the mining crystal that is loaded on f1 ;testing on skiff for now.
Once docked or at POS
openwindow cargohold
drop everything in cargo to station.
readini roid 2 choice
search for and drag crystals to ship cargohold
undock, or at POS
MenuOpenLineClick "Reload All" on F1. Since there is only 1 type of mining crystal it auto loads.
You know what? screw it. T1 strip miners work Juuuuuuuuust fine.
But I do want to work a way out to change asteroid overviews that way I am mining A then B then C choices.
|
|
|
|
|
|
|
Re: Changing Mining Crystals in Belts 9 Years, 8 Months ago
|
Karma: 33
|
|
Exactly! I just use another miner, so they all mine something different and can use T2 crystals. Way easier!
|
|
|
|
|
|
|
Re: Changing Mining Crystals in Belts 9 Years, 8 Months ago
|
Karma: 10
|
|
I am sounding out some ideas before I go into the logic and making changes. Feel free to shoot these down in as few words as possible.
1. Use multiple client mode on a VM. The same pilot, just different overview settings for asteroids. Say client 1 arkonor, client 2 bistot, client 3 Crokite. Then run client 1 for 4 hrs 2 for 4 hrs 3 for 4 hours. Just using the timers in EP
2. modify algorithm to change asteroids overview if empty, and have overview settings for each roid type.
3. BM each anom from 200km away. then each pilot warps to BM, sees overview of goodies, sorts by name once to get ABC order. Pick first roid, initiate warp. Sort by distance, then continue. (Think I am going to go this route. Seems easiest, and most effective. Would need to break into algorithm after warp to BM. fire a AHK to sort by name, then click first roid, warp to, then end AHK to let EO take over again)
4. Have 5 miners running t2 crystals on each roid type. the one guy on Arkonor flys about 4 hrs a day and rests the rest of the time. The bistot guy gets about 6 hrs of work in and rests the rest. The spod lady, can work for 3 days straight jet canning and still be working the same single roid.
|
|
|
|
|
|
|
Re: Changing Mining Crystals in Belts 9 Years, 8 Months ago
|
Karma: 33
|
|
Ideally, I'd start with #2.
Make an algorithm with AHK scripts that would warp to the first Anomaly at 100km, bookmark, return to home, warp to bookmark at 100km, delete first bookmark, make new bookmark at 200k. You could either work that into the anomaly algorithm or put it on a different EP client.
Make AHK to change overview and crystal type (EP might do some of this). Work it into algorithm so when a roid type is all gone it changes roid overview/crystal and keeps mining.
It's not the easiest route, but it would work best IMHO.
|
|
|
|
|
|
|
 | | |
|
|
© Macro Laboratory 2026
All rights reserved!
|