manhuaco Posted January 11, 2012 Share Posted January 11, 2012 Hello guys I'm scripting a simple bot for game Tibia, and I want my character to logout whenever another character enters the screen, by recognizing the color of his face (the only color that doesnt change from char to char is it's face color), and then pressing ctrl+L So it would be: FindColor (I enter the x and y values, so with rgb. Looping again and again till it outputs ''true'') if it outputs ''true'' then press ctrl+L. Yes I know it's kinda simple but since im a bash scripter and im in a hurry, I need you Pascals to help me thanks in advace, greetings from Chile. Quote Link to comment Share on other sites More sharing options...
sjesper Posted January 24, 2012 Share Posted January 24, 2012 You can just use KeyDown and KeyUp like this: Keydown(VK_CONTROL); Keydown(76); KeyUp(VK_CONTROL); KeyUp(76); For a complete list of key code for scar look here: http://www.neofriends.net/scripting-f51/key-codes-for-scar-t3808.html Quote Link to comment Share on other sites More sharing options...
opiumhautopium1 Posted January 24, 2012 Share Posted January 24, 2012 begin while FindColor(var x, y: Integer; Color, xs, ys, xe, ye: Integer)=false do begin blbla wait(xxxxxx) end; if find FindColor(var x, y: Integer; Color, xs, ys, xe, ye: Integer)=true then begin Keydown(VK_CONTROL); Keydown(76); KeyUp(VK_CONTROL); KeyUp(76); .... ... .... end; Quote Link to comment Share on other sites More sharing options...