10REM ################# 20REM # ELITE CHEAT # 30REM ################# 40REM # By # 50REM # Stuart Menefy # 60REM # (C) # 70REM # The Micro # 80REM # User # 90REM ################# 100MODE 7 110PROC_screen 120PROC_init 130PROC_assemble 140PROC_load 150ON ERROR GOTO 1730 160REPEAT 170ON FN_MENU(1) GOSUB 880,950,1140,1160,1220,1250,1280,1430,1670 180UNTIL FALSE 190DEF PROC_screen 200FOR A%=0 TO 1:VDU 31,0,A%,134,157,129,141,31,15,A%:PRINT"Elite Cheat":NEXT A% 210VDU 28,0,24,39,2 220VDU 23,1;0;0;0;0 230ENDPROC 240DEF PROC_init 250@%=0 260*FX4 1 270DIM memory% 40,file% &100,check% 100 280DIM entries%(8),menu$(8,9),details$(8,9),laser%(6),rating%(9),status%(3),mission%(5),cargo$(17) 290X%=&70:Y%=0:A%=0:file_system%=USR(&FFDA) AND &F:REM Read which filing system is in use 300REM Set file to commander Jameson 310FOR A%=0 TO &FF STEP 4:A%!file%=0:NEXT A% 320!&70=1E3:file%!&B=&446E803:file%?&10=&F:file%?&16=&16:file%?&33=3 330file%!1=&5A4AAD14:file%!5=&B7530248 340lock%=FALSE 350REM Read in data 360FOR A%=1 TO 6:READ laser%(A%):NEXT A% 370DATA 0,&F,&8F,&32,&97,&FF 380FOR A%=1 TO 9:READ rating%(A%):NEXT A% 390DATA 0,8,&10,&20,&40,&80,&200,&A00,&1900 400FOR A%=1 TO 3:READ status%(A%):NEXT A% 410DATA 0,1,50 420FOR A%=1 TO 5:READ mission%(A%):NEXT A% 430DATA 0,1,2,&A,&E 440FOR A%=1 TO 8 450READ entries%(A%),details$ 460FOR B%=0 TO entries%(A%) 470READ menu$(A%,B%) 480IF details$="I" AND B% READ details$(A%,B%) ELSE IF details$="N" THEN details$(A%,B%)="N" ELSE details$(A%,B%)=details$ 490NEXT B%,A% 500IF file_system%<>4 THEN entries%(1)=7 510FOR A%=1 TO 17:READ cargo$(A%),file%?(A%+&34):NEXT A% 520ENDPROC 530DATA 9,I,Main Menu,Set Money,!&70/10,Alter Equipment,N,Alter Lasers,N,Set Number of Missiles,file%?&33,Set Rating,FN_RATING,Set Status,FN_STATUS,Set Galaxy,file%?&F+1,Alter Cargo,N,Set Mission,FN_MISSION 540DATA 9,I,Alter Equipment,Fuel,(file%?&D)/10,Cargo Bay Size,(file%?&16)-2,ECM System,FN_GOT(file%?&28),Fuel Scoops,FN_GOT(file%?&29),Escape Capsule,FN_GOT(file%?&2E),Energy Bomb,FN_GOT(file%?&2A),Energy Unit,FN_ENERGY 550 DATA Docking Computer,FN_GOT(file%?&2C),Galactic Hyperspace,FN_GOT(file%?&2D) 560DATA 4,N,Energy Unit,Not Present,Normal,Naval,Cheat 570DATA 6,N,Laser Type,None,Pulse,Beam,Mining,Military,Cheat 580DATA 4,FN_LASER,Laser Position,Front,Rear,Left,Right 590DATA 9,N,Combat Rating,Harmless,Mostly Harmless,Poor,Average,Above Average,Competent,Dangerous,Deadly,E L I T E 600DATA 3,N,Legal Status,Clean,Offender,Fugitive 610DATA 5,N,Mission Menu,Before Mission 1,During mission 1,After mission 1,During mission 2,After mission 2 620DATA Food,&10,Textiles,&F,Radioactives,&11,Slaves,0,Liquor/Wines,3,Luxuries,&1C,Narcotics,&E,Computers,0,Machinery,0,Alloys,&A,Firearms,0,Furs,&11,Minerals,&3A,Gold,7,Platinum,9,Gem-Stones,8,Alien Items,0 630DEF PROC_assemble 640FOR PASS%=0 TO 2 STEP 2 650P%=check% 660[OPT PASS% 670LDX #&49 680LDA #&49 690CLC 700.check_loop 710ADC file%-1,X 720EOR file%,X 730DEX 740BNE check_loop 750STA file%+&4B:EOR #&A9:STA file%+&4A:RTS 760] 770NEXT PASS% 780ENDPROC 790DEF PROC_load 800PRINTTAB(9,9)"Do you want to load a" 810PRINTTAB(7,12)"previous commander"; 820IF NOT(FN_YES_NO) ENDPROC 830PROC_oscli("LOAD "+FN_FILENAME+" "+STR$~(file%)) 840FOR A%=0 TO 3:A%?&70=file%?(&C-A%):NEXT A% 850IF ?file%=1 OR ?file%=6 OR ?file%=&A THEN lock%=TRUE 860ENDPROC 870REM Alter Money 880CLS 890PRINTTAB(9,9)"Enter how much money" 900PRINTTAB(13,12)"you require." 910!&70=FN_INPUT(14,15,10,&CCCCCCC,TRUE)*10 920FOR A%=0 TO 3:file%?(&C-A%)=A%?&70:NEXT A% 930RETURN 940REM Alter Equipment 950REPEAT 960ON FN_MENU(2) GOSUB 980,1020,1060,1070,1080,1090,1100,1110,1120 970UNTIL FALSE 980CLS:PRINTTAB(7,9)"Enter how much hyperspace" 990PRINTTAB(13,12)"fuel you want." 1000file%?&D=FN_INPUT(17,15,4,25.5,TRUE)*10 1010RETURN 1020CLS:PRINTTAB(10,9)"Enter cargo bay size" 1030file%?&16=FN_INPUT(18,11,3,253,FALSE)+2 1040RETURN 1050REM Toggle various bytes, and items of eqipment 1060file%?&28=NOT file%?&28:RETURN 1070file%?&29=NOT file%?&29:RETURN 1080file%?&2E=NOT file%?&2E:RETURN 1090file%?&2A=file%?&2A EOR &7F:RETURN 1100file%?&2B=FN_MENU(3)-1:RETURN 1110file%?&2C=NOT file%?&2C:RETURN 1120file%?&2D=NOT file%?&2D:RETURN 1130REM Alter Lasers 1140REPEAT file%?(FN_MENU(5)+&F)=laser%(FN_MENU(4)):UNTIL FALSE 1150REM Number of missiles 1160CLS 1170PRINTTAB(8,9)"Enter how many missiles" 1180PRINTTAB(13,12)"you require." 1190file%?&33=FN_INPUT(19,15,3,255,FALSE) 1200RETURN 1210REM Alter combat rating 1220file%!&47=rating%(FN_MENU(6)) OR (file%!&74 AND &FFFF0000) 1230RETURN 1240REM Alter legal status 1250file%?&34=status%(FN_MENU(7)) 1260RETURN 1270REM Set Galaxy 1280CLS 1290RESTORE 1340 1300PRINTTAB(10,8)"Enter Galaxy Number." 1310file%?&F=FN_INPUT(19,11,1,8,FALSE)-1 1320FOR A%=1 TO file%?&F+1:READ file%!1,file%!5:NEXT A% 1330RETURN 1340DATA &5A4AAD14,&B7530248 1350DATA &B4945F60,&6FA60490 1360DATA &69296F5A,&DE4D0821 1370DATA &D2526763,&BD9A1042 1380DATA &A5A45D69,&7B352084 1390DATA &4B496663,&F66A4009 1400DATA &96925F6A,&EDD48012 1410DATA &2D25605E,&DBA90124 1420REM Set up Cargo 1430CLS 1440PRINTTAB(22)"Quantity Quantity" 1450PRINT" No. Product Unit as Cargo for Sale" 1460FOR A%=1 TO 17 1470PRINTTAB(1);A%;".";TAB(5);cargo$(A%);TAB(18);FN_UNIT;TAB(24);(file%?(A%+&16));TAB(33);(file%?(A%+&34)) 1480NEXT 1490VDU &86,&9D,&81:PRINT" ESCAPE to return to main menu" 1500REPEAT 1510PRINTTAB(1,20)"Enter number of product to alter" 1520number%=FN_INPUT(34,20,2,17,FALSE) 1530PRINTTAB(1,20)"Enter quantity of ";cargo$(number%);SPC(13);TAB(1,21)"in cargo bay";SPC(19) 1540PRINTTAB(23,number%+1);CHR$&88;TAB(28,number%+1)CHR$&89 1550file%?(number%+&16)=FN_INPUT(14,21,3,255,FALSE) 1560PRINTTAB(23,number%+1);" ";(file%?(number%+&16));" " 1570IF number%=17 THEN 1620 1580PRINTTAB(32,number%+1);CHR$&88;TAB(36,number%+1)CHR$&89 1590PRINTTAB(1,21)"for sale at planet" 1600file%?(number%+&34)=FN_INPUT(20,21,3,255,FALSE) 1610PRINTTAB(32,number%+1);" ";(file%?(number%+&34));" " 1620PRINTTAB(0,20);SPC(119); 1630UNTIL 0 1640DEF FN_UNIT 1650IF A%<14 THEN ="t" ELSE IF A%<16 THEN ="kg" ELSE IF A%=16 THEN ="g" ELSE ="t" 1660REM Set Up Mission 1670?file%=mission%(FN_MENU(8)) 1680IF ?file%=1 THEN file%!1=&B4942190:file%!5=&6FA60490:file%?&F=1 1690IF ?file%=&A THEN file%!1=&692954D7:file%!5=&DE4D0821:file%?&F=2 1700lock%=(?file%=1 OR ?file%=&A) 1710RETURN 1720REM Re-save file, and error control 1730IF INKEY(-1) OR ERR<>17 REPORT:PRINT" at line ";ERL:GOTO 1800 1740IF main_menu%=FALSE THEN 160 1750CLS 1760main_menu%=FALSE 1770PRINTTAB(5,5)"ESCAPE to re-edit commander" 1780FOR A%=10 TO 11:PRINTTAB(11,A%)CHR$&8D;"Save commander.":NEXT A% 1790CALL check%:PROC_oscli("SAVE "+FN_FILENAME+" "+STR$~(file%)+" +100 0 0") 1800*FX4 1810END 1820DEF FN_YES_NO 1830PRINT"? (Y/N)";CHR$&88; 1840REPEAT get%=GET AND &DF:UNTIL get%=&59 OR get%=&4E 1850VDU get% 1860REPEAT get2%=GET AND &DF:UNTIL get2%=&59 OR get2%=&4E OR get2%=&D 1870IF get2%<>&D THEN get%=get2%:VDU &7F:GOTO 1850 1880VDU 8,8,32 1890=get%=&59 1900DEF FN_FILENAME 1910PRINTTAB(4,15)"Please enter filename "; 1920VDU 23,1,1;0;0;0; 1930input$="" 1940REPEAT 1950REPEAT get%=GET:UNTIL (get%>&1F AND get%<&80) OR get%=&D 1960IF get%<>&7F THEN 1990 1970IF LEN(input$) input$=LEFT$(input$,LEN(input$)-1):VDU &7F 1980GOTO 2000 1990IF (LEN(input$)<10+(3*(file_system%=4))) AND (get%<>&D) THEN input$=input$+CHR$(get%):VDU get% 2000UNTIL get%=&D AND input$<>"" 2010VDU 23,1;0;0;0;0 2020IF file_system%=4 THEN PRINTTAB(9,19)"Enter drive number ":=":"+STR$(FN_INPUT(28,19,1,3,FALSE))+".E."+input$ 2030=input$ 2040DEF PROC_oscli($memory%) 2050PRINT 2060X%=memory% MOD &100 2070Y%=memory% DIV &100 2080CALL &FFF7 2090ENDPROC 2100DEF FN_MENU(number%) 2110VDU 23,1;0;0;0;0 2120CLS 2130FOR A%=0 TO 1:PRINTTAB((39-LEN(menu$(number%,0)))DIV 2,A%)CHR$&8D;menu$(number%,0):NEXT A% 2140FOR A%=1 TO entries%(number%) 2150PRINTTAB(3,(A%*2)+1);CHR$129;A%;".";CHR$134;menu$(number%,A%); 2160IF details$(number%,A%)<>"N" PRINTCHR$&82;"(";EVAL(details$(number%,A%));")" 2170NEXT A% 2180PRINTTAB(0,21)"Enter which function you require (1-";entries%(number%);")" 2190PRINTTAB(3,22)"or ESCAPE to "; 2200IF number%=1 PRINT"re-save commander";:main_menu%=TRUE ELSE PRINT"return to main menu"; 2210REPEAT get%=GET-&30:UNTIL get%>0 AND get%<(entries%(number%)+1) AND NOT((get%=7) AND (number%=1) AND lock%) 2220PRINTTAB(0,(get%*2)+1);CHR$&88 2230REPEAT get2%=GET:UNTIL (get2%>&30 AND get2%<(entries%(number%)+&31) AND NOT((get2%=&37) AND (number%=1) AND lock%)) OR (get2%=&D) 2240IF get2%<>&D THEN PRINTTAB(0,(get%*2)+1);" ":get%=get2%-&30:GOTO 2220 2250main_menu%=FALSE 2260=get% 2270REM FN's to display status next to menu entry 2280DEF FN_STATUS 2290Z%=4 2300REPEAT Z%=Z%-1:UNTIL file%?&34>=status%(Z%) 2310=menu$(7,Z%) 2320DEF FN_RATING 2330Z%=10 2340REPEAT Z%=Z%-1:UNTIL (file%!&47 AND &FFFF)>=rating%(Z%) 2350=menu$(6,Z%) 2360DEF FN_MISSION 2370IF ?file%=6 THEN =menu$(8,4) 2380Z%=0 2390REPEAT Z%=Z%+1:UNTIL ?file%=mission%(Z%) 2400=menu$(8,Z%) 2410DEF FN_ENERGY 2420Z%=file%?&2B 2430IF Z%>3 THEN Z%=3 2440IF Z%=0 THEN ="Not Present" ELSE =menu$(3,Z%+1) 2450DEF FN_LASER 2460Z%=0 2470REPEAT Z%=Z%+1:UNTIL file%?(A%+&F)=laser%(Z%) 2480=menu$(4,Z%) 2490DEF FN_GOT(A%) 2500IF A% THEN ="Present" ELSE ="Not Present" 2510DEF FN_INPUT(X%,Y%,L%,max,point%) 2520LOCAL input$ 2530VDU 23,1,1;0;0;0; 2540PRINTTAB(X%,Y%);SPC(L%);TAB(X%,Y%); 2550input$="" 2560REPEAT get%=GET:UNTIL (get%>&2F AND get%<&3A) OR (get%=&2E AND point%) OR (get%=&7F) OR (get%=&D) OR (get%=&15) 2570IF get%=&15 THEN 2540 2580IF get%<>&7F THEN 2610 2590IF input$<>"" input$=LEFT$(input$,LEN(input$)-1):VDU &7F 2600GOTO 2560 2610IF LEN(input$) THEN P%=INSTR(input$,".") ELSE P%=0 2620IF get%=&2E AND P% THEN 2560 2630IF P% AND (P%&D THEN 2560 2640IF get%<>&D AND LEN(input$)&D OR input$=""THEN 2650 2660IF VAL(input$)<=max VDU 23,1;0;0;0;0:=VAL(input$) 2670PRINT'" Maximum possible value is ";max; 2680get%=INKEY(100) 2690GOTO 2540