Jump to content
BryceTheCoder

Why is it not clicking my colors it finds?

Recommended Posts

Hello i have a chicken bot and i know it finds the colors of the chickens becuase i get:

 

--------------------------------------------------------------

-> YOU ARE RUNNING ON VERSION: 0.1

Always make sure you have the latest version:)

--------------------------------------------------------------
Found Chicken NPC: 136, 336
ANTIBAN: Randomly moving mouse.
Found Chicken NPC: 262, 121
Found Chicken NPC: 98, 324
Found Chicken NPC: 108, 325

 

 

buut it doesnt ever move the mouse to it and click it...

 

 

 

HERE IS MY WHOLE CODE:

 

//SCRIPT CREATED BY: Bryce7

{$DEFINE RS2}
{$DEFINE OSI_Color_Anti_Randoms}
{$DEFINE SMART}

{.include OSI\OSI.scar}
{.include OSI\RS2\Extended\Timing.scar}
{.include OSI\RS2\Misc\Anti-Ban.scar}

const
version = '0.1';//Do NOT Touch

var
 x, y, yupp: Integer;

procedure ScriptTerminate;
begin
 FreeOSI;
end;

procedure StartUp;
begin
 if(yupp = 0) then
 begin
   WriteLn('--------------------------------------------------------------');
   WriteLn('');
   WriteLn('-> YOU ARE RUNNING ON VERSION: ' + version);
   WriteLn('');
   WriteLn('Always make sure you have the latest version:)');
   WriteLn('');
   WriteLn('--------------------------------------------------------------');
   yupp:= 1;
 end;
 ClickCompass(True);
 Wait(200 + Random(500));
end;

procedure RandomMice;
var
 x, y: Integer;
begin
 x := Random(400);
 Wait(250 + Random(150));
 y := Random(300);
 Wait(50);
 MoveWindMouse(x, y, 25, 25);
 Wait(450 + Random(350));
 WriteLn('ANTIBAN: Randomly moving mouse.');
end;

procedure ClickIt;
var
 x, y: Integer;
begin
 if IsUpTextMulti(['Attack', 'Att','ack']) then
 begin
   SmartGetMousePos(x, y);
   Mouse(x, y, 1, 1, True);
   Wait(2300 + Random(2800));
 end;
 if Random(5) = 0 then
 begin
   RandomMice;
   Wait(35 + Random(100));
 end;
end;

procedure FindNPC;
var
 w, h: Integer;
 p: TPoint;
 TPA: TPointArray;
begin
 GetClientDimensions(w, h);
 begin
   ColorToleranceSpeed(2);
   SetColorspeed2Modifiers(0.14, 0.72);
   if FindColorsTolerance(TPA, 4090493, MSX1, MSY1, MSX2, MSY2, 8) then
   begin
     p := TPA[Random(Length(TPA))];
     WriteLn('Found Chicken NPC: ' + IntToStr(p.x) + ', ' + IntToStr(p.y));
     MMouse(x, y, 0, 0);
     Wait(100 + Random(200));
     ClickIt;
   end;
 end;
end;

begin
 SetupOSI;
 repeat
   StartUp;
   FindNPC;
   //ClickIt;
 until False;
end.

Link to comment
Share on other sites

umm clickit is commented out?

 

procedure ClickIt;

var

x, y: Integer;

begin ////// Dont you want to find color after begin then if text is up ?

if IsUpTextMulti(['Attack', 'Att','ack']) then

begin

SmartGetMousePos(x, y);

Mouse(x, y, 1, 1, True);

Wait(2300 + Random(2800));

end;

Edited by rsutton
Umm
Link to comment
Share on other sites

-.-nooo thats not the reasons since i have it in my FindNPC procedure...

 

procedure FindNPC;
var
 w, h: Integer;
 p: TPoint;
 TPA: TPointArray;
begin
 GetClientDimensions(w, h);
 begin
   ColorToleranceSpeed(2);
   SetColorspeed2Modifiers(0.14, 0.72);
   if FindColorsTolerance(TPA, 4090493, MSX1, MSY1, MSX2, MSY2, 8) then
   begin
     p := TPA[Random(Length(TPA))];
     WriteLn('Found Chicken NPC: ' + IntToStr(p.x) + ', ' + IntToStr(p.y));
     MMouse(x, y, 0, 0);
     Wait(100 + Random(200));
     [color="#FF0000"]ClickIt;[/color]
   end;
 end;
end;

 

EDIT: Ugg nevermind i quit.. nothing is working..

Edited by BryceTheCoder
Link to comment
Share on other sites

You're not clicking the right coordinates:

 

//SCRIPT CREATED BY: Bryce7

{$DEFINE RS2}
{$DEFINE OSI_Color_Anti_Randoms}
{$DEFINE SMART}

{.include OSI\OSI.scar}
{.include OSI\RS2\Extended\Timing.scar}
{.include OSI\RS2\Misc\Anti-Ban.scar}

const
version = '0.1';//Do NOT Touch

var
 yupp: Integer;

procedure ScriptTerminate;
begin
 FreeOSI;
end;

procedure StartUp;
begin
 if(yupp = 0) then
 begin
   WriteLn('--------------------------------------------------------------');
   WriteLn('');
   WriteLn('-> YOU ARE RUNNING ON VERSION: ' + version);
   WriteLn('');
   WriteLn('Always make sure you have the latest version:)');
   WriteLn('');
   WriteLn('--------------------------------------------------------------');
   yupp:= 1;
 end;
 ClickCompass(True);
 Wait(200 + Random(500));
end;

procedure RandomMice;
var
 x, y: Integer;
begin
 x := Random(400);
 Wait(250 + Random(150));
 y := Random(300);
 Wait(50);
 MoveWindMouse(x, y, 25, 25);
 Wait(450 + Random(350));
 WriteLn('ANTIBAN: Randomly moving mouse.');
end;

procedure ClickIt;
var
 x, y: Integer;
begin
 if IsUpTextMulti(['Attack', 'Att','ack']) then
 begin
   SmartGetMousePos(x, y);
   Mouse(x, y, 1, 1, True);
   Wait(2300 + Random(2800));
 end;
 if Random(5) = 0 then
 begin
   RandomMice;
   Wait(35 + Random(100));
 end;
end;

procedure FindNPC;
var
 w, h: Integer;
 p: TPoint;
 TPA: TPointArray;
begin
 GetClientDimensions(w, h);
 begin
   ColorToleranceSpeed(2);
   SetColorspeed2Modifiers(0.14, 0.72);
   if FindColorsTolerance(TPA, 4090493, MSX1, MSY1, MSX2, MSY2, 8) then
   begin
     p := TPA[Random(Length(TPA))];
     WriteLn('Found Chicken NPC: ' + IntToStr(p.x) + ', ' + IntToStr(p.y));
     MMouse(p.x, p.y, 0, 0);
     Wait(100 + Random(200));
     ClickIt;
   end;
 end;
end;

begin
 SetupOSI;
 repeat
   StartUp;
   FindNPC;
   //ClickIt;
 until False;
end.

Link to comment
Share on other sites

Ok yaa i figured out and changed it to that, noow it is not very great. can u please run that script so you know how i mean. ITs like stupid. It finds other colors maybe the floor and moves it to that. Buut i did the Auto Color Aid v2.exe like 4 times and it still does the same thing:/

 

Look at FindObjSize in Osi/RS2/extended/Object

Link to comment
Share on other sites

ok soooo i dont know what to put in that line tho.. I need to know what to put in these spaces:

 

If FindObjSize(p.x, p.y, 3237255, 8, [color="#FF0000"]HERE[/color], [color="#FF0000"]HERE[/color], ['chest', 'hest']) then

 

And for the chest part. Would put: "chicken" , or "attack"

 

Didn't I fix this method for you in another topic?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...