| www.ClassicTW.com https://mail.black-squirrel.com/ |
|
| listSectorParameters https://mail.black-squirrel.com/viewtopic.php?f=15&t=25387 |
Page 1 of 1 |
| Author: | Parrothead [ Fri Jan 08, 2010 12:13 am ] |
| Post subject: | listSectorParameters |
Code: isnumber $numck $parm1 if ($numck = TRUE) if ($parm1 > 0) and ($parm1 < sectors) setvar $s $parm1 listSectorParameters $s $parms echo ansi_11 "*Parameter" & #9 & ansi_10 "Value*" setVar $b 1 while ($b <= $parms) getSectorParameter $s $parms[$b] $value echo $parms[$b] & #9 & $value & "*" add $b 1 end end end will output parameters of a sector compile this and add it to your bot |
|
| Author: | LoneStar [ Sat Jan 09, 2010 9:09 am ] |
| Post subject: | Re: listSectorParameters |
I haven't Scripted for a few months now. But I'm pretty sure the above has a few issues (output text, and ($parm1 < SECTORS)). Code: isnumber $numck $parm1 if ($numck = TRUE) if ($parm1 > 0) and ($parm1 <= SECTORS) setvar $s $parm1 GOSUB :SPIT_IT_OUT elseif ($parm1 = 0) setvar $s CURRENTSECTOR GOSUB :SPIT_IT_OUT end end Echo "**" HALT :SPIT_IT_OUT uppercase $parm2 if ($parm2 = "E") setVar $ERASE TRUE end listSectorParameters $s $parms echo ansi_15 & "**Parameter" & ANSI_7 & "/" & ansi_10 & "Value*" setVar $b 1 while ($b <= $parms) if ($ERASE) setSectorparameter $s $parms[$b] "" end getSectorParameter $s $parms[$b] $value echo ANSI_15 & $parms[$b] & ANSI_7 & "=" & ANSI_10 & $value & "*" add $b 1 end RETURN Was trolling with a case of scriptitis. Code: Echo "**!!HAPPY NEW YEAR!!**" |
|
| Author: | NjoY [ Sat Jan 09, 2010 9:35 am ] |
| Post subject: | Re: listSectorParameters |
WB LS. Happy new year to you too. I was just gonna reply and say that something was missing but you beat me to it. Now it outputs Parameter/Value FIGSEC=1 For every sector incl. fedspace. |
|
| Author: | Parrothead [ Sat Jan 09, 2010 8:09 pm ] |
| Post subject: | Re: listSectorParameters |
That snippet is right out of my bot and works just fine. However it was meant as a example of how to use a function not as a running script. Am am sure peeps have other uses for it. |
|
| Page 1 of 1 | All times are UTC - 5 hours |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|