;Zipper3 by Tiblanc ;rodney999@hotmail.com ;Totally uncommented for your pleasure(forgot to do it before uploading so it might ;be twice there......) ;Turn around and kill #config scanner= 2 #config weapon= 1 #config armor= 2 #config engine= 4 #config heatsinks= 3 #config mines= 0 #config shield= 0 #def max_meters #def speed_mod #def heading #def right_angle #def left_angle ;Initial attack and data setting opo 11 100 opo 22 10 mov ax 1 int 3 mov right_angle 74 mov left_angle 202 mov max_meters 160 opo 17 64 gsb !Start_Scan opo 22 10 !Main ipo 2 ax cmp ax 175 jls !Main_1 gsb !Cool_Down !Main_1 gsb !Start_Scan ; gsb !Start_Scan gsb !Move jmp !Main ;/**************************************************************/ !Start_scan ipo 9 ax cmp ax 500 jgr !Return ;He's in our range, now find him opo 17 64 ipo 7 ax cmp ax 1500 jgr !Start_1 jle !Start_track !Start_1 opo 12 128 ipo 7 ax cmp ax 1500 jgr !Return !Start_track cmp @3 1 jgr !Start_T_2 je !Start_T_1 cmp @3 -1 jls !Start_T_-2 je !Start_T_-1 !Start_T_0 ;Scan in front of 32 opo 17 32 ipo 7 ax cmp ax 1500 jgr !Return cmp @3 1 jgr !S_2 je !S_1 cmp @3 -1 jls !S_-2 je !S_-1 jgr !S_0 !Start_T_1 ;Scan bit right of 32 opo 12 32 opo 17 32 ipo 7 ax cmp ax 1500 jgr !Return cmp @3 1 jgr !S_2 je !S_1 cmp @3 -1 jls !S_-2 je !S_-1 jgr !S_0 !Start_T_2 ;Scan far right of 16 opo 12 56 opo 17 16 ipo 7 ax cmp ax 1500 jgr !Return cmp @3 1 jgr !SS_2 je !SS_1 cmp @3 -1 jls !SS_-2 je !SS_-1 jgr !SS_0 !Start_T_-1 ;Scan bit left of 32 opo 12 -32 opo 17 32 ipo 7 ax cmp ax 1500 jgr !Return cmp @3 1 jgr !S_2 je !S_1 cmp @3 -1 jls !S_-2 je !S_-1 jgr !S_0 !Start_T_-2 ;Scan far left of 16 opo 12 -56 opo 17 16 ipo 7 ax cmp ax 1500 jgr !Return cmp @3 1 jgr !SS_2 je !SS_1 cmp @3 -1 jls !SS_-2 je !SS_-1 jgr !SS_0 !S_0 ;Front, arc of 8 opo 17 8 ipo 7 ax cmp ax 1500 jgr !Return cmp ax 200 jle !Shoot_Close mov ax @3 add ax ax opo 12 ax jgr !Adjust_angle !S_1 ;Bit right, arc of 8 opo 17 8 opo 12 8 ipo 7 ax cmp ax 1500 jgr !Return cmp ax 200 jle !Shoot_Close mov ax @3 add ax ax opo 12 ax jgr !Adjust_angle !S_-1 ;Bit left, arc of 8 opo 17 8 opo 12 -8 ipo 7 ax cmp ax 1500 jgr !Return cmp ax 200 jle !Shoot_Close mov ax @3 add ax ax opo 12 ax jgr !Adjust_angle !S_2 ;Far right, arc of 4 opo 17 4 opo 12 14 ipo 7 ax cmp ax 1500 jgr !Return cmp ax 200 jle !Shoot_Close opo 12 @3 jgr !Adjust_angle !S_-2 ;Far right, arc of 4 opo 17 4 opo 12 -14 ipo 7 ax cmp ax 1500 jgr !Return cmp ax 200 jle !Shoot_Close opo 12 @3 jgr !Adjust_angle !SS_0 ;Front, arc of 4 opo 17 4 ipo 7 ax cmp ax 1500 jgr !Return cmp ax 200 jle !Shoot_Close opo 12 @3 jgr !Adjust_angle !SS_1 ;Bit right, arc of 4 opo 12 4 opo 17 4 ipo 7 ax cmp ax 1500 jgr !Return cmp ax 200 jle !Shoot_Close opo 12 @3 jgr !Adjust_angle !SS_2 ;Far right, arc of 4(not 2) opo 12 8 opo 17 4 ipo 7 ax cmp ax 1500 jgr !Return cmp ax 200 jle !Shoot_Close opo 12 @3 jgr !Adjust_angle !SS_-1 ;Bit left, arc of 4 opo 12 -4 opo 17 4 ipo 7 ax cmp ax 1500 jgr !Return cmp ax 200 jle !Shoot_Close opo 12 @3 jgr !Adjust_angle !SS_-2 ;Far left, arc of 4(not 2) opo 12 -8 opo 17 4 ipo 7 ax cmp ax 1500 jgr !Return cmp ax 200 jle !Shoot_Close opo 12 @3 jgr !Adjust_angle !Shoot_Close opo 18 1 opo 15 @3 opo 15 @3 opo 15 @3 opo 18 0 return !Adjust_angle ;Was supposed to be for the tables, but it worked badly and I'm ;too lazy to change all the labels :-) ;Let's say this is tracking mode ;We must try to keep our target at a either 64 or 192 turret off. ;64, 192 is for getting away and 50, 206 is for closing in ;We should keep our target between 350 and 425 meters !Tracking ipo 2 cx cmp cx 200 jge !Track cmp dx 150 jle !Track_Kill ; opo 15 4 ; opo 15 -4 opo 15 0 !Track cmp @0 0 jgr !Track_0 gsb !Wall !Track_0 cmp dx 350 jle !Track_Close cmp dx 425 jge !Track_Far jls !Track_Ok !Track_Kill opo 18 1 opo 15 2 opo 15 0 opo 15 -2 opo 18 0 jle !Track_Ok !Track_Close ;Too close mov left_angle 192 mov right_angle 64 jle !Track_Ok !Track_Far mov left_angle 206 mov right_angle 50 jge !Track_Ok !Track_Ok cmp @2 128 jge !Track_2 !Track_1 mov ax @2 sub ax right_angle opo 14 ax jls !Track_Scan !Track_2 mov ax left_angle sub ax @2 neg ax opo 14 ax jge !Track_Scan !Track_Scan ;Scan to see if he's still there ipo 7 dx cmp dx 1500 jgr !Return ;Nope mov bx @3 add bx bx add bx bx add bx @3 opo 12 bx jle !Tracking !Wall ;We're in a wall.... let's get out of this bad situation opo 14 128 !Wall_1 ipo 2 ax cmp ax 200 jge !Wall_2 ; opo 15 4 ; opo 15 -4 opo 15 0 !Wall_2 opo 11 100 ipo 7 cx cmp cx 1500 jgr !Return mov ax @3 add ax ax add ax ax opo 12 ax ipo 3 cx cmp cx @1 je !Return jne !Wall_1 ;/**************************************************************/ !Move cmp @0 0 jne !Move_1 opo 11 100 !Move_1 int 2 cmp ex 200 jle !Move_L cmp ex 800 jge !Move_R cmp fx 200 jle !Move_U cmp fx 800 jge !Move_D cmp max_meters @9 jgr !Return ipo 10 ax and ax 0x0001 cmp ax 0 je !Move_Random_0 !Move_Random_1 opo 14 38 int 19 return !Move_Random_0 opo 14 -53 int 19 return !Move_L ;Too left dude cmp fx 200 jle !Move_L_U cmp fx 800 jge !Move_L_D cmp @1 60 je !return mov ax 60 sub ax @1 opo 14 ax int 19 return !Move_R ;Too right man cmp fx 200 jle !Move_R_U cmp fx 800 jge !Move_R_D cmp @1 200 je !return mov ax 200 sub ax @1 opo 14 ax int 19 return !Move_D ;Too low buddy cmp @1 10 je !return mov ax 10 sub ax @1 opo 14 ax int 19 return !Move_U ;Too up Jim cmp @1 135 je !return mov ax 135 sub ax @1 opo 14 ax int 19 return !Move_L_U ;Left and high cmp @1 100 je !return mov ax 100 sub ax @1 opo 14 ax int 19 return !Move_L_D ;Left and low cmp @1 20 je !return mov ax 20 sub ax @1 opo 14 ax int 19 return !Move_R_U ;Right and high cmp @1 155 je !return mov ax 155 sub ax @1 opo 14 ax int 19 return !Move_R_D ;Right and low cmp @1 230 je !return mov ax 230 sub ax @1 opo 14 ax int 19 return ;/**************************************************************/ !Cool_Down ;Used to coll down Zipper mov max_meters 100 gsb !Move ipo 2 ax cmp ax 125 jgr !Cool_Down mov max_meters 160 return ;/**************************************************************/ !Return ;Ye' old good !Return mov dx 1500 return ;/**************************************************************/