robot "Example 2" author "Shaos" main() { SetRand(11) state = 0 dx = 80 dy = 25 while(1) { if(state) { Random(dx);xx=L Random(dy);yy=L Random(256);cc=L select xx yy set cc } code = 0 recv code if(N==0) continue if(N==#FFFF) // mouse click { select x y set #FF } else { if(N==#FFFE) // Keyboard (or buttons) { if(code=='S' && state==0) state = 1 if(code=='O' && state==1) state = 0 if(code=='C') { for(xx=0;xx C-RESULT L=C { Rand = 0x6255*Rand+0x3619 RandH = Rand&0xFF00 RandL = Rand&0x00FF C = (RandH>>8)^RandL C = C|RandH C = C&0x7FFF if(A) C=C%A (C) }