/* REXX (CREATED BY ZOC LEARN MODE) */ /* downloaded from the home sector */ /* modified by earth for use with ATTAC TCP/IP Helper */ /* http://www.tw-attac.com */ /* you need to modify this to use it with different pair types leave the 0^M for Ore for equip-org. change it to 0^M for Organics for equip-fuel. and change it to 0^M for Equipment for organics-fuel. */ CALL ZocRespond "Equipment do you want", "^M" CALL ZocRespond "Organics do you want", "^M" CALL ZocRespond "Ore do you want", "0^M" CALL ZocTimeout 3600 SAY "" SAY "" SAY "Trading Script will trade in current sector first" SAY "What sector do you want to move to?" PULL sector say "" say "" call zocsend "d" call zocwait "]:[" sector2=GETITALL(0,0) DO 10000 CALL ZocSend "pt" call zocwait "our offer [" offer1=GETITALL(0,0) z=SELLHAGGLE(offer1) call zocwait "our offer [" offer2=GETITALL(0,0) z=BUYHAGGLE(offer2) call zocwait "Command" call zocsend sector call zocsend "^M" call zocwait "Command" CALL ZocSend "pt" call zocwait "our offer [" offer1=GETITALL(0,0) z=SELLHAGGLE(offer1) call zocwait "our offer [" offer2=GETITALL(0,0) z=BUYHAGGLE(offer2) call zocwait "Command" call zocsend sector2 call zocsend "^M" call zocwait "Command" 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 SELLHAGGLE: offer1=arg(1) haggle106=offer1%(94/100)-1 haggle106=trunc(haggle106,0) haggle105=offer1%(95/100)-1 haggle105=trunc(haggle105,0) haggle104=offer1%(96/100)-1 haggle104=trunc(haggle104,0) haggle103=offer1%(97/100)-1 haggle103=trunc(haggle103,0) haggle102=offer1%(98/100)-1 haggle102=trunc(haggle102,0) haggle101=offer1%(99/100)-1 haggle101=trunc(haggle101,0) call zocsend haggle105 call zocsend "^M" a=3 DO WHILE a<>0 result= ZocWaitMux("You have", "Your offer [", "We're not int") SELECT WHEN result=0 THEN x=2 WHEN result=1 THEN x=1 WHEN result=2 THEN x=3 end if x=1 then DO if a=4 then do call zocsend haggle105 call zocsend "^M" end if a=3 then do call zocsend haggle104 call zocsend "^M" end if a=2 then do call zocsend haggle103 call zocsend "^M" end if a=1 then do call zocsend haggle102 call zocsend "^M" end if a=0 then do call zocsend haggle101 call zocsend "^M" end a=a-1 end if x=2 then do a=0 return(0) end if x=3 then do return(0) dead=1 end END RETURN(0) BUYHAGGLE: offer1=arg(1) haggle106=offer2*94/100-1 haggle106=trunc(haggle106,0) haggle105=offer2*95/100-1 haggle105=trunc(haggle105,0) haggle104=offer2*96/100-1 haggle104=trunc(haggle104,0) haggle103=offer2*97/100-1 haggle103=trunc(haggle103,0) haggle102=offer2*98/100-1 haggle102=trunc(haggle102,0) haggle101=offer2*99/100-1 haggle101=trunc(haggle101,0) call zocsend haggle105 call zocsend "^M" a=3 DO WHILE a<>0 result= ZocWaitMux("You have", "Your offer [", "We're not int") SELECT WHEN result=0 THEN x=2 WHEN result=1 THEN x=1 WHEN result=2 THEN x=3 end if x=1 then DO if a=4 then do call zocsend haggle105 call zocsend "^M" end if a=3 then do call zocsend haggle104 call zocsend "^M" end if a=2 then do call zocsend haggle103 call zocsend "^M" end if a=1 then do call zocsend haggle102 call zocsend "^M" end if a=0 then do call zocsend haggle101 call zocsend "^M" end a=a-1 end if x=2 then do a=0 return(0) end if x=3 then do return(0) dead=1 end END RETURN(0)