
FigHitWatch.ts and FigGridReport.ts
A simple script to monitor fig hits and change the sectorparameter to false allowing an up-to-date fig report.
Does not take into acount a corpie gridding and adding sectors.
FigHitWatch.ts
Code:
# figSec parameter watch
# view variable sectorHits to see how many fig hits since script start
systemScript
setVar $sectorHits 0
:begin
setTextLineTrigger enteredSector :enteredSector "of your fighters in sector"
setTextLineTrigger fedDestroyed :fedDestroyed "The Federation We destroyed your"
pause
:enteredSector
setTextLineTrigger enteredSector :enteredSector "of your fighters in sector"
setVar $line CURRENTLINE & "END"
getText $line $hit "in sector " "END"
setSectorParameter $hit "FigSec" FALSE
add $sectorHits 1
pause
:fedDestroyed
setTextLineTrigger fedDestroyed :fedDestroyed "The Federation We destroyed your"
getWord Currentline $hit 11
stripText $hit "."
setSectorParameter $hit "FigSec" FALSE
add $sectorHits 1
pause
Script to report grid percentage:
figGridReport.ts
Code:
# grid report
setVar $figCount 0
setVar $i 11
send "'Checking figged sector count *"
while ($i <= SECTORS)
getSectorParameter $i "FigSec" $isFigged
if ($isFigged)
add $figCount 1
end
add $i 1
end
setVar $unFigged (sectors - $figCount)
setPrecision 4
setVar $pCent ($figCount / (SECTORS - 11))
multiply $pCent 100
setPrecision 2
multiply $pCent 1
send "'We have " $figCount " sectors figged and " $unfigged " unfigged - " $pCent "% gridded.*"
halt
_________________
/ Promethius / Enigma / Wolfen /
"A man who has no skills can be taught, a man who has no honor has nothing."