/* This is a Find SGA utility for 2.0!!!! */ /* Thats right!! you heard us! All of the experts said this couldn't be*/ /* done. So much for that therory. To set this script up you must go */ /* to the ships computer (hit the C key from the main prompt) We turn */ /* off the color and ansi just for speed (thats up to you) Then start */ /* this script, it will begin searching for Stardock. Sooner or latter */ /* it will find Stardock, Alpha and Rylos, assuming that the sysop did */ /* go through and use T-edit to move them. You will be given a list of */ /* sectors that are probable locations. In a 5000 sector game this is */ /* far better then random searching and dropping of fighters around */ /* Fedspace every night. There is very little chance that this script */ /* will run through a 5000 secter game in the time you have. Don't get */ /* worried it saves off a file with the list and tells you where you */ /* stoped at, so that you can use your turns to check the ones it did */ /* find. If you didn't find it you can send the last sector checked to */ /* your corp partner (if he has this script) or you can just try again */ /* latter. Be sure and write the ending number down! */ /* To STOP this script you must use two (2) clicks of the mouse if you */ /* don't your files will not close and you may lose all of the data you */ /* have collected. It does take some time to find Stardock and may not*/ /* find it on the first day. But it will find it! The advantage of */ /* this script is that you can still search for Stardock with part of */ /* your time and use your turns for making money and checking only */ /* those sectors that have a good chance of being Stardock. The guys */ /* out warping around are going to be at a big disadvantage when you */ /* find stardock and have the credits already on your ship to do what */ /* you would normally do if Stardock had been posted. */ /* One last note, make sure you clear your avoids before running this */ /* script. Or you are wasting your time. When you have run this script*/ /* for a while and you have found some possibilities terminate the */ /* script by pressing the right mouse button!! DO NOT USE THE SCRIPT */ /* STOP COMMAND ON THE TERMINUS MENU!!! If you do your files will NOT */ /* be closed! and if you forgot to write down the numbers they will be */ /* LOST! Ok give it a try and have fun. */ init: path$ = "twdata:" gosub invalidmode onmouse goto finish if path$ == "dh1:tradewars/fakepath" getstring "What is Path Name?" , path$ endif chdir path$ filename$ = "" getstring "Please enter BBS name." , filename$ open output 4, filename$ + ".checked" close # 4 if exists(filename$ + ".one-way-in") doappend$ = "a" getstring "Overwrite files or Append? [O/A]" , doappend$ if left$(lower$(doappend$),1) == "o" open output 1, filename$ + ".orphan" open output 2, filename$ + ".one-way-in" open output 3, filename$ + ".possible" open output 4, filename$ + ".checked" close # 4 else open append 1, filename$ + ".orphan" open append 2, filename$ + ".one-way-in" open append 3, filename$ + ".possible" copy$ = "copy twdata:" + filename$ + ".one-way-in twdata:" + filename$ + ".checked" execute copy$ endif else open output 1, filename$ + ".orphan" open output 2, filename$ + ".one-way-in" open output 3, filename$ + ".possible" open output 4, filename$ + ".checked" close # 4 endif xstart = 1000 xend = 11 firstposible = 0 secondposible = 0 thirdposible = 0 fourthposible = 0 getint "Enter a starting number." , xstart , 13 , 5000 xhighest = xstart - 2 getint "Enter a ending number." , xend , 11 , xhighest zstart = 20 zend = 920 send "\xc8\xc9\xca\xcb\xcc\xcd" wait ":" send "f1^m2^m" wait ":" main: for x = xstart to xend step -1 reenter: y = x - 1 command$ = "f" + str$(x) + "^m" + str$(y) + "^m" send command$ when 1 "Avoids?" goto orphansector gosub getpathtwo path$ = pathstring$ command$ = "f" + str$(y) + "^m" + str$(x) + "^m" send command$ gosub getpathtwo backpath$ = pathstring$ tpen = 1 lngbackpath = len(backpath$) if len(backpath$) == len(path$) print local "Matched length" else print local "Lengths did not match, testing for one way warps...." oneflag = 0 gosub tobrackthree gosub returnpath if oneflag == 0 print local "Did not find a one way, checking return path...." temppath$ = path$ path$ = backpath$ backpath$ = temppath$ gosub tobrackthree gosub returnpath endif endif nextsector: next finish: close #1 close #2 close #3 beep print local print local "This script stopped at " ; x ; ", you can continue from here later." print local finishtwo: end orphansector: pop send "n" beep tpen = 3 print local print local "******** Found an orphan sector at " ; x - 1 ; " *******" tpen = 1 write #1 str$(x - 1) x = x - 2 wait ":" send "f1^m2^m" wait ":" goto reenter getpath: wait ":" firstline$ = getline$(row - 2) secondline$ = getline$(row - 1) checkspace$ = left$(firstline$,1) if checkspace$ == " " pathstring$ = trim$(secondline$) else pathstring$ = trim$(firstline$) + " " + trim$(secondline$) endif gosub tobrack return getpathtwo: wait ":" firstline$ = getline$(row - 2) secondline$ = getline$(row - 1) checkspace$ = left$(firstline$,1) if checkspace$ == " " pathstring$ = trim$(secondline$) else pathstring$ = trim$(firstline$) + " " + trim$(secondline$) endif return getpaththree: firstline$ = getline$(row - 2) secondline$ = getline$(row - 1) checkspace$ = left$(firstline$,17) if checkspace$ == "The shortest path" pathstring$ = trim$(secondline$) else pathstring$ = trim$(firstline$) + " " + trim$(secondline$) endif gosub tobrack return tobrack: bra = instr(pathstring$ , "(") if bra > 0 lftbra$ = left$(pathstring$ , bra - 1) rgtbra$ = right$(pathstring$ , len(pathstring$) - bra) pathstring$ = lftbra$ + rgtbra$ goto tobrack endif tobracktwo: bra = instr(pathstring$ , ")") if bra > 0 lftbra$ = left$(pathstring$ , bra - 1) rgtbra$ = right$(pathstring$ , len(pathstring$) - bra) pathstring$ = lftbra$ + rgtbra$ goto tobracktwo endif return tobrackthree: bra = instr(path$ , "(") if bra > 0 lftbra$ = left$(path$ , bra - 1) rgtbra$ = right$(path$ , len(path$) - bra) path$ = lftbra$ + rgtbra$ goto tobrackthree endif tobrackfour: bra = instr(path$ , ")") if bra > 0 lftbra$ = left$(path$ , bra - 1) rgtbra$ = right$(path$ , len(path$) - bra) path$ = lftbra$ + rgtbra$ goto tobrackfour endif return returnpath: posofspacer = instr(path$ , ">") firstnumber$ = left$(path$ , posofspacer - 1) path$ = right$(path$ , len(path$) - posofspacer - 1) nextspacer = instr(path$ , ">") if nextspacer > 0 secondnumber$ = left$(path$ , nextspacer - 1) else secondnumber$ = path$ endif command$ = "f" + secondnumber$ + "^m" + firstnumber$ + "^m" send command$ gosub getpath returnpath$ = pathstring$ posofspacer = instr(returnpath$ , ">") returnpath$ = right$(returnpath$ , len(returnpath$) - posofspacer - 1) if instr(returnpath$ , ">") > 0 testnum = val(secondnumber$) gosub checkfile if infile == 0 tpen = 3 print local "******** Found a one-way jump into " ; secondnumber$ ; ", testing. *******" tpen = 1 print local ":" ; write # 2 , secondnumber$ open append 4, filename$ + ".checked" write # 4, secondnumber$ close # 4 tpen = 1 gosub checkwaysout print local "Continuing previous task...." oneflag = oneflag + 1 endif endif if instr(path$ , ">") > 0 goto returnpath endif return checkfile: infile = 0 open input 4, filename$ + ".checked" checkfiletwo: read # 4, checked$ if checked$ == "END_OF_FILE" goto alreadychecked endif if val(checked$) == testnum infile = -1 endif goto checkfiletwo alreadychecked: close # 4 return checkwaysout: send "q" wait "command" testsector = val(secondnumber$) waysout = 0 testing: command$ = "f" + str$(testsector) + "^m1^m" send command$ when 1 "Error" goto donetestingtwo wait "command" gosub getpaththree posofspacer = instr(pathstring$ , ">") pathstring$ = right$(pathstring$ , len(pathstring$) - posofspacer - 1) posofspacer = instr(pathstring$ , ">") if posofspacer > 0 pathstring$ = left$(pathstring$ , posofspacer - 1) avoidsector = val(pathstring$) send "v" wait "avoid" command$ = str$(avoidsector) + "^m" send command$ wait "command" waysout = waysout + 1 goto testing donetesting: when 1 if waysout == 6 beep print local "**** Sector " ; str$(testsector) ; " is a possible location of Stardock! ****" beep write # 3 , str$(testsector) endif endif send "\xc8\xc9\xca\xcb\xcc\xcd" wait ":" send "f1^m2^m" wait ">" wait ":" return donetestingtwo: when 1 wait "Clear" send "y" wait "command" goto donetesting invalidmode: cmdlne$ = left$(getline$(row + 1) , 8) if cmdlne$ != "Computer" beep tpen = 3 print local print local "You need to be at the Computer command prompt to run this script!" tpen = 1 goto finishtwo endif return