; Be nice to the ladies! ; First attempt at a bot.... besides a similiar sduck lol ; Kolie@socal.rr.com #def Var1 #def turcurhead #def degtoturn #def sonarresult #def heading #def heat :1 ;Find Target With Scanner ipo 5, ax ;get abso turret heading mov bx, 0 sub bx, ax opo 13, bx ipo 5, ax err ax :11 opo 17, 20 ; Scan-arc = 4 ( in both directions, 8 total) opo 12, 8 ; Turn 8 degrees. ipo 7, ax ; Scan mov Var1, ax ; Store it cmp ax, 1500 ; anything in range? jgr 11 ; If their is nothing in range then start over mov ax, Var1 cmp ax, 250 ; Find anything close enough for sonar? jls 3 ; If it is then goto sonar tracking jmp 2 ; we found someone but not in range for sonar so lets go see them!! :2 ;Drive To Target ipo 4, ax ; Get turret offset and put it in ax ipo 10, bx ; Get random number and bx, 8 ; now it's 0-8 add ax, bx ; add em up opo 14, ax ; Turn the # of degrees in ax opo 11, 100 ; kick the tires and get outta here jmp 1 :3 ;Use Sonar To Pinpoint Target and fire ipo 16, sonarresult ; Use sonar to get heading of nearest enemy (absolute) cmp sonarresult, 0 ; jls 1 ; If the target is out of range, no use in doing THIS agian. ipo 2, heat ;heat stuff cmp heat, 200 jgr 3 opo 11, 100 ; make sure we are still moving ipo 5, turcurhead ; Store our turrets current heading (abso) mov ax, sonarresult ; dont wanna delete his sub ax, turcurhead ; subtract sonar result with current heading opo 12, ax ; turn the # of degrees opo 15 ; fire opo 15 ; fire ipo 3, heading ; get our heading mov ax, sonarresult ; put sonar reading in ax sub ax, heading ; take the diffrence of the two ipo 10, bx ; Get random number and bx, 8 ; now it's 0-8 add ax, bx ; add em up opo 14, ax ; and move their jmp 3