PDA

View Full Version : keydown



raimis89
12-08-2006, 09:15 PM
program New;
var z:byte;
begin
repeat
wait(1000)
KeyDown (z);
until false
end.


how do u think why dont this work ?
Im not using this for RS2

raimis89
12-08-2006, 10:24 PM
I want that scar simulates pushing a key in the game ... What should i write
Any sugestions ?

Boreas
12-08-2006, 10:27 PM
Well you made z the NAME of the variable, not the VALUE of the variable. You need z:=SOMETHING for it to mean anything.

Also, keydown holds down the key, and doesn't ever let go until you use keyup. So theres no point in telling it to hold down the key again every second forever, because it is already doing that.

If you haven't already, # 1 (http://villu-reborn.com/showthread.php?t=4845) get those.

EDIT: if you are talking about autotalker, look at the ones posted. They (the good ones) use a procedure in SRL that has randomness between characters, holds down character for random time etc.

raimis89
12-09-2006, 09:01 AM
OKey .
Now Ill try to say it difrent ...
Now i want that it stimulates pushing a left alt

program New;
var leftalt:string;
begin
leftalt:='leftalt' ;
repeat
wait(1000);
KeyDown (leftalt);
wait(1000);
keyUp(leftalt);
until false
end.

I dont need this for autotalking ...
In other game this botton means heal so i want that scar simulats it ...

raimis89
12-09-2006, 09:23 AM
program New;
var
keycodel : Integer;
begin
wait(5000);
repeat
keycodel:= GetKeyCode('z');// cange ? into whatever key you want
Writeln(inttostr(keycodel));
wait(1000);
KeyDown(keycodel);
wait(100);
Keyup(keycodel);
until false
end.



But how can i make stimulate spacebar or alt ?