View unanswered posts | View active topics It is currently Tue Apr 21, 2026 8:38 pm



Reply to topic  [ 1 post ] 
 Universe Stats Script 
Author Message
Ambassador
User avatar

Joined: Mon Feb 09, 2004 3:00 am
Posts: 3141
Location: Kansas
Unread post Universe Stats Script
The script will show you the make up of the universe after you have a ZTM or after exploring/eprobing. It could be written better w/o a doubt and the :colorIt section really isn't needed, but I like the effect on a line - actually need to see it to know what I mean.

# Universe stats by Promethius 11/2008

setArray $sectors SECTORS
setVar $sectors7In 0
setVar $totalWarps 0
setVar $backdoors 0
setVar $backDoorSectors 0
setVar $i 1

while ($i <= SECTORS)
if (sector.warpcount[$i] > 0)
add $totalWarps sector.warpCount[$i]
add $sectors[sector.warpCount[$i]] 1
if (sector.warpInCount[$i] = 7)
add $sectors7In 1
end
if (sector.backDoorCount[$i] > 0)
add $backDoors sector.backDoorCount[$i]
add $backDoorSectors 1
end
end
add $i 1
end
echo "**"
echo ANSI_15 " Universe Stats by Promethius"
setVar $lineIn "--------------------------------"
gosub :colorIt
echo "* " $lineOut
setVar $i 1
while ($i <= 6)
setVar $lineIn $sectors[$i]
gosub :pad
echo "*" $pad ANSI_11 $sectors[$i] ANSI_12 " sectors with " ANSI_11 $i ANSI_12 " warp(s) out."
add $i 1
end
setVar $lineIn "--------------------------------"
gosub :colorIt
echo "* " $lineOut
setVar $lineIn $sectors7in
gosub :pad
echo "*" ANSI_11 $pad $sectors7In ANSI_12 " sectors with 7-warps in."

setVar $lineIn $backDoorSectors
gosub :pad

echo "*" ANSI_11 $pad $backDoorSectors ANSI_12 " sectors have backdoors."
setVar $lineIn $backDoors
gosub :pad
echo "*" ANSI_11 $pad $backDoors ANSI_12 " backdoors exist."
setVar $lineIn "--------------------------------"
gosub :colorIt
echo "* " $lineOut
echo "* " ANSI_11 $totalWarps ANSI_12 " total warps found**"
halt


# -=-=-= goSubs

:pad
setVar $pad ""
getlength $lineIn $len
while ($len < 6)
setVar $pad $pad & " "
add $len 1
end
return


:colorIt
setVar $clr 0
setVar $lineOut ""
getLength $lineIn $len
setVar $i 1
while ($i <= $len)
cuttext $lineIn $tmpLine $i 1
add $clr 1
if ($clr = 1)
setVar $lineOut $lineOut & ANSI_15 & $tmpLine
else
setVar $lineOut $lineOUt & ANSI_12 & $tmpLine
setVar $clr 0
end
add $i 1
end
return

_________________
               / Promethius / Enigma / Wolfen /

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


Mon Nov 24, 2008 5:17 pm
Profile ICQ
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

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