/* REXX (created for use bye Dominance Enterprises!) */ CALL ZocTimeout 120 SAY "" SAY "" SAY "SST script will steal in current sector first." SAY "Make sure to have the equipment before starting." SAY "Make sure to replace the #'s with actual digits." SAY "" SAY "" SHIP1=ZocAsk("What ship number are you in?","#") if SHIP1=# then DO CALL ZocNotify "Need to enter a ship #" EXIT end HOLDS1=ZocAsk("How many holds will you be stealing in ship 1?","#") if HOLDS1=# then DO CALL ZocNotify "Need to enter a # of holds" EXIT end SHIP2=ZocAsk("What is your second ship's number?","#") if SHIP2=# then DO CALL ZocNotify "Need to enter a ship #" EXIT end HOLDS2=ZocAsk("How many holds will you be stealing in ship 2?","#") if HOLDS2=# then DO CALL ZocNotify "Need to enter a # of holds" EXIT end SAY "SST script is starting." SAY "" SAY "" DO 1000 CALL Zocsend "#" CALL ZocSend "pt^M" CALL ZocWait "our offer [" offer1=GETITALL(0,0) z=SELLHAGGLE1(offer1) z=SKIPBUY1(skip1) z=STEAL1(holdsteal1) CALL Zocsend "#" CALL ZocSend "pt^M" CALL ZocWait "our offer [" offer2=GETITALL(0,0) z=SELLHAGGLE2(offer2) z=SKIPBUY2(skip2) z=STEAL2(holdsteal2) 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 SKIPBUY1: result=ZocWaitMux("o you want to buy", "Command") select WHEN result=0 then CALL ZocSend "0^M" WHEN result=1 then RETURN(skip1) end result=ZocWaitMux("o you want to buy", "Command") select WHEN result=0 then CALL ZocSend "0^M" WHEN result=1 then RETURN(skip1) end RETURN(skip1) EXIT SKIPBUY2: result=ZocWaitMux("o you want to buy", "Command") select WHEN result=0 then CALL ZocSend "0^M" WHEN result=1 then RETURN(skip2) end result=ZocWaitMux("o you want to buy", "Command") select WHEN result=0 then CALL ZocSend "0^M" WHEN result=1 then RETURN(skip2) end RETURN(skip2) EXIT STEAL1: CALL ZocSend "pr^Ms3" CALL ZocSend HOLDS1 CALL ZocSend "^M" result=ZocWaitMux("and you receive","For getting caught","aren't that many holds") select WHEN result=0 then DO CALL ZocSend "x" 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(holdsteal1) end WHEN result=1 then DO CALL ZocNotify " Ship Number Problem " EXIT end end end WHEN result=1 then DO CALL ZocNotify " BUSTED! " EXIT end WHEN result=2 then DO CALL ZocSend "o31^Mqpr^Ms3" CALL ZocSend HOLDS1 CALL ZocSend "^M" result=ZocWaitMux("and you receive","For getting caught","aren't that many holds") select WHEN result=0 then DO CALL ZocSend "x" 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(holdsteal1) end WHEN result=1 then DO CALL ZocNotify " Ship Number Problem " EXIT end end end 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 STEAL2: CALL ZocSend "pr^Ms3" CALL ZocSend HOLDS2 CALL ZocSend "^M" result=ZocWaitMux("and you receive","For getting caught","aren't that many holds") select WHEN result=0 then DO CALL ZocSend "x" 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(holdsteal2) end WHEN result=1 then DO CALL ZocNotify " Ship Number Problem " EXIT end end end WHEN result=1 then DO CALL ZocNotify " BUSTED! " EXIT end WHEN result=2 then DO CALL ZocSend "o31^Mqpr^Ms3" CALL ZocSend HOLDS2 CALL ZocSend "^M" result=ZocWaitMux("and you receive","For getting caught","aren't that many holds") select WHEN result=0 then DO CALL ZocSend "x" 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(holdsteal2) end WHEN result=1 then DO CALL ZocNotify " Ship Number Problem " EXIT end end end 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