/* This is a paired 5 point Sell-Steal-Move (SSM) routine (with jetison)*/ /* To use this script you MUST have a Psychic Probe mounted on your */ /* ship. To set this up and make it work you must be parked over one of*/ /* the ports in an Evil Pair. (see Guru-Dat.docs) with a full load of */ /* Equ. If you wish to steal other products you must be at the proper */ /* type of pair. When you start this script it will asked to answer a */ /* few questions. Enter the proper sector numbers and when asked what */ /* type of product to steal Enter f=for Fuel Ore o= for Organics */ /* and e=for Equipment. The defualt is Equ. You will then be asked */ /* how many times you want to run the loop. The defualt is set to leave*/ /* you 40 turns but you can override this if you want to risk it. */ /* The jettison routine is a points building routine, it buys small */ /* ammounts of product and throws it out the hatch. It will help you */ /* build experience in the early stages of the game. After you have */ /* built sufficient experience you won't need this option anymore. */ /* This technique works best at SSB ports. Note that you can't toss */ /* stuff out of the hatch if one of your ports is in Fedspace. */ /* Hint: A reasonable amount of equipment to steal is experience / 40. */ /* If you want to risk it you can go as low as Exp / 35 */ /* We think it may be possable to go as low as 30, It's still untested */ /* If for some reason you want to steal less holds then your ship has */ /* you MUST use colonists to fill up the extra holds. The selling part */ /* of this script will sell everything that the port will buy. */ gosub init gosub readpsychic gosub stealitback baseone = base bestbaseone = bestbase gosub movetotwo gosub readpsychic gosub stealitback basetwo = base bestbasetwo = bestbase gosub goagain gosub movetoone main: gosub partone gosub stealitback gosub movetotwo gosub partthree gosub stealitback gosub goagain gosub movetoone goto main finish: end init: rateing$ = "unknown" test$ = "off" products$ = "foe" sellone = 103 sellthree = 103 leeway = 36 holds = 0 rateing = 0 bestbase = 0 bestbaseone = 0 bestbasetwo = 0 counter = 0 counteroffer = 0 stealtimes = 0 totalexp = 0 finalexp = 0 buyfuelone = 95 buyorgone = 95 buyequone = 95 buyfuelthree = 95 buyorgthree = 95 buyequthree = 95 gosub invalidmode onmouse goto finish gosub parseinfo if totholds == emptyholds goto nostuff endif portone = 0 portone$ = str$(cursect) porttwo = 0 porttwo$ = "" setfirstport: getstring "What is the first port number?" , portone$ portone = val(portone$) if portone != cursect beep tpen = 3 print local print local "You must start out over the first port." tpen = 1 goto finish endif setsecondport: getstring "what is the second port number?" , porttwo$ porttwo = val(porttwo$) if porttwo < 1 gosub validport goto setsecondport endif if porttwo > 5000 gosub validport goto setsecondport endif if portone == porttwo beep print local "You need two different port numbers!" goto setsecondport endif selectproduct: productone$ = "e" getstring "What do you want to steal? (f,o,e)" , productone$ productone$ = lower$(left$(productone$ , 1)) productone = instr(products$ , productone$) if productone < 1 beep print local "This must be one of these letters: f,o,e." goto selectproduct endif if productone == 1 stuffholds = fuelholds endif if productone == 2 stuffholds = organicsholds endif if productone == 3 stuffholds = equipmentholds endif if stuffholds == 0 goto nostuff endif if stuffholds != totholds goagain$ = "No" getstring "You have mixxed product in your holds, continue?" , goagain$ goagain$ = lower$(left$(goagain$ , 1)) if goagain$ != "y" goto finish endif endif counttimes = 0 loopturns = (turnstowarp + 2) * 2 numtimes = (turns - 40) / loopturns maxtimes = turns / loopturns if numtimes < 1 numtimes = 0 endif getint "How many times do you want to run this loop?" , numtimes , 0 , maxtimes if numtimes < 1 goto finish endif hound$ = "No" getstring "Turn on the Jettison Routine?" , hound$ hound$ = lower$(left$(hound$ , 1)) return readpsychic: send "pt" when 1 "Suddenly" goto busted wait "]?" psyone: buycheck$ = getline$(row) buycheck$ = left$(buycheck$ , 13) if buycheck$ == "We are buying" send "^m" wait "?" findout$ = right$(trim$(getline$(row + 1)) , 2) if findout$ == "]?" /* ship is mega holded */ goto psyone endif if findout$ == "(?" /* ship is mega holded */ wait ") :" return endif gosub hackprice base = offer counter = offer command$ = "^m" send command$ wait "?" findout$ = right$(trim$(getline$(row + 1)) , 2) if findout$ == "(?" /* accepted */ wait ") :" psychic$ = trim$(getline$(row - 3)) psychictwo$ = trim$(getline$(row - 4)) gosub hackpsychic return else psychic$ = trim$(getline$(row - 4)) psychictwo$ = trim$(getline$(row - 5)) gosub hackpsychic goto psyone endif endif if buycheck$ == "We are sellin" send "0^m" wait "?" findout$ = right$(trim$(getline$(row + 1)) , 2) if findout$ == "]?" goto psyone else wait ") :" return endif endif goto fallout partone: send "pt" when 1 "Suddenly" goto busted wait "]?" tradeone: buycheck$ = getline$(row) buycheck$ = left$(buycheck$ , 13) if buycheck$ == "We are buying" send "^m" wait "?" findout$ = right$(trim$(getline$(row + 1)) , 2) if findout$ == "]?" /* ship is mega holded */ goto tradeone endif if findout$ == "(?" /* ship is mega holded */ wait ") :" return endif gosub hackprice base = baseone bestbase = bestbaseone gosub figure makeofferone: if counter > 25000 counter = offer endif command$ = str$(counter) + "^m" counteroffer = counter send command$ findoutone: wait "?" findout$ = right$(trim$(getline$(row + 1)) , 2) if findout$ == " ?" /* did not accept price (too high) */ counter = counter - holds + holds * 30 / 100 goto makeofferone endif if findout$ == "(?" /* don't know if accepted or not! */ wait ") :" notinterested$ = trim$(getline$(row - 1)) posofand = instr(notinterested$ , "and") notinterested$ = right$(notinterested$ , len(notinterested$) - posofand - 3) if val(notinterested$) > 0 point$ = trim$(getline$(row - 3)) gosub expdetectone return else counter = counter - holds + holds * 30 / 100 goto partone endif endif if findout$ == "]?" /* dont know if accept or not */ notinterested$ = trim$(getline$(row - 2)) posofand = instr(notinterested$ , "and") notinterested$ = right$(notinterested$ , len(notinterested$) - posofand - 3) if val(notinterested$) > 0 point$ = trim$(getline$(row - 4)) gosub expdetectone goto tradeone else counter = counter - holds + holds * 30 / 100 send "0^m" wait "?" wait ") :" goto partone endif endif goto findoutone endif if buycheck$ == "We are sellin" afterbuy: gosub checkholds checksell$ = lower$(mid$(getline$(row + 1) , 19 , 1)) if hound$ == "y" if checksell$ == "f" holdsamount = 14 goto enteramount endif if checksell$ == "o" holdsamount = 8 goto enteramount endif holdsamount = 3 else send "0^m" wait "?" findout$ = right$(trim$(getline$(row + 1)) , 2) if findout$ == "]?" goto tradeone else wait ") :" return endif endif enteramount: if holdsamount > emptyholds holdsamount = emptyholds endif command$ = str$(holdsamount) + "^m" send command$ wait "] ?" gosub getbuyone makeoffertwo: gosub hackprice counter = offer * buyone / 100 command$ = str$(counter) + "^m" send command$ findouttwo: wait "?" findout$ = right$(trim$(getline$(row + 1)) , 2) if findout$ == " ?" /* did not accept price (too low) */ adjust = 1 gosub adjustbuyone goto makeoffertwo endif if findout$ == "(?" /* don't know if accepted or not! */ wait ") :" notinterested$ = trim$(getline$(row - 3)) if notinterested$ == "We're not interested." adjust = 1 gosub adjustbuyone /* not accepted, way too low */ return else point$ = trim$(getline$(row - 3)) gosub expdetect adjust = adjust * (-1) gosub adjustbuyone return endif endif if findout$ == "]?" /* dont know if accept or not */ notinterested$ = trim$(getline$(row - 4)) if notinterested$ == "We're not interested." adjust = 1 gosub adjustbuyone /* not accepted, way too low */ goto afterbuy else point$ = trim$(getline$(row - 4)) gosub expdetect adjust = adjust * (-1) gosub adjustbuyone goto afterbuy endif endif goto findouttwo endif goto fallout partthree: send "pt" when 1 "Suddenly" goto busted wait "]?" tradethree: buycheck$ = getline$(row) buycheck$ = left$(buycheck$ , 13) if buycheck$ == "We are buying" send "^m" wait "?" findout$ = right$(trim$(getline$(row + 1)) , 2) if findout$ == "]?" /* ship is mega holded */ goto tradethree endif if findout$ == "(?" /* ship is mega holded */ wait ") :" return endif gosub hackprice base = basetwo bestbase = bestbasetwo gosub figure makeofferthree: if counter > 25000 counter = offer endif command$ = str$(counter) + "^m" counteroffer = counter send command$ findoutthree: wait "?" findout$ = right$(trim$(getline$(row + 1)) , 2) if findout$ == " ?" /* did not accept price (too high) */ counter = counter - holds + holds * 30 / 100 goto makeofferthree endif if findout$ == "(?" /* don't know if accepted or not! */ wait ") :" notinterested$ = trim$(getline$(row - 1)) posofand = instr(notinterested$ , "and") notinterested$ = right$(notinterested$ , len(notinterested$) - posofand - 3) if val(notinterested$) > 0 point$ = trim$(getline$(row - 3)) gosub expdetectone return else counter = counter - holds + holds * 30 / 100 goto partthree endif endif if findout$ == "]?" /* dont know if accept or not */ notinterested$ = trim$(getline$(row - 2)) posofand = instr(notinterested$ , "and") notinterested$ = right$(notinterested$ , len(notinterested$) - posofand - 3) if val(notinterested$) > 0 point$ = trim$(getline$(row - 4)) gosub expdetectone goto tradethree else counter = counter - holds + holds * 30 / 100 send "0^m" wait "?" wait ") :" goto partthree endif endif goto findoutthree endif if buycheck$ == "We are sellin" afterbuythree: gosub checkholds checksell$ = lower$(mid$(getline$(row + 1) , 19 , 1)) if hound$ == "y" if checksell$ == "f" holdsamount = 14 goto enteramountthree endif if checksell$ == "o" holdsamount = 8 goto enteramountthree endif holdsamount = 3 else send "0^m" wait "?" findout$ = right$(trim$(getline$(row + 1)) , 2) if findout$ == "]?" goto tradethree else wait ") :" return endif endif enteramountthree: if holdsamount > emptyholds holdsamount = emptyholds endif command$ = str$(holdsamount) + "^m" send command$ wait "] ?" gosub getbuythree makeofferfour: gosub hackprice counter = offer * buythree / 100 command$ = str$(counter) + "^m" send command$ findoutfour: wait "?" findout$ = right$(trim$(getline$(row + 1)) , 2) if findout$ == " ?" /* did not accept price (too low) */ adjust = 1 gosub adjustbuythree goto makeofferfour endif if findout$ == "(?" /* don't know if accepted or not! */ wait ") :" notinterested$ = trim$(getline$(row - 3)) if notinterested$ == "We're not interested." adjust = 1 gosub adjustbuythree /* not accepted, way too low */ return else point$ = trim$(getline$(row - 3)) gosub expdetect adjust = adjust * (-1) gosub adjustbuythree return endif endif if findout$ == "]?" /* dont know if accept or not */ notinterested$ = trim$(getline$(row - 4)) if notinterested$ == "We're not interested." adjust = 1 gosub adjustbuythree /* not accepted, way too low */ goto afterbuythree else point$ = trim$(getline$(row - 4)) gosub expdetect adjust = adjust * (-1) gosub adjustbuythree goto afterbuythree endif endif goto findoutfour endif goto fallout stealitback: if hound$ == "y" send "j" wait "cargo" send "y" wait "Command" wait ") :" endif command$ = "pr^m s" + str$(productone) send command$ if holds < 1 when 1 "Suddenly" goto busted wait "]" wait "]" wait "]" hold$ = trim$(getline$(row+1)) posofbracket = instr(hold$ , "[") hold$ = right$(hold$ , len(hold$) - posofbracket) holds = val(hold$) endif send "^m" rateing = counteroffer / holds when 1 "Suddenly" goto busted when 2 "aren't" goto finish wait "Success" wait "Command" points$ = trim$(getline$(row - 1)) points$ = right$(points$ , len(points$) - 15) points = val(points$) totalexp = totalexp + points wait "?" stealtimes = stealtimes + 1 print local tpen = 3 print local "You have stolen " ; stealtimes ; " times, and have earned " ; totalexp ; " points." rateing$ = "poor" if rateing > 128 rateing$ = "fair" if rateing > 135 rateing$ = "good" if rateing > 142 rateing$ = "excellent" if rateing > 154 rateing$ = "best" endif endif endif endif print local "rateing = " ; rateing$ tpen = 1 return hackpsychic: pptest$ = left$(psychic$ , 1) if pptest$ != "<" psychic$ = psychictwo$ pptest$ = left$(psychic$ , 1) if pptest$ != "<" nopsychic: beep print local tpen = 3 print local "Your ship does NOT have a psychic probe! Exiting loop!" tpen = 1 send "0^m" goto finish endif endif posofdot = instr(psychic$ , ".") rghtpsy$ = mid$(psychic$ , posofdot + 1 , 2) lftpsy$ = mid$(psychic$ , posofdot - 3 , 3) psychic$ = lftpsy$ + rghtpsy$ psychic = val(psychic$) bestbase = base * 10000 / psychic return figure: counter = bestbase if offer >= base fullsets = (offer - base) / holds partsets = (offer - base) - (fullsets * holds) if partsets > holds * leeway / 100 fullsets = fullsets + 1 endif counter = counter + fullsets * holds overunder$ = "Rasing" else fullsets = (base - offer) / holds partsets = (base - offer) - (fullsets * holds) if partsets > holds * (100 - leeway) / 100 fullsets = fullsets + 1 endif counter = counter - fullsets * holds overunder$ = "Lowering" endif if test$ == "on" raised = fullsets * holds print local print local overunder$ ; " the base bid of " ; bestbase ; " by " ; raised ; " to " ; endif return movetoone: tpen = 3 print local "This loop has run " ; counttimes ; " time(s)." tpen = 1 print local "Command [TL=??:??:??] (?=Help) :" ; command$ = str$(portone) if portone < 600 command$ = command$ + "^m" endif send command$ wait "Help" wait "Help" return movetotwo: tpen = 3 print local "This loop has run " ; counttimes ; ".5 time(s)." tpen = 1 print local "Command [TL=??:??:??] (?=Help) :" ; command$ = str$(porttwo) if porttwo < 600 command$ = command$ + "^m" endif send command$ wait "Help" wait "Help" return goagain: counttimes = counttimes + 1 if counttimes < numtimes return endif goagain$ = "yes" getstring "do you wish to continue?" , goagain$ if goagain$ == "yes" return endif goto finish getbuyone: if checksell$ == "f" buyone = buyfuelone return endif if checksell$ == "o" buyone = buyorgone return endif buyone = buyequone return adjustbuyone: if buyone > 99 beep adjust = -4 endif buyone = buyone + adjust if checksell$ == "f" buyfuelone = buyone return endif if checksell$ == "o" buyorgone = buyone return endif buyequone = buyone return getbuythree: if checksell$ == "f" buythree = buyfuelthree return endif if checksell$ == "o" buythree = buyorgthree return endif buythree = buyequthree return adjustbuythree: if buythree > 99 beep adjust = -4 endif buythree = buythree + adjust if checksell$ == "f" buyfuelthree = buythree return endif if checksell$ == "o" buyorgthree = buythree return endif buyequthree = buythree return busted: wait "(s)." wait "(s)." points$ = trim$(getline$(row + 1)) points$ = right$(points$ , len(points$) - 12) points = val(points$) finalexp = totalexp - points print local print local beep tpen = 3 print local "You got busted, but, you were able to steal " ; stealtimes ; " times." print local "You gained " ; totalexp ; " experience points, and you lost " ; points ; "," print local "for a total of " ; finalexp ; "." print local "rateing = " ; rateing$ tpen = 1 print local "Command [TL=??:??:??] (?" ; goto finish fallout: beep tpen = 3 print local print local "Fell through! I don't know what to do!" tpen = 1 print local "Command [TL=??:??:??] (?=Help) :" ; end hackprice: offer$ = getline$(row + 1) offer$ = trim$(offer$) posofcomma = instr(offer$ , ",") if posofcomma > 1 lftoffer$ = left$(offer$ , posofcomma - 1) rghtoffer$ = right$(offer$ , len(offer$) - posofcomma) offer$ = lftoffer$ + rghtoffer$ endif offer$ = right$(offer$ , len(offer$) - 12) offer = val(offer$) return invalidmode: cmdlne$ = left$(getline$(row + 1) , 7) if cmdlne$ != "Command" beep tpen = 3 print local print local "You need to be at the main command prompt to run this script!" tpen = 1 goto finish endif return expdetectone: if point$ == "For your great trading you receive 2 experience point(s)." totalexp = totalexp + 2 sellone = sellone + 1 else if point$ == "For your good trading you receive 1 experience point(s)." totalexp = totalexp + 1 sellone = sellone + 2 else if point$ == "For your excellent trading you receive 5 experience point(s)." totalexp = totalexp + 5 else sellone = sellone + 3 endif endif endif return expdetect: if point$ == "For your great trading you receive 2 experience point(s)." totalexp = totalexp + 2 adjust = 0 else if point$ == "For your good trading you receive 1 experience point(s)." totalexp = totalexp + 1 adjust = 1 else if point$ == "For your excellent trading you receive 5 experience point(s)." totalexp = totalexp + 5 adjust = 0 else adjust = 2 endif endif endif return parseinfo: fuelholds = 0 organicsholds = 0 equipmentholds = 0 colonistsholds = 0 emptyholds = 0 send "i" wait "Alignm" experience$ = trim$(getline$(row + 1)) experience$ = right$(experience$ , len(experience$) - 16) experience = val(experience$) wait "Current" turnstowarp$ = trim$(getline$(row)) turnstowarp$ = right$(turnstowarp$ , len(turnstowarp$) - 16) turnstowarp = val(turnstowarp$) wait " left " cursect$ = trim$(getline$(row)) cursect$ = right$(cursect$ , len(cursect$) - 16) cursect = val(cursect$) wait "Total Ho" turns$ = trim$(getline$(row)) turns$ = right$(turns$ , len(turns$) - 16) turns = val(turns$) wait "Fight" totholds$ = trim$(getline$(row)) totholds$ = right$(totholds$ , len(totholds$) - 16) totholds = val(totholds$) when 1 "Psychic" goto gotpsychic wait "Credits" wait "Command" send "^m" goto nopsychic gotpsychic: wait "Command" maxcredits = experience * 6 maxholds = experience / 15 nextpos = instr(totholds$ , "Fuel Ore") gosub figureholds fuelholds = haveholds nextpos = instr(totholds$ , "Organics") gosub figureholds organicsholds = haveholds nextpos = instr(totholds$ , "Equipment") gosub figureholds equipmentholds = haveholds nextpos = instr(totholds$ , "Colonists") gosub figureholds colonistsholds = haveholds nextpos = instr(totholds$ , "Empty") gosub figureholds emptyholds = haveholds if test$ == "on" print local print local "experience = " ; experience print local "current sector = " ; cursect print local "turns = " ; turns print local "totholds = " ; totholds print local "emptyholds = " ; emptyholds endif return figureholds: haveholds = 0 if nextpos > 0 nextpos = instr(totholds$ , "=") totholds$ = right$(totholds$ , len(totholds$) - nextpos) haveholds = val(totholds$) endif return nostuff: print local beep tpen = 3 print local "You didn't have anyting on your ship! Try buying (or stealing some) first!" tpen = 1 print local "Command [TL=??:??:??] (?=Help) ?" ; goto finish checkholds: emptyholds$ = trim$(getline$(row + 1)) posbracket = instr(emptyholds$ , "[") emptyholds$ = right$(emptyholds$ , len(emptyholds$) - posbracket) emptyholds = val(emptyholds$) return