# Traitor's Grid percentage checker # ----====[Create Figged Sectors Array]====---- # Creates Array $figsec. If there is a fig in a sector, it sets the value of # $figsec[sector #] to 1 setPrecision 0 :getfigs echo ANSI_10 "**AT GET FIGS*" setarray $figsec SECTORS send "'*Traitor's Grid Checker v1.0*Refreshing figgies, please wait.**" send "g" WaitFor "===" SetTextLineTrigger Toll :makefigarray "Toll" SetTextLineTrigger Def :makefigarray "Defensive" SetTextLineTrigger Off :makefigarray "Offensive" SetTextTrigger GotFigs :gotfigs "Command" Pause :makefigarray KillTrigger Toll KillTrigger Def KillTrigger Off GetWord CURRENTLINE $figgedsec 1 GetWord CURRENTLINE $figqty 2 isnumber $figqtycheck $figqty if ($figqtycheck = FALSE) striptext $figqty "T" multiply $figqty 1000 end GetWord CURRENTLINE $figowner 3 GetWord CURRENTLINE $figtype 4 setvar $figsec[$figgedsec] 1 setvar $figsec[$figgedsec][1] $figqty setvar $figsec[$figgedsec][2] $figtype setvar $figsec[$figgedsec][3] $figowner add $figsec 1 SetTextLineTrigger Toll :makefigarray "Toll" SetTextLineTrigger Def :makefigarray "Defensive" SetTextLineTrigger Off :makefigarray "Offensive" pause :gotfigs killtrigger GotFigs killtrigger Toll killtrigger Def killtrigger Off echo ANSI_2 "***GOT FIGS**" ANSI_7 setvar $count 1 setPrecision 3 setvar $gridpercent $figsec multiply $gridpercent 100 divide $gridpercent SECTORS round $gridpercent 2 setPrecision 0 while ($count <= SECTORS) if ($figsec[$count][2] = "Toll") add $tollfig $figsec[$count][1] end if ($figsec[$count][2] = "Defensive") add $deffig $figsec[$count][1] end if ($figsec[$count][2] = "Offensive") add $offfig $figsec[$count][1] end add $totalfigs $figsec[$count][1] if (SECTOR.WARPINCOUNT[$count] = 1) add $deadendcount 1 if ($figsec[$count] = 1) add $deadendfig 1 end end add $count 1 end send "'*TOTAL FIGGED SECTORS: " $figsec "*" send "Percent of Grid " $gridpercent "%*" send "Total figs in space: " $totalfigs "*" send " Defensive figs: " $deffig "* Offensive figs: " $offfig "* Tolled figs: " $tollfig "*" send "Total dead ends: " $deadendcount ". We have " $deadendfig " dead ends figged.**" send "@" waitfor "hundredths" echo ANSI_15 "*TOTAL FIGGED SECTORS: " ANSI_10 $figsec echo ANSI_15 "*Percent of Grid " ANSI_10 $gridpercent "%" echo ANSI_15 "*Total figs in space: " ANSI_10 $totalfigs echo ANSI_15 "* Defensive figs: " ANSI_10 $deffig ANSI_15 " * Offensive figs: " ANSI_10 $offfig ANSI_15 " * Tolled figs: " ANSI_10 $tollfig echo ANSI_15 "*Dead ends: " ANSI_10 $deadendcount ANSI_15 " we have " ANSI_10 $deadendfig ANSI_15 " dead ends figged.**" halt