www.ClassicTW.com
https://mail.black-squirrel.com/

Game Data?
https://mail.black-squirrel.com/viewtopic.php?f=15&t=19144
Page 1 of 1

Author:  Parrothead [ Tue Apr 10, 2007 9:16 pm ]
Post subject: 

Sing wishes to discuss Game data . Dont know if this qualifies but here is something I thru together for the purpose of discussion.
Filters ck nego file in easier to use data.
 
Code:
#Author Team Kraaken
#this script will filter your ck nego file for MCIC's
#compile for use in M()Mbot....else use the stand alone version
setvar $negofile ("_ck_" & GAMENAME & ".nego")
setvar $portfile (Gamename & "_Nego_BestPorts.txt")
setvar $sortfile (Gamename & "_Nego_BestPorts_Sorted.txt")
fileexists $exists $negofile
setvar $cursec currentsector
if ($exists = 0)
      clientmessage "No nego file"
      halt
end
#get mombot variables here
#comment out for stand alone script
loadvar $parm1
lowercase $parm1
loadvar $parm2
#default for bot command
if ($parm2 = 0)
setvar $parm2 50
end
#----------commment out for bot use---start
:input0
echo ansi_14 "* 'e' for EQ or 'o' for ORG or 'q' for quit "
getconsoleinput $parm1 singlekey
lowercase $parm1
if (($parm1 <> "e") and ($parm1 <> "o") and ($parm1 <> "q"))
goto :input0
end
if ($parm1 = "q")
halt
end
#----------commment out for bot use---end
if ($parm1 = "e")
      setvar $type "equ"
      setvar $product "EQUIPMENT"
elseif ($parm1 = "o")
      setvar $type "org"
      setvar $product "ORGANICS"
else
   #send "'Product Parameter out of bounds*"
      Echo "Parameter error*"
      halt
end
#----------commment out for bot use ---start
:input1
echo ansi_14 "* Input Minimum MCIC Value 'q' for quit "
getconsoleinput $parm2
isnumber $ck $parm2
if ($ck = 0)
goto :input1
end
#----------commment out for bot use ---end
isnumber $ck $parm2
if ($ck = 0)
#send "'Product Parameter out of bounds*"
   clientmessage "Bad Parameter"
   halt
end
if ($parm1 = "e")
   if ($parm2 < 20) or ($parm2 > 65)
   #send "'MCIC Parameter out of bounds*"
      clientmessage "Parameter error*"
      halt
   end
elseif ($parm1 = "e")
   if ($parm2 < 25) or ($parm2 > 75)
   #send "'MCIC Parameter out of bounds*"
      clientmessage "Parameter error*"
      halt
   end
else
   #send "'MCIC Parameter out of bounds*"
      clientmessage "Parameter error*"
    halt
end
send #145
echo ansi_15 "*Working.................*"
setarray $store sectors
readtoarray $negofile $negoarray
setvar $k 1
while ($k <= $negoarray)
getwordpos $negoarray[$k] $pos0 "MCIC"
    if ($pos0 > 0)
       if ($temp <> "0")
       getwordpos $negoarray[$k] $pos1 $type
          if ($pos1 > 0)
          gettext $negoarray[$k] $temp0 "- MCIC" "/-"
          setvar $store[$temp] $temp0
          end
       end
    end
getwordpos $negoarray[$k] $pos "Sector"
    if ($pos > 0)
          getword $negoarray[$k] $temp 2
          striptext $temp " "
          setvar $loop 1
    end
add $k 1
end
setvar $i 1
while ($i <= sectors)
        if ($store[$i] <> "0")
           setvar $test $store[$i]
               striptext $test "-"
           if ($test >= $parm2)
              add $idx 1
              setvar $filter[$idx] $i
              #test echo
              #echo $i & #9 & $store[$i] & "*"
              write $portfile ($i & #9 & $store[$i] & "*")
                 #uncomment these 2 lines to store info in Ephaggle parameters
  #setSectorParameter $i $product & "-" $store[$i]
  #setSectorParameter $i $product & "+" $store[$i]
           end
       end
add $i 1
end
#run a ports nearest to farthest from current sector
getNearestWarps $warparray $cursec
setvar $i 1
while ($i <= $warparray)
      setvar $k 1
        while ($k <= $idx)
              if ($warparray[$i] = $filter[$k])
                #test echo
                #echo $filter[$k] & "   " & $store[$filter[$k]] & "*"
                write $sortfile ($filter[$k] & #9 & $store[$filter[$k]] & "*")
             end
         add $k 1
       end
    add $i 1
end
halt

 

Author:  Uncle Sam [ Tue Apr 10, 2007 9:50 pm ]
Post subject: 

Hahahaa... Looks like "geek speak" to me!!!

Sorry but end of my discussion. But to think all these years I had to use the stupid edit find command in notepad!!!

Author:  Parrothead [ Wed Apr 11, 2007 12:07 am ]
Post subject: 

added scan feature and posted on Navhaz.com and Grimy's with help file and source ts file. for your viewing pleasure

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/