Log in

View Full Version : pressing keys with simba?



warlacozte
04-07-2012, 11:14 AM
so im trying to make it work for the cod4 FNG course and i cant figure out on how to make it use f,w,a,s,d,space and shift.
i got

procedure rope;

Begin
PressKey(F);
end;

(F is because it needs to grab the rope in the beginning)

note that this is just a little random experiment and im not looking for it to make the entire course and stuff. at least not in a good time.

JuKKa
04-07-2012, 11:28 AM
include SRL and use "TypeByte"

press CTRL + space and type VK_ to get keys.

warlacozte
04-07-2012, 02:57 PM
include SRL and use "TypeByte"

press CTRL + space and type VK_ to get keys.

i did some testing with 2d cs and it works ok.
but how do i make it do "duck" after 30 shoots (when it ducks it also reloads)
game is here http://www.kongregate.com/games/shaunh77/counter-strike?acomplete=counter


program 2dcs_warlacozte;

procedure Shot;
var
x, y:Integer;
begin
wait (30);
if FindColorSpiralTolerance(x, y, 65535, 1, 58, 636, 403, 30) Then
Begin
MoveMouse(x, y);
Wait (5);
ClickMouse(x, y, 1);
Wait (5);
end;
end;

procedure duck;
begin
wait (10);
PressKey(69);
wait (200);
PressKey(82)
wait (1000);
PressKey(69)
end;

procedure start;

begin
wait (3000);
end;


begin;
start
repeat
shot;
duck;
until(false);
end.