Log in

View Full Version : [SCAR]ActivateClient allows me to click but not type Ingame



Paradoxium
05-23-2012, 01:51 PM
So I am making a script for an mmorpg called crossfire. Before I could not get the client to recognize clicks but ActivateClient solved that. Now I can click but keystrokes are not recognized...Any advice?

I've tried Keydown and Sendkeys...

Thanks

program Main;

var
X,Y: Integer;

function FindReadys:Boolean;
begin
Result := FindColorTolerance(X, Y,15137340, 1215, 411, 1235, 435, 20) {and FindColorTolerance( X, Y,16120397, 763, 176, 787, 202,20)};
end;

function WaitUntilGameLoads: Boolean;
begin
Result:= FindColorTolerance(X, Y,5411129, 0, 844, 250, 1049, 20)
end;

function EndedGame:Boolean;
begin
Result:= FindColorTolerance(X, Y,14922593,735,241,838,271, 20)
end;

function Tired:Boolean;
begin
result:=FindColorTolerance(X, Y,16120397, 1215, 411, 1235, 435, 20)
end;

procedure GetintoWindow;
begin
ClickMouse(671,1018,true); //clicks back into client
Wait(500);

end;


procedure Logintogame;
begin
ActivateClient;
GetClientWindowHandle;
repeat
Wait(500);
Writeln('Waiting for others to be ready'); //(waits until other cows are ready)
until(FindReadys);

MoveMouseSmooth(1203,675);
Sendkeys('www');
//ClickMouse(1203,675,true); //clicks start once
Writeln('Started Game');

{ repeat
Wait(500);
Writeln('Loading Game...'); //(waits until game loads)
until(WaitUntilGameLoads); }

end;


procedure WalkOver;
begin
Wait(10000);
//ActivateClient;
Writeln('Walking over');

//insert keydowns instead of sendarrow waits
//ClickMouse(400,400,true);
Sendkeys('www');
//walks over to arena side

Writeln('Getting into Position');
MoveMouseSmooth(846,502); //sets up postion
end;

procedure Swinging;
begin

repeat
HoldMouse(846,502,false);
Wait(5000 + Random(1000));
until(EndedGame) ;
end;



begin
GetintoWindow;
repeat
Logintogame;
WalkOver;
Swinging;
until (Tired);
end.

Abu
05-23-2012, 04:16 PM
Try:

TypeSend('whatever you want to type');

Paradoxium
05-23-2012, 04:37 PM
Try:

TypeSend('whatever you want to type');

for some reason scar doesnt even have typesend -_- let me try finding an include for it

Paradoxium
05-23-2012, 04:38 PM
for some reason scar doesnt even have typesend -_- let me try finding an include for it

EDIT: I was looking through it, typesend uses sendkeys :/

Dgby714
05-23-2012, 04:39 PM
for some reason scar doesnt even have typesend -_- let me try finding an include for it

I'm pretty sure it works the same as SCAR's SendKeys.

Isn't there a SCAR section? or better yet the SCAR forums?

Paradoxium
05-23-2012, 04:41 PM
I'm pretty sure it works the same as SCAR's SendKeys.

Isn't there a SCAR section? or better yet the SCAR forums?

yeahh I posted there, but not much help & the forum isnt too active

Abu
05-23-2012, 04:42 PM
I'm pretty sure it works the same as SCAR's SendKeys.

Isn't there a SCAR section? or better yet the SCAR forums?

Yup,
http://forums.scar-divi.com/forum.php

Dgby714
05-23-2012, 04:50 PM
yeahh I posted there, but not much help & the forum isnt too active

You realize what you just did is like asking Firefox users for help with IE....

Anyways it may just be how SCAR does key presses, some games have protection against simulated input.

NCDS
05-23-2012, 06:16 PM
Normally I wouldn't post this, but since you ask for my opinion; You may want to try writing whatever program you're working on in Simba. We can only help so much with SCAR related issues, whereas we can accommodate for most any issues with Simba as we can edit the source if need be.

Not trying to persuade you either way, just stating the facts.

Paradoxium
05-23-2012, 06:27 PM
Normally I wouldn't post this, but since you ask for my opinion; You may want to try writing whatever program you're working on in Simba. We can only help so much with SCAR related issues, whereas we can accommodate for most any issues with Simba as we can edit the source if need be.

Not trying to persuade you either way, just stating the facts.

alright well I did more research and found that x-trap the game's antihack blocks sendkeys(and probably Keydown and Keyup and TypeSend)...I would move it to Simba but I think my project just died unless there is an alternative to sendkeys.... If there was a way for Simba to make the computer think that the keyboard was actually typing it, not it sending the command to it...

Abu
05-23-2012, 09:32 PM
Now that I've thought about it, this is not much different from when people ask for help with powerbot scripts.

It's actually unfair how they get flamed of the forums.

Luckily, we used to be SCAR, but the concept is the same, it's still a different program(bot).

Paradoxium
05-23-2012, 10:20 PM
Now that I've thought about it, this is not much different from when people ask for help with powerbot scripts.

It's actually unfair how they get flamed of the forums.

Luckily, we used to be SCAR, but the concept is the same, it's still a different program(bot).

lol SIMBA was developed from scar....and okay but no please dont compare me to ppl like that wow dude low blow