Hopefully this will give a little more information. This is just a very basic blue colonizing script for fuel cols only. I have my qStats include file at the bottom, but it is a seperate file and not contained in the main script. The incProPlanetInfo file is not attached, but should be descriptive enough on the variable names to understand what I am doing.
A partial variable dump looks like the following:
Dynamic array of "$INCPROQSTATS~STATS" (size 28)
"SECT" = "3667"
"TURNS" = "0"
"CREDS" = "354104876"
"FIGS" = "0"
"SHLDS" = "16000"
"HLDS" = "230"
"ORE" = "0"
and
"$INCPROPLANETINFO~EQUAMT" = "0"
"$INCPROPLANETINFO~EQUCOL" = "0"
"$INCPROPLANETINFO~EQUMAX" = "2000000"
"$INCPROPLANETINFO~FIGAMT" = "255206"
"$INCPROPLANETINFO~FIGMAX" = "7500000"
"$INCPROPLANETINFO~FUELAMT" = "5411"
"$INCPROPLANETINFO~FUELCOL" = "15700"
"$INCPROPLANETINFO~FUELMAX" = "7500000"
"$INCPROPLANETINFO~ORGAMT" = "0"
"$INCPROPLANETINFO~ORGCOL" = "0"
"$INCPROPLANETINFO~ORGMAX" = "2000000"
Code:
// main file
getWord currentLine $prompt 1
if ($prompt = "Planet")
send "*tnl1*"
// get planet information from the incProPlanetInfo include file
goSub :incProPlanetInfo~getPlanetInfo
send "q"
else
// it is a simple script
echo ansi_12 "**You must be on the planet's surface to run this!*"
halt
end
// get ship stats from the incProQstats include file
goSub :incProQstats~qStats
waitFor "Command [TL"
echo ANSI_13 "**Enter the max cols to have producing ore*"
getConsoleInput $maxOreCols
// check for id10t error on col numbers
// $fuelCols is in the incProPlanetInfo include so we use it
// by calling $incProPlanetInfo~fuelCol
if ($maxOreCols < $incProPlanetInfo~fuelCol)
echo ansi_12 "**You have more cols than that now*"
halt
else
// see how many cols we need to get to target
setVar $maxOreCols ($maxOreCols - $incProPlanetInfo~fuelCol)
end
// get sector from qStats for our warp back
setVar $cs $incProQstats~stats[SECT]
getDistance $toTerra $cs "1"
getDistance $fromTerra "1" $cs
// get ore required for trip to and from (single ship)
setVar $oreReq (($toTerra + $fromTerra) * 3)
// determine what the number of cols per load
setVar $load ($incProQStats~stats[HLDS] - $oreReq)
setVar $deliveredCols 0
while ($deliveredCols < $maxOreCols)
// assuming SXX port in sector
send "pt" $oreReq "**0* 0* "
if ($incProQstats~stats[ALN] > 999)
// jumping back without verifying tWarp lock, just might fuse.
send "m 1* yy lt*m " $cs "* y y l " #8 $incProPlanetInfo~pNum "* snl1*q"
else
halt
# need a red jump sector and move to terra
end
add $deliveredCols $load
end
halt
include "proinc\incproQstats"
include "proinc\incProPlanetInfo"
# end of main script
------------------------------------------------------
// the included file(seperate)in the incPro folder named incProQstats.ts
:qStats
setVar $statsLine ""
send "/"
:slash
setTextLineTrigger qstatsDone :qstatsDone "Ship"
setTextLineTrigger 179 :179 #179
pause
:179
setVar $statsLine $statsLine & currentline
setTextLineTrigger 179 :179 #179
pause
:qstatsdone
killtrigger 179
setVar $statsLine $statsLine & currentline
stripText $statsLine ","
replaceText $statsLine #179 " "
getword $statsLine $qStatsWord 1
getword $statsLine $qStatsVal 2
setVar $wordPointer 1
while ($qStatsWord <> 0)
upperCase $qStatsWord
setVar $stats[$qStatsWord] $qStatsVal
add $wordPointer 2
getword $statsLine $qStatsWord $wordPointer
getword $statsLine $qStatsVal ($wordPointer + 1)
end
return
// returns the following in uppercase
// "Sect Turns Creds Figs Shlds Hlds Ore Org Equ Col Phot Armd Lmpt GTorp TWarp
// "Clks Beacns AtmDt Crbo EPrb MDis PsPrb PlScn LRS Aln Exp Corp Ship"
_________________
/ Promethius / Enigma / Wolfen /
"A man who has no skills can be taught, a man who has no honor has nothing."