Teht
ComBot Author
Hey all
It's been a while since I had an active EVE subscription, but some guys just got hired at work who play so I figured I'd get active again. While watching my hauler sit next to my miner's jetcan and twiddle its thumbs, I decided to see if I could make him pitch in. Here's the code I pulled over from obj_Miner.iss. Let me know if I made any huge mistakes, so far it's been working pretty well.
This change will make your hauler use its single mining laser on a target in range. The changes to obj_Asteroids.iss should prevent this change from causing your hauler to move to asteroids that are not within mining range. If you happen to be too far away from asteroids to mine them, it should default to idling.
Changes in obj_Asteroids.iss:
Code added to obj_Hauler.iss:
It's been a while since I had an active EVE subscription, but some guys just got hired at work who play so I figured I'd get active again. While watching my hauler sit next to my miner's jetcan and twiddle its thumbs, I decided to see if I could make him pitch in. Here's the code I pulled over from obj_Miner.iss. Let me know if I made any huge mistakes, so far it's been working pretty well.
This change will make your hauler use its single mining laser on a target in range. The changes to obj_Asteroids.iss should prevent this change from causing your hauler to move to asteroids that are not within mining range. If you happen to be too far away from asteroids to mine them, it should default to idling.
Changes in obj_Asteroids.iss:
Code:
Line 337
function:bool TargetNext(bool CalledFromMoveRoutine=FALSE, bool CalledFromHaulerRoutine=FALSE)
Code:
Line 401
if ${AsteroidIterator.Value.Distance} < ${This.MaxDistanceToAsteroid} && ${CalledFromHaulerRoutine} == FALSE
Code added to obj_Hauler.iss:
Code:
Line 527 (I added this right after /* TODO: add code to loot and salvage any nearby wrecks */)
; Teht's Hauler Mining Laser code - Requires change to Asteroids.TargetNext!
variable iterator Target
variable index:entity LockedTargets
call Asteroids.UpdateList
if ${Math.Calc[${_Me.GetTargets} + ${_Me.GetTargeting}]} < 1
{
call Asteroids.TargetNext TRUE TRUE
}
if ${Ship.TotalActivatedMiningLasers} < ${Ship.TotalMiningLasers}
{
while ${_Me.GetTargeting} > 0
{
wait 10
}
}
Me:DoGetTargets[LockedTargets]
LockedTargets:GetIterator[Target]
if ${Target:First(exists)}
{
variable int64 TargetID
TargetID:Set[${Target.Value.ID}]
if !${Ship.IsMiningAsteroidID[${TargetID}]}
{
call Ship.ActivateFreeMiningLaser
}
}