I wanted my bot to automatically check for an ore deposit every time he has unloaded his ore cargo.
here is what I changed:
File: obj_Asteroids.iss
look for function MoveToField(bool ForceMove, bool IgnoreTargeting=FALSE, bool FleetWarp=FALSE)
go to if ${ForceMove} || !${AsteroidsInRange}
insert
the whole if part should now look like:
It worked for me ... but it needs further testing 
here is what I changed:
File: obj_Asteroids.iss
look for function MoveToField(bool ForceMove, bool IgnoreTargeting=FALSE, bool FleetWarp=FALSE)
go to if ${ForceMove} || !${AsteroidsInRange}
insert
Code:
variable string Search_Deposit = "Deposit"
variable bool IsFound = FALSE
variable bool HasWarped = FALSE
variable iterator OreIterator
variable index:systemanomaly Ore
MyShip.Scanners.System:GetAnomalies[Ore]
Ore:GetIterator[OreIterator]
UI:UpdateConsole["Checking for local Deposits"]
if ${OreIterator:First(exists)}
do
{
if ${OreIterator.Value.DungeonName.Find[${Search_Deposit}]}
{
;PlaySound "detect.wav"
;echo "Name: ${OreIterator.Value.Name} Group: ${OreIterator.Value.Group} GroupID: ${OreIterator.Value.GroupID} ValueID: ${OreIterator.Value.ID} DungeonName: ${OreIterator.Value.DungeonName}"
UI:UpdateConsole["Found Deposit:"]
UI:UpdateConsole["ID: ${OreIterator.Value.ID}"]
UI:UpdateConsole["Name: ${OreIterator.Value.Name}"]
UI:UpdateConsole["Difficulty: ${OreIterator.Value.Difficulty}"]
UI:UpdateConsole["DungeonID: ${OreIterator.Value.DungeonID}"]
UI:UpdateConsole["DungeonName: ${OreIterator.Value.DungeonName}"]
UI:UpdateConsole["Faction: ${OreIterator.Value.Faction}"]
UI:UpdateConsole["FactionID: ${OreIterator.Value.FactionID}"]
UI:UpdateConsole["Group: ${OreIterator.Value.Group}"]
UI:UpdateConsole["GroupID: ${OreIterator.Value.GroupID}"]
UI:UpdateConsole["IsWarpable: ${OreIterator.Value.IsWarpable}"]
UI:UpdateConsole["ScanStrenght: ${OreIterator.Value.ScanStrenght}"]
UI:UpdateConsole["SignalStrength: ${OreIterator.Value.SignalStrength}"]
OreIterator.Value:WarpTo[0]
return
}
}
while ${OreIterator:Next(exists)}
UI:UpdateConsole["No Deposits found"]
Code:
if ${ForceMove} || !${AsteroidsInRange}
{
/* BPE from here*/
variable string Search_Deposit = "Deposit"
variable bool IsFound = FALSE
variable bool HasWarped = FALSE
variable iterator OreIterator
variable index:systemanomaly Ore
MyShip.Scanners.System:GetAnomalies[Ore]
Ore:GetIterator[OreIterator]
UI:UpdateConsole["Checking for local Deposits"]
if ${OreIterator:First(exists)}
do
{
if ${OreIterator.Value.DungeonName.Find[${Search_Deposit}]}
{
;PlaySound "detect.wav"
;echo "Name: ${OreIterator.Value.Name} Group: ${OreIterator.Value.Group} GroupID: ${OreIterator.Value.GroupID} ValueID: ${OreIterator.Value.ID} DungeonName: ${OreIterator.Value.DungeonName}"
UI:UpdateConsole["Found Deposit:"]
UI:UpdateConsole["ID: ${OreIterator.Value.ID}"]
UI:UpdateConsole["Name: ${OreIterator.Value.Name}"]
UI:UpdateConsole["Difficulty: ${OreIterator.Value.Difficulty}"]
UI:UpdateConsole["DungeonID: ${OreIterator.Value.DungeonID}"]
UI:UpdateConsole["DungeonName: ${OreIterator.Value.DungeonName}"]
UI:UpdateConsole["Faction: ${OreIterator.Value.Faction}"]
UI:UpdateConsole["FactionID: ${OreIterator.Value.FactionID}"]
UI:UpdateConsole["Group: ${OreIterator.Value.Group}"]
UI:UpdateConsole["GroupID: ${OreIterator.Value.GroupID}"]
UI:UpdateConsole["IsWarpable: ${OreIterator.Value.IsWarpable}"]
UI:UpdateConsole["ScanStrenght: ${OreIterator.Value.ScanStrenght}"]
UI:UpdateConsole["SignalStrength: ${OreIterator.Value.SignalStrength}"]
OreIterator.Value:WarpTo[0]
return
}
}
while ${OreIterator:Next(exists)}
UI:UpdateConsole["No Deposits found"]
/* BPE to here*/
if (${Config.Miner.BookMarkLastPosition} && \
${Bookmarks.StoredLocationExists})
{
/* We have a stored location, we should return to it. */
UI:UpdateConsole["Returning to last location (${Bookmarks.StoredLocation})"]
call Ship.TravelToSystem ${EVE.Bookmark[${Bookmarks.StoredLocation}].SolarSystemID}
call Ship.WarpToBookMarkName "${Bookmarks.StoredLocation}" ${FleetWarp}
This.BeltArrivalTime:Set[${Time.Timestamp}]
Bookmarks:RemoveStoredLocation
return
}
if ${Config.Miner.UseFieldBookmarks}
{
call This.MoveToRandomBeltBookMark ${FleetWarp}
return
}
; We're not at a field already, so find one
do
{
curBelt:Set[${Math.Rand[${Belts.Used}]:Inc[1]}]
TryCount:Inc
if ${TryCount} > ${Math.Calc[${Belts.Used} * 10]}
{
UI:UpdateConsole["All belts empty!"]
call ChatIRC.Say "All belts empty!"
EVEBot.ReturnToStation:Set[TRUE]
return
}
}
while ( !${Belts[${curBelt}].Name.Find[${beltsubstring}](exists)} || \
${This.IsBeltEmpty[${Belts[${curBelt}].Name}]} )
UI:UpdateConsole["EVEBot thinks we're not at a belt. Warping to Asteroid Belt: ${Belts[${curBelt}].Name}"]
call Ship.WarpToID ${Belts[${curBelt}].ID} 0 ${FleetWarp}
This.BeltArrivalTime:Set[${Time.Timestamp}]
This.UsingBookMarks:Set[TRUE]
This.LastBeltIndex:Set[${curBelt}]
}