View unanswered posts | View active topics It is currently Sun Apr 26, 2026 11:44 am



Reply to topic  [ 1 post ] 
 Mac Spitter script code. for Galon 
Author Message
Commander
User avatar

Joined: Fri Jun 09, 2006 2:00 am
Posts: 1402
Location: Canada
Unread post 
Spits out Col'n Macro's for both SWATH and TWX burst (good to use a macro looper), also tells you how many trips you can make.. 
Code:
# Lone Stars Macro Spitter  v1.0  - Aug 28 06
# Spits out Macro for Colonizing
#
# Start at the Planet Prompt
#
# Credits
#
# OZ's quik stats routine

cutText CURRENTLINE $location 1 18
if ($location <> "Planet command (?=")
clientMessage "This script must be run from the Planet Prompt"
halt
end
killAllTriggers
gosub :quikstats
setVar $sector $quikstats[$h[1]]
killAllTriggers
send "d"
setTextLineTrigger Pnumber :_Pnumber "Planet #"
pause
:_Pnumber
getWord CURRENTLINE $planet 2
stripText $planet "#"
waitOn "Fuel Ore"
getWord CURRENTLINE $gas 6
stripText $gas ","
waitOn "Planet command (?="
send "^F" & $sector & "*1*F1" & $sector & "*1*Q"
setEventTrigger disconnect :_disconnected "Connection lost"
setTextLineTrigger noJoy :noJoy "*** Error - No route within"
setTextTrigger cont :cont "Planet command (?="
pause
:_disconnected
killAllTriggers
clientMessage "You got Disco'd."
halt
:noJoy
killAllTriggers
clientMessage "No Direct path avail. Please clear Avoids."
halt
:cont
killAllTriggers
getdistance $dist1 $sector 1
getdistance $dist2 1 $sector
setvar $ore (($dist1 + $dist2) * 3)
setvar $trips ($gas / $ore)
echo #27 & "[2J"
send "d"
waitfor "Planet command"
setVar $macswath "   t n t 1 " & $ore &  " ^M q 1 ^M y y l 1 ^M t ^M " & $sector & " ^M y y l " & $planet & " ^M s n l 1 ^M"
setVar $mactwx "   t n t 1 " & $ore &  " " & #42 & " q 1 " & #42 & " y y l 1 " & #42 & " t " & #42 & " " & $sector & " " & #42 & " y y l " & $planet & " " & #42 & " s n l 1 " & #42
echo "****"
echo "   " & ANSI_7 & "-" & ANSI_8 & "=" & ANSI_15 & #42 & ANSI_8 & "=" & ANSI_7 & "-" & ANSI_8 & "=" & ANSI_15 & #42 & ANSI_8 & "=" & ANSI_7 & "-" & ANSI_8 & "=" & ANSI_15 & #42 & ANSI_8 & "=" & ANSI_7 & "-" & ANSI_8 & "=" & ANSI_15 & #42 & ANSI_8 & "=" & ANSI_7 & "-" & ANSI_8 & "=" & ANSI_15 & #42 & ANSI_8 & "=" & ANSI_7 & "-" & ANSI_8 & "=" & ANSI_15 & #42 & ANSI_8 & "=" & ANSI_7 & "-" & ANSI_8 & "=" & ANSI_15 & #42 & ANSI_8 & "=" & ANSI_7 & "-" & ANSI_8 & "=" & ANSI_15 & #42 & ANSI_8 & "=" & ANSI_7 & "-" & ANSI_8 & "=" & ANSI_15 & #42 & ANSI_8 & "=" & ANSI_7 & "-"
echo ANSI_15 & "*        LoneStars Macro Express v1.0*"
echo "   " & ANSI_7 & "-" & ANSI_8 & "=" & ANSI_15 & #42 & ANSI_8 & "=" & ANSI_7 & "-" & ANSI_8 & "=" & ANSI_15 & #42 & ANSI_8 & "=" & ANSI_7 & "-" & ANSI_8 & "=" & ANSI_15 & #42 & ANSI_8 & "=" & ANSI_7 & "-" & ANSI_8 & "=" & ANSI_15 & #42 & ANSI_8 & "=" & ANSI_7 & "-" & ANSI_8 & "=" & ANSI_15 & #42 & ANSI_8 & "=" & ANSI_7 & "-" & ANSI_8 & "=" & ANSI_15 & #42 & ANSI_8 & "=" & ANSI_7 & "-" & ANSI_8 & "=" & ANSI_15 & #42 & ANSI_8 & "=" & ANSI_7 & "-" & ANSI_8 & "=" & ANSI_15 & #42 & ANSI_8 & "=" & ANSI_7 & "-" & ANSI_8 & "=" & ANSI_15 & #42 & ANSI_8 & "=" & ANSI_7 & "-"
echo "**"
echo ANSI_15 & "**Planet #" & ANSI_8 & $planet & ANSI_15 & ", has enough fuel for " & ANSI_8 & $trips & ANSI_15 & " trips.**"
echo ANSI_15 & "*Swath Macro :*" & ANSI_14 & $macswath
echo ANSI_15 & "***TWX Macro   :*" & ANSI_14 & $mactwx
echo "***"
halt
:quikstats
 setVar $h[1] "Sect"
 setVar $h[2] "Turns"
 setVar $h[3] "Creds"
 setVar $h[4] "Figs"
 setVar $h[5] "Shlds"
 setVar $h[6] "Hlds"
 setVar $h[7] "Ore"
 setVar $h[8] "Org"
 setVar $h[9] "Equ"
 setVar $h[10] "Col"
 setVar $h[11] "Phot"
 setVar $h[12] "Armd"
 setVar $h[13] "Lmpt"
 setVar $h[14] "GTorp"
 setVar $h[15] "TWarp"
 setVar $h[16] "Clks"
 setVar $h[17] "Beacns"
 setVar $h[18] "AtmDt"
 setVar $h[19] "Crbo"
 setVar $h[20] "EPrb"
 setVar $h[21] "MDis"
 setVar $h[22] "PsPrb"
 setVar $h[23] "PlScn"
 setVar $h[24] "LRS"
 setVar $h[25] "Aln"
 setVar $h[26] "Exp"
 setVar $h[27] "Ship"
 setVar $cnt 0
 send "/"
:chk
 setTextLineTrigger getLine :getLine
 pause
:getLine
 killtrigger done
 add $cnt 1
 setVar $culine CURRENTLINE
 replaceText $culine #179 " " & #179 & " "
 setVar $line[$cnt] $culine
 getWordPos $culine $pos " Ship "
 if ($pos > 0)
      goto :_done_read
 end
 goto :chk
:_done_read
 killtrigger getLine
 setVar $hcount 0
:hcount
 if ($hcount < 27)
      add $hcount 1
      setVar $lncount 1
     :lncount
      if ($lncount < $cnt)
           add $lncount 1
           getWordPos $line[$lncount] $pos $h[$hcount]
           if ($pos > 0)
                 setVar $work $line[$lncount]
                 cutText $work $work $pos 9999
                 upperCase $h[$hcount]
                 getWord $work $quikstats[$h[$hcount]] 2
                 stripText $quikstats[$h[$hcount]] ","
           else
                 goto :lncount
           end
      end
      goto :hcount
 end
 return

_________________
----------------------------
-= QUANTUM Computing 101: 15 = 3 x 5 ... 48% of the time.


Wed Jan 10, 2007 7:43 am
Profile ICQ YIM
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 22 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by wSTSoftware.