View unanswered posts | View active topics It is currently Mon Apr 20, 2026 9:40 pm



Reply to topic  [ 5 posts ] 
 Ship Stats Window For ZOC 
Author Message
Ambassador
User avatar

Joined: Mon Feb 09, 2004 3:00 am
Posts: 3141
Location: Kansas
Unread post 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."


Sun Apr 19, 2009 3:06 pm
Profile ICQ
Gunnery Sergeant
User avatar

Joined: Sat Mar 28, 2009 12:11 pm
Posts: 20
Unread post Re: Ship Stats Window For ZOC
Error 20 running "C:\Documents and Settings\Anonymous\Desktop\Tradewars\StatsWindow.zrx": Name expected
Error 20.1: Name required; found ":"


Sun Apr 19, 2009 7:37 pm
Profile
Ensign
User avatar

Joined: Mon Jul 23, 2007 6:20 pm
Posts: 288
Location: United Kingdom
Unread post Re: Ship Stats Window For ZOC
Did ya save it to same dir all ur scripts are in?

_________________
Gul D'Tek (The Cardassian Hitman)
ICQ - 446445340

I'm a TW and #SD# ing you was my idea!

Very funny, Scotty. Now beam down my clothes.~ J.T.Kirk


Sun Apr 19, 2009 8:02 pm
Profile ICQ
Ambassador
User avatar

Joined: Mon Feb 09, 2004 3:00 am
Posts: 3141
Location: Kansas
Unread post Re: Ship Stats Window For ZOC
Rabbi Dan wrote:
Error 20 running "C:\Documents and Settings\Anonymous\Desktop\Tradewars\StatsWindow.zrx": Name expected
Error 20.1: Name required; found ":"



Sorry, the subject title is misleading. This is a TWX script for those who run Zoc and want a stats window. It is a .TS file and ran through TWX.

_________________
               / Promethius / Enigma / Wolfen /

"A man who has no skills can be taught, a man who has no honor has nothing."


Sun Apr 19, 2009 8:14 pm
Profile ICQ
Gunnery Sergeant
User avatar

Joined: Sat Mar 28, 2009 12:11 pm
Posts: 20
Unread post Re: Ship Stats Window For ZOC
Promethius wrote:
Sorry, the subject title is misleading. This is a TWX script for those who run Zoc and want a stats window. It is a .TS file and ran through TWX.

Ah, I didn't even read the script or anything. It works fine in TWXProxy, thanks for the script!


Sun Apr 19, 2009 8:18 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 23 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.