Jump to content
solja

Need help updating a simple script to run in newer version of SCAR

Recommended Posts

I usually run SCAR 1.12 but lately it has been randomly crashing i think when it doesn't find a .bmp. I'm used to just basic scripting can do almost anything with findbitmap but for some reason I cant compile my old script with newer version of SCAR (currently running SCAR 3.41 portable).

 

Here is a sample of my script that I'm trying to change, so my problem is identifying .bmp's.

 

program muggers;

var

x, y,runes,arrows,moderator: Integer;

begin

writeln ('starting script...')

repeat

x:= Random(500);

y:= Random(360);

movemouse(26,290);

wait(500 + Random(200) - 1);

 

//stops if mod talks

moderator:= LoadBitmap('.\Pics\moderator.bmp');

while(Findbitmap(moderator,x,y)do

begin

writeln ('mod around... waiting 20 minutes.')

wait(1200000);

end;

 

 

//fightwait

while(getcolor(108,55)= 16777215)do

begin

writeln ('in combat...')

wait(2000);

end;

 

 

//pick

if(FindColorSpiral2(x,y,(14603982),190,145,290,200))then

begin

writeln ('picking...')

arrows:= LoadBitmap('.\Pics\arrows.bmp');

runes:= LoadBitmap('.\Pics\runes.bmp');

clickmouse(x,y,false);

wait(500 + Random(200) - 1);

if(FindBitmap(arrows,x,y))or

(Findbitmap(runes,x,y))then

begin

clickmouse(x,y,false);

wait(500 + Random(200) - 1);

end;

end;

 

//closes restart messages

while(getcolor(277,158)= 16777215)and

(getcolor(102,160)= 16777215)do

begin

clickmouse(239,231,true);

wait(456);

end;

 

//login

while(getcolor(88,172)= 3537407)or

(getcolor(108,140)= 3537407)do

begin

writeln ('waiting 10 mins to login...')

wait(120000);

clickmouse(309,315,true);

wait(2000);

SendKeys(#13);

wait(2000);

SendKeys(#13);

wait(2000);

SendKeys(#13);

wait(2000);

SendKeys(#13);

wait(2000);

SendKeys(#13);

wait(2000);

end;

 

until(getcolor(108,55)= 16777217)

end.

[code]

Link to comment
Share on other sites

I usually run SCAR 1.12 but lately it has been randomly crashing i think when it doesn't find a .bmp. I'm used to just basic scripting can do almost anything with findbitmap but for some reason I cant compile my old script with newer version of SCAR (currently running SCAR 3.41 portable).

 

Here is a sample of my script that I'm trying to change, so my problem is identifying .bmp's.

 

program muggers;
var
 x, y,runes,arrows,moderator: Integer;
  begin
   writeln ('starting script...')
  repeat
   x:= Random(500);
   y:= Random(360);
  movemouse(26,290);
wait(500 + Random(200) - 1);

   //stops if mod talks
moderator:= LoadBitmap('.\Pics\moderator.bmp');
while(Findbitmap(moderator,x,y)do
begin
writeln ('mod around... waiting 20 minutes.')
wait(1200000);
end;


//fightwait
while(getcolor(108,55)= 16777215)do
begin
writeln ('in combat...')
wait(2000);
end;


 //pick
   if(FindColorSpiral2(x,y,(14603982),190,145,290,200))then
   begin
    writeln ('picking...')
    arrows:= LoadBitmap('.\Pics\arrows.bmp');
    runes:= LoadBitmap('.\Pics\runes.bmp');
   clickmouse(x,y,false);
wait(500 + Random(200) - 1);
if(FindBitmap(arrows,x,y))or
(Findbitmap(runes,x,y))then
begin
clickmouse(x,y,false);
wait(500 + Random(200) - 1);
end;
end;

//closes restart messages
while(getcolor(277,158)= 16777215)and
(getcolor(102,160)= 16777215)do
begin
clickmouse(239,231,true);
wait(456);
end;

//login
while(getcolor(88,172)= 3537407)or
(getcolor(108,140)= 3537407)do
begin
writeln ('waiting 10 mins to login...')
wait(120000);
clickmouse(309,315,true);
wait(2000);
SendKeys(#13);
wait(2000);
SendKeys(#13);
wait(2000);
SendKeys(#13);
wait(2000);
SendKeys(#13);
wait(2000);
SendKeys(#13);
wait(2000);
end;

until(getcolor(108,55)= 16777217)
end.

 

You missed the / on the last code tag should be [/code]

 

program muggers;

const
 RSX1 = 0;       // RS07 Client Edge Points 
 RSY1 = 0;                                     
 RSX2 = 764;                              
 RSY2 = 502;     // Psuedo code for script example.. may consider smaller bounds.                             

var
 x, y: Integer;  
 moderator,runes,arrows: TSCARBitmap;
  begin
   writeln ('starting script...')
  repeat
   x:= Random(500);
   y:= Random(360);
  movemouse(26,290);
wait(500 + Random(200) - 1);

   //stops if mod talks
moderator.LoadFromBmp('.\Pics\moderator.bmp');
while(Findbitmap(x,y, moderator, RSX1, RSY1, RSX2, RSY2))do
begin
writeln ('mod around... waiting 20 minutes.')
wait(1200000);
end;


//fightwait
while(getcolor(108,55)= 16777215)do
begin
writeln ('in combat...')
wait(2000);
end;


 //pick 
   if(FindColorSpiral(x,y,x,y,(14603982),190,145,290,200))then
   begin
    writeln ('picking...')
    arrows.LoadFromBmp('.\Pics\arrows.bmp');
    runes.LoadFromBmp('.\Pics\runes.bmp');
   clickmouse(x,y,false);
wait(500 + Random(200) - 1);
if(Findbitmap(x,y, arrows, RSX1, RSY1, RSX2, RSY2))or
(Findbitmap(x,y, runes, RSX1, RSY1, RSX2, RSY2))then                           
begin
clickmouse(x,y,false);
wait(500 + Random(200) - 1);
end;
end;

//closes restart messages
while(getcolor(277,158)= 16777215)and
(getcolor(102,160)= 16777215)do
begin
clickmouse(239,231,true);
wait(456);
end;

//login
while(getcolor(88,172)= 3537407)or
(getcolor(108,140)= 3537407)do
begin
writeln ('waiting 10 mins to login...')
wait(120000);
clickmouse(309,315,true);
wait(2000);
TypeText(#13);
wait(2000);
TypeText(#13);
wait(2000);
TypeText(#13);
wait(2000);
TypeText(#13);
wait(2000);
TypeText(#13);
wait(2000);
end;

until(getcolor(108,55)= 16777217)
end.

 

Updated to compile

 

Would not recommend use of this considering it does not use any of OSI's or human style macroing among a laundry list of other apparent issues.

Link to comment
Share on other sites

I usually run SCAR 1.12 but lately it has been randomly crashing i think when it doesn't find a .bmp. I'm used to just basic scripting can do almost anything with findbitmap but for some reason I cant compile my old script with newer version of SCAR (currently running SCAR 3.41 portable).

 

Here is a sample of my script that I'm trying to change, so my problem is identifying .bmp's.

 

program muggers;

var

x, y,runes,arrows,moderator: Integer;

begin

writeln ('starting script...')

repeat

x:= Random(500);

y:= Random(360);

movemouse(26,290);

wait(500 + Random(200) - 1);

 

//stops if mod talks

moderator:= LoadBitmap('.\Pics\moderator.bmp');

while(Findbitmap(moderator,x,y)do

begin

writeln ('mod around... waiting 20 minutes.')

wait(1200000);

end;

 

 

//fightwait

while(getcolor(108,55)= 16777215)do

begin

writeln ('in combat...')

wait(2000);

end;

 

 

//pick

if(FindColorSpiral2(x,y,(14603982),190,145,290,200))then

begin

writeln ('picking...')

arrows:= LoadBitmap('.\Pics\arrows.bmp');

runes:= LoadBitmap('.\Pics\runes.bmp');

clickmouse(x,y,false);

wait(500 + Random(200) - 1);

if(FindBitmap(arrows,x,y))or

(Findbitmap(runes,x,y))then

begin

clickmouse(x,y,false);

wait(500 + Random(200) - 1);

end;

end;

 

//closes restart messages

while(getcolor(277,158)= 16777215)and

(getcolor(102,160)= 16777215)do

begin

clickmouse(239,231,true);

wait(456);

end;

 

//login

while(getcolor(88,172)= 3537407)or

(getcolor(108,140)= 3537407)do

begin

writeln ('waiting 10 mins to login...')

wait(120000);

clickmouse(309,315,true);

wait(2000);

SendKeys(#13);

wait(2000);

SendKeys(#13);

wait(2000);

SendKeys(#13);

wait(2000);

SendKeys(#13);

wait(2000);

SendKeys(#13);

wait(2000);

end;

 

until(getcolor(108,55)= 16777217)

end.

[code]

 

Please do not run this script.

If the game you are trying to use this script on as [i]ANY [/i]basic anti-botting/anti-macroing system, they [i]WILL [/i]catch you.

Look at your code.. You are using specific points with no random anything.

You need to randomize it.

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...