• Log in or sign up for an account here: https://www.sythe.org/login

Can someone tell me what I'm doing wrong?

9pyro9mage9

Active Member

$5 USD Donor
Joined
Apr 3, 2007
Sythe Gold
0
Messages
241
Can someone tell me why this script won't work? it seems right I made it but I don't know whats wrong with it. When I run it it says "Unknown identifier 'm' in script". Here is the script...
program Goblin;
{.include SRL/SRL.scar}


procedure Attack;
begin
if Findcolorspiraltolerance(x,y,3510411,5,5,510,330,5) or
Findcolorspiraltolerance(x,y,5476460,5,5,510,330,5) then
wait(10+random(10));
mouse(x,y,1,1,false);
wait(300+random(500));
chooseoption(x,y,'attack');
end;

procedure Setup;
begin
setupsrl;
end;

procedure key;
begin
keydown'm);
wait(10+random(50));
keyup(m);
end;

begin
Setup;
repeat
begin
if key then
Attack;
end;
until(false);
end.

All I want this script to do is if i press the key "m" I want it to search for one of those colors if it cant find the other then click on it.
 
Code:
program Goblin;

{.include SRL/SRL.scar}

procedure Attack;
begin
  if Findcolorspiraltolerance(x,y,3510411,5,5,510,330,5 ) or
  Findcolorspiraltolerance(x,y,5476460,5,5,510,330,5 ) then
  begin
    wait(10+random(10));
    mouse(x,y,1,1,false);
    wait(300+random(500));
    chooseoption(x,y,'attack');
  end;
end;

procedure Setup;
begin
  setupsrl;
end;

function key : boolean;
begin
  result := IsKeyDown('m');
  wait(10+random(50));
end;

begin
  Setup;
  repeat
    if key then
      Attack;
  until(false);
end.

Don't understand? Let me know.
 
Runescape Gamblingrunescape gambling
Back
Top