/* Written by Brett P. Quinn, released to public domain 01/04/2000 */ /* Zero.ZRX will use CIM mode to map the universe in 0 turns */ /* Capture file is \ZOC\LOG\GAMENAME.ZRO */ CALL ZocRespond "[Pause]", " " CALL ZocTimeout 5 /* silence all messages */ CALL ZocSend "|" result = ZocWaitMux("Silencing all messages.", "Displaying all messages.") SELECT WHEN result = 0 THEN SAY "" WHEN result = 1 THEN CALL ZocSend "|" WHEN result = 640 THEN SIGNAL Abend END CALL ZocSend "c" /* check for avoids */ CALL ZocWait "Computer command" CALL ZocSend "x" result = ZocWait("No Sectors") IF result = 640 THEN DO clear = ZocAsk("Clear all avoids?(y/n)", "Y") clear = TRANSLATE(clear) IF clear <> "N" THEN DO CALL ZocSend "v" CALL ZocWait "[0 clears " CALL ZocSend "0" CALL ZocSend "^M" CALL ZocWait "clear some avoids?" CALL ZocSend "y" CALL ZocWait "clear ALL avoids?" CALL ZocSend "y" CALL ZocWait "Avoided sectors Cleared." END END CALL ZocSend "q" CALL ZocWait "(?=Help)?" bbsname = ZocAsk("What is the name of this game?", "") if bbsname = "" THEN SIGNAL Abend zrofile = bbsname || ".ZRO" /* check for existing file */ fullzro = "LOG\" || zrofile IF STREAM(fullzro, "C", "QUERY EXISTS") \= "" THEN DO delfile = ZocAsk("Append or Overwrite the existing file?(a/o)", "A") delfile = TRANSLATE(delfile) if delfile = "O" THEN CALL DOSDel fullzro END highest = ZocAsk("What is the highest sector?", "5000") if highest = "" THEN SIGNAL Abend CALL ZocTimeout 30 CALL ZocLogging 0 /* turn off logging */ method = ZocAsk("Variable route or Level diagram?(v/l)", "V") method = TRANSLATE(method) IF method = "V" THEN DO CALL Variable SIGNAL Done END IF method = "L" THEN DO base = ZocAsk("What is the base sector?", "1") CALL Level base SIGNAL Done END ELSE SIGNAL Abend Done: CALL ZocSend "|" /* turn messages back on */ CALL ZocWait "(?=Help)?" SAY "" SAY "" SAY "Done collecting data." ZocSend "^M" EXIT Abend: SAY "" SAY "" SAY "Script ended abnormally." SAY "" EXIT Variable: CALL ZocSend "^^" /* start CIM mode */ CALL ZocWait ":" CALL ZocLogname zrofile /* open .ZRO file */ CALL ZocLogging 1 DO sector = highest TO 2 BY -2 CALL ZocSend "f" CALL ZocSend sector CALL ZocSend "^M" CALL ZocSend sector - 1 CALL ZocSend "^M" CALL ZocSend "f" CALL ZocSend sector - 1 CALL ZocSend "^M" CALL ZocSend sector CALL ZocSend "^M" CALL ZocWait "FM" CALL ZocWait "FM" END CALL ZocLogging 0 /* turn off logging */ CALL ZocSend "q" /* exit CIM mode */ CALL ZocWait "(?=Help)?" RETURN Level: ARG base CALL ZocSend "^^" /* start CIM mode */ CALL ZocWait ":" CALL ZocLogname zrofile /* open .ZRO file */ CALL ZocLogging 1 DO sector = highest TO 1 BY -1 IF sector <> base THEN DO CALL ZocSend "f" CALL ZocWait ">" CALL ZocSend base CALL ZocSend "^M" CALL ZocWait ">" CALL ZocSend sector CALL ZocSend "^M" CALL ZocWait ":" CALL ZocSend "f" CALL ZocWait ">" CALL ZocSend sector CALL ZocSend "^M" CALL ZocWait ">" CALL ZocSend base CALL ZocSend "^M" CALL ZocWait ":" END END CALL ZocLogging 0 /* turn off logging */ CALL ZocSend "q" /* exit CIM mode */ CALL ZocWait "(?=Help)?" RETURN