/* REXX (created by Rolodex) */ CALL ZocTimeout 120 max=1 SAY "" SAY "" SAY "SDT script will steal in current sector first." SAY "Make sure to have the equipment set up before starting." SAY "" SAY "" SAY "What ship number are you in?" PULL SHIP1 SAY "" SAY "" SAY "How many holds will you be stealing in ship 1 (ENTER max TO STEAL MAX ON ALL SHIPS)?" PULL HOLDS1 if HOLDS1="max" then DO HOLDS1="" HOLDS2="" a=0 end SAY "" SAY "" SAY "What is your second ship's number?" PULL SHIP2 SAY "" SAY "" if a=1 then DO SAY "How many holds will you be stealing in ship 2?" PULL HOLDS2 SAY "" SAY "" end SAY "SDT script is starting." SAY "" SAY "" DO 10000 holdsteal=HOLDS1 z=STEALSDT1(steal1) if noholds1=1 then DO CALL ZocSend "pn" CALL ZocWait " <" CALL ZocWait ">" planet=ZocLastLine() CALL ZocSend planet CALL ZocSend "^M" result=ZocWaitMux("of Fuel Ore","of Organics","of Equipment") select WHEN result=0 then DO CALL ZocSend "0^M" result=ZocWaitMux("of Organics","of Equipment") select WHEN result=0 then CALL ZocSend "0^M^M" WHEN result=1 then CALL ZocSend "^M" end end WHEN result=1 then CALL ZocSend "0^M^M" WHEN result=2 then CALL ZocSend "^M" end CALL ZocWait "our offer [" offer1=GETITALL(0,0) noholds1=0 z=SELLHAGGLE1(offer1) z=STEALSDT11(steal11) end z=DUMPSDT1(dump1) holdsteal=HOLDS2 z=STEALSDT2(steal2) if noholds2=1 then DO CALL ZocSend "pn" CALL ZocWait " <" CALL ZocWait ">" planet=ZocLastLine() CALL ZocSend planet CALL ZocSend "^M" result=ZocWaitMux("of Fuel Ore","of Organics","of Equipment") select WHEN result=0 then DO CALL ZocSend "0^M" result=ZocWaitMux("of Organics","of Equipment") select WHEN result=0 then CALL ZocSend "0^M^M" WHEN result=1 then CALL ZocSend "^M" end end WHEN result=1 then CALL ZocSend "0^M^M" WHEN result=2 then CALL ZocSend "^M" end CALL ZocWait "our offer [" offer2=GETITALL(0,0) noholds2=0 z=SELLHAGGLE2(offer2) z=STEALSDT11(steal22) end z=DUMPSDT2(dump2) end EXIT DUMPSDT1: CALL ZocSend "l" result=ZocWaitMux(" <", "Planet command") SELECT WHEN result=0 then x="1" WHEN result=1 then x="2" end if x=1 then DO CALL ZocWait ">" planet=ZocLastLine() CALL ZocSend planet CALL ZocSend "^M" end CALL ZocSend "tnl3^Mqx" CALL ZocSend SHIP2 CALL ZocSend "^M" result=ZocWaitMux("Security code accepted,","That is not an available ship.") select WHEN result=0 then DO CALL ZocSend "^M" RETURN(dump1) end WHEN result=1 then DO CALL ZocNotify " Ship Number Problem " EXIT end end EXIT DUMPSDT2: CALL ZocSend "l" result=ZocWaitMux(" <", "Planet command") SELECT WHEN result=0 then x="1" WHEN result=1 then x="2" end if x=1 then DO CALL ZocWait ">" planet=ZocLastLine() CALL ZocSend planet CALL ZocSend "^M" end CALL ZocSend "tnl3^Mqx" CALL ZocSend SHIP1 CALL ZocSend "^M" result=ZocWaitMux("Security code accepted,","That is not an available ship.") select WHEN result=0 then DO CALL ZocSend "^M" RETURN(dump2) end WHEN result=1 then DO CALL ZocNotify " Ship Number Problem " EXIT end end EXIT STEALSDT1: CALL ZocSend "pr^Ms" result=ZocWaitMux("You realize the guards saw you last time!","On Dock OnBoard") select WHEN result=0 then DO CALL ZocNotify " Fake Bust! " EXIT end WHEN result=1 then DO CALL ZocSend "3" CALL ZocSend HOLDS1 CALL ZocSend "^M" result=ZocWaitMux("and you receive","For getting caught","aren't that many holds") select WHEN result=0 then RETURN(steal1) WHEN result=1 then DO CALL ZocNotify " BUSTED! " EXIT end WHEN result=2 then noholds1=1 end end end RETURN(steal1) EXIT STEALSDT11: CALL ZocSend "pr^Ms" result=ZocWaitMux("You realize the guards saw you last time!","On Dock OnBoard") select WHEN result=0 then DO CALL ZocNotify " Fake Bust! " EXIT end WHEN result=1 then DO CALL ZocSend 3 CALL ZocSend HOLDS1 CALL ZocSend "^M" result=ZocWaitMux("and you receive","For getting caught","aren't that many holds") select WHEN result=0 then RETURN(steal11) WHEN result=1 then DO CALL ZocNotify " BUSTED! " EXIT end WHEN result=2 then DO CALL ZocNotify " Equipment/Holds Problem " EXIT end end end end EXIT STEALSDT2: CALL ZocSend "pr^Ms" result=ZocWaitMux("You realize the guards saw you last time!","On Dock OnBoard") select WHEN result=0 then DO CALL ZocNotify " Fake Bust! " EXIT end WHEN result=1 then DO CALL ZocSend "3" CALL ZocSend HOLDS2 CALL ZocSend "^M" result=ZocWaitMux("and you receive","For getting caught","aren't that many holds") select WHEN result=0 then RETURN(steal2) WHEN result=1 then DO CALL ZocNotify " BUSTED! " EXIT end WHEN result=2 then noholds2=1 end end end RETURN(steal2) EXIT STEALSDT22: CALL ZocSend "pr^Ms" result=ZocWaitMux("You realize the guards saw you last time!","On Dock OnBoard") select WHEN result=0 then DO CALL ZocNotify " Fake Bust! " EXIT end WHEN result=1 then DO CALL ZocSend "3" CALL ZocSend HOLDS2 CALL ZocSend "^M" result=ZocWaitMux("and you receive","For getting caught","aren't that many holds") select WHEN result=0 then RETURN(steal22) WHEN result=1 then DO CALL ZocNotify " BUSTED! " EXIT end WHEN result=2 then DO CALL ZocNotify " Equipment/Holds Problem " EXIT end end end end EXIT GETITALL: holdfinal="" call zocwait "]" holds=zoclastline() DO addchar=1 to length(holds) holdsit=substr(holds,addchar,1) if holdsit<>"]" then DO if holdsit<>"," then holdfinal=holdfinal||holdsit end END RETURN holdfinal EXIT SELLHAGGLE1: offer1=arg(1) haggle94=offer1%(94/100)-1 haggle94=trunc(haggle94,0) haggle95=offer1%(95/100)-1 haggle95=trunc(haggle95,0) haggle96=offer1%(96/100)-1 haggle96=trunc(haggle96,0) haggle97=offer1%(97/100)-1 haggle97=trunc(haggle97,0) haggle98=offer1%(98/100)-1 haggle98=trunc(haggle98,0) haggle99=offer1%(99/100)-1 haggle99=trunc(haggle99,0) CALL ZocSend haggle94 CALL ZocSend "^M" a=4 DO WHILE a<>0 result=ZocWaitMux("We'll buy them", "You have", "we're not int", "final offer") SELECT WHEN result=0 then x=1 WHEN result=1 then x=2 WHEN result=2 then x=3 WHEN result=3 then x=4 end if x=1 then DO if a=4 then DO CALL ZocSend haggle95 CALL ZocSend "^M" end if a=3 then DO call ZocSend haggle96 call ZocSend "^M" end if a=2 then DO CALL ZocSend haggle97 CALL ZocSend "^M" end if a=1 then DO CALL ZocSend haggle98 CALL ZocSend "^M" end if a=0 then DO CALL ZocSend haggle99 CALL ZocSend "^M" end a=a-1 end if x=2 then DO a=0 RETURN(offer1) end if x=3 then DO RETURN(offer1) end if x=4 then DO CALL ZocSend haggle97 CALL ZocSend "^M" RETURN(offer1) end end RETURN(offer1) EXIT SELLHAGGLE2: offer2=arg(1) haggle94=offer2%(94/100)-1 haggle94=trunc(haggle94,0) haggle95=offer2%(95/100)-1 haggle95=trunc(haggle95,0) haggle96=offer2%(96/100)-1 haggle96=trunc(haggle96,0) haggle97=offer2%(97/100)-1 haggle97=trunc(haggle97,0) haggle98=offer2%(98/100)-1 haggle98=trunc(haggle98,0) haggle99=offer2%(99/100)-1 haggle99=trunc(haggle99,0) CALL ZocSend haggle94 CALL ZocSend "^M" a=4 DO WHILE a<>0 result=ZocWaitMux("We'll buy them", "You have", "we're not int", "final offer") SELECT WHEN result=0 then x=1 WHEN result=1 then x=2 WHEN result=2 then x=3 WHEN result=3 then x=4 end if x=1 then DO if a=4 then DO CALL ZocSend haggle95 CALL ZocSend "^M" end if a=3 then DO call ZocSend haggle96 call ZocSend "^M" end if a=2 then DO CALL ZocSend haggle97 CALL ZocSend "^M" end if a=1 then DO CALL ZocSend haggle98 CALL ZocSend "^M" end if a=0 then DO CALL ZocSend haggle99 CALL ZocSend "^M" end a=a-1 end if x=2 then DO a=0 RETURN(offer2) end if x=3 then DO RETURN(offer2) end if x=4 then DO CALL ZocSend haggle97 CALL ZocSend "^M" RETURN(offer2) end end RETURN(offer2) EXIT