logiteck api (http://www.wolfpack.pe.kr/attachment/1180489860.pdf) trying to make a mouse script that presses a button for a certain amount of time and then makes a turn 180 degrees ingame: However not being sure of what my mouse sensitivity will be i want to make it adapt to my mouse sensitivity so:
when I press right button to begins to turn right until I release it stores the number of repeats for that turn in the
ivariableit holds that variable for the second function where the program initially press "w" for me to move (unimportant) and then has a small delay (the small for loop). My player walks for that delay and then the
ivariable is used to simulate that exact turn I made before
EnablePrimaryMouseButtonEvents(true);
function OnEvent(event, arg)
if IsMouseButtonPressed(3)then
i=1
repeat
i=i +1
MoveMouseRelative(3,0)
Sleep(5)
until not IsMouseButtonPressed(3)
end
end
function oniEvent(event, arg)
if IsKeyLockOn("numlock" )then
PressKey( "w" );
repeat
u=0
j=1
for k=1,999,1 do j=j/2
////delay////
end
repeat
u=u + 1
MoveMouseRelative(3,0)
Sleep(5)
until u==i
until not IsKeyLockOn("numlock" )
ReleaseKey( "w" );
end
end
Problem: when I press numlock it does even start pressing "w"