
Ship Stats Window For ZOC
I really don't think I ever finished this script, but it is functional and wll provide a TWX window of your current ship stats, location of Rylos, Alpha Centauri, and Stardock (provided they are in the database). It will run as a system script so you wll have to kill it manually.
# TW Player Stats for use with ZOC
# by: Promethius 02/2008 (think that is when I wrote it)
# get current sector info
# Turns remaining
# experience
# credits on-hand
# =-=-= Ship =-=-=
# hold info
# Fighters
# TPW
# eProbes
# Disruptors
# PTorps
# Mines - aramid and limpet
# gen Torps
# cloaks
# twarp Class Dist
# scanners
# class 0 locations
# stardock location
systemscript
:initWindow
setVar $window ""
Window STATS 250 445 " -=-=- ProStats v.1 -=-=-" ON_TOP
getWord CURRENTLINE $prompt 1
if ($prompt = "Command") or ($prompt = "Citadel")
send "/"
goto :dataType
else
clientmessage "You must start this script at the Command or Citadel prompt."
halt
end
:setWindowContent
killalltriggers
setVar $window "*"
# setVar $window $window & " Trader: " & $trader & "*"
setVar $window $window & " Sector : " & $curSector & "*"
setVar $window $window & " Exp : " & $exp & "*"
setVar $window $window & " Align : " & $align & "*"
setVar $window $window & " Credits : " & $credits & "*"
setVar $window $window & " Turns : " & $turns & "*"
setVar $window $window & " -------------------------------*"
setVar $window $window & " Ship : " & $ship & "*"
setVar $window $window & " TPW : " & $tpw & "*"
setVar $window $window & " Fighters: " & $fighters & "*"
setVar $window $window & " Shields : " & $shields & "*"
setVar $window $window & " Ore : " & $ore & "*"
setVar $window $window & " Organics: " & $org & "*"
setVar $window $window & " Equip : " & $equ & "*"
setVar $window $window & " Colos : " & $col & "*"
setVar $window $window & " EProbes : " & $eProbe & "*"
setVar $window $window & " Ptorps : " & $ptorps & "*"
setVar $window $window & " Armids : " & $aMine & "*"
setVar $window $window & " Limpets : " & $lMine & "*"
setVar $window $window & " GenTorp : " & $Gtorp & "*"
setVar $window $window & " Dets : " & $MDis & "*"
setVar $window $window & " Scanners: " & $PlScn & "*"
setVar $window $window & " Twarp : " & $tWarp & "*"
setVar $window $window & " -------------------------------*"
setVar $window $window & " Rylos : " & RYLOS & "* Alpha Centauri: " & ALPHACENTAURI & "*"
setVar $window $window & " StarDock: " & STARDOCK & "* *"
:updateWindow
setWindowContents STATS $Window
:dataType
killalltriggers
setTextLineTrigger iname :info "Trader Name"
setTextLineTrigger slash :slashCmd "³Turns"
setTextTrigger sectorMove :sectorMove "Command [TL="
setTextLineTrigger figDeploy :figDeploy "Done. You have"
pause
:figDeploy
getword CURRENTLINE $fighters 4
goto :setWindowContent
:sectorMove
gettext CURRENTLINE $nsector "]:[" "] ("
if ($nSector <> $curSector)
setVar $curSector $nSector
goto :setWindowContent
else
goto :dataType
end
:Info
killAllTriggers
setTextLineTrigger iExp :iExp "Rank and Exp"
setTextLineTrigger iShipInfo :iShipInfo "Ship Info"
setTextLineTrigger itpw :iTurnsPerWarp "Turns to Warp"
setTextLineTrigger iSector :iSector "Current Sector"
setTextLineTrigger iTurns :iTurns "Turns left"
setTextLineTrigger iFighters :iFighters "Fighters :"
setTextLineTrigger iShields :iShields "Shield points :"
setTextLineTrigger ilMines :iLmines "Limpet Mines T2"
setTextLineTrigger iMines :iAmines "Armid Mines T1"
setTextLineTrigger iGtorps :iGtorps "Genesis Torps :"
setTextTrigger iCmd :iCmd "Command [TL"
setTextLineTrigger iCredits :iCredits "Credits :"
pause
:iExp
getword Currentline $exp 5
getword CURRENTLINE $align 7
getwordpos $align $pos "="
cuttext $align $align $pos 999
striptext $align "="
pause
:iShipInfo
getText CURRENTLINE $ship "Info : " " Ported"
pause
:iSector
getword currentline $curSector 4
pause
:iTurns
getword CURRENTLINE $turns 4
pause
:iTurnsPerWarp
getword CURRENTLINE $tpw 5
:iFighters
getword CURRENTLINE $fighters 3
pause
:iShields
getword CURRENTLINE $shields 4
pause
:iAMines
getword CURRENTLINE $aMine 4
pause
:iLmines
getWord CURRENTLINE $lMine 4
pause
:iGtorps
getWord CURRENTLINE $Gtorp 4
pause
:iCredits
getWord CURRENTLINE $credits 3
pause
:iCmd
goto :setWindowContent
:slashCmd
:get_stats
killalltriggers
setvar $stats 0
:get_stats1
settextlinetrigger get_stats1 :get_stats1 ""
setvar $line currentline
If ($stats = 0)
setvar $stats $line
else
mergetext $stats $line $stats
end
GetWordPos currentline $get_stats_end "Ship"
If ($get_stats_end > 0)
goto :get_stats_end
end
pause
:get_stats_end
KillTrigger get_stats1
striptext $stats " "
striptext $stats "³"
# striptext $stats ","
mergetext $stats "END" $stats
Gettext $stats $ship_Num "Ship" "Other"
If ($ship_Num = "")
Gettext $stats $ship_Num "Ship" "END"
getlength $ship_num $ship_num_length
subtract $ship_num_length 6
CutText $ship_num $ship_num 1 $ship_num_length
end
Gettext $stats $curSector "Sect" "Turns"
Gettext $stats $turns "Turns" "Creds"
Gettext $stats $credits "Creds" "Figs"
Gettext $stats $fighters "Figs" "Shlds"
Gettext $stats $shields "Shlds" "Hlds"
Gettext $stats $holds "Hlds" "Ore"
Gettext $stats $ore "Ore" "Org"
Gettext $stats $Org "Org" "Equ"
Gettext $stats $Equ "Equ" "Col"
Gettext $stats $Col "Col" "Phot"
If ($Col = "")
Gettext $stats $Col "Col" "Armd"
setvar $ptorps 0
else
Gettext $stats $ptorps "Phot" "Armd"
end
Gettext $stats $Amine "Armd" "Lmpt"
Gettext $stats $Lmine "Lmpt" "GTorp"
Gettext $stats $Gtorp "GTorp" "TWarp"
Gettext $stats $Twarp "TWarp" "Clks"
Gettext $stats $Cloak "Clks" "Beacns"
Gettext $stats $Beacon "Beacns" "AtmDt"
Gettext $stats $AtmDt "AtmDt" "Crbo"
Gettext $stats $Crbo "Crbo" "EPrb"
Gettext $stats $EProbe "EPrb" "MDis"
Gettext $stats $MDis "MDis" "PsPrb"
Gettext $stats $PsPrb "PsPrb" "PlScn"
Gettext $stats $PlScn "PlScn" "LRS"
Gettext $stats $LRS "LRS" "Aln"
Gettext $stats $Align "Aln" "Exp"
Gettext $stats $Exp "Exp" "Corp"
If ($Exp = "")
Gettext $stats $Exp "Exp" "Ship"
setvar $Corp 0
else
Gettext $stats $Corp "Corp" "Ship"
end
goto :setWindowContent
_________________
/ Promethius / Enigma / Wolfen /
"A man who has no skills can be taught, a man who has no honor has nothing."