Hey all, im trying to write a script for a private surver of Regnerok Online (the surver is RebirthRO) and im getting one recurring problem that i havent been able to fix for days, and its driving me crazy.
ok so the problem is that variables seem to be getting stuck, as in if i do:
SCAR Code:
if(FindColorTolerance(x, y, 8092655, X1, Y1, X2, Y2, 7)) then
  begin
    Writeln(x + ',' + y);
  end;

it will sometimes find the color the first time i run the script, and then when i try to loop it it will find that color again in the same coordinates even though its no longer there. also if i stop the script and reset the crosshair thing and restart the script it will STILL have the x,y coordinates registered as the origional coordinates. now i did ONCE fix this somehow.. with alot of hours spent with experimenting with the coordinates and tweaking things and i guess just randomly figureing it out.. so when i finaly figured it out it was late in the night and i was so tired i think i might have accedentaly closed it without saveing... i know its stuipd but it was realy late :P so in the morning when i tested it out again i was like WHAT THE FUCK I HATE MYSELF and yeah..

so now atleast i know its posible to over come this.. and its not that im an unskilled scripter (well i am unskilled) but i do have the ability to make a simple auto clicker, ive ran many tests using the exact same script on other programs like paint, finding the colors and painting them in and the only time it gliches up is on Regnerok. is it posible that regnerok messes with SCARs color reading abilities for anti-bot purposes?

and also, last night i got the brain wave to try DTM's which worked BEAUTIFUFLY, ill give you a sample of what just one of my DTM's looked like, so far i only have two one, a marker to tell if your in afight, and one to find the mouse changing to a sword because when you mouse over a monster it changes to a sword.

SCAR Code:
program New;
{.include SRL/SRL.SCAR}

var
  SwordMouse : Integer;

const
  X1 = 0;
  Y1 = 0;
  X2 = 1024;
  Y2 = 768;

Function RanWait(time:Integer):Boolean;
begin
  case Random(3) of
    0: Wait(time + Random(300));
    1: Wait(time + Random(500));
    2: Wait(time + Random(1000));
  end;
  Result := true;
end;

procedure CallDTMSwordMouse;
begin
   SwordMouse := DTMFromString('78DA63FCCBC8C09006C44880959595410E488' +
       '344FF030123484D0EAA1A76760EB81A10606462C2308797971755' +
       '0D2B504D3EAA9A35471EA1AAE106AA294655139ADE88AA8617A8A' +
       '610554D485A3D8322B21A76260C37BFF9F217D51C01A09A325435' +
       '61D9DDA86A04816A4A51D504A6B6A2DA250454538EAA86999911C' +
       '51C003A17168A');
end;

function FindSword : Boolean;
var
  xd, yd : Integer;

begin
  CallDTMSwordMouse;
  if(FindDtm(SwordMouse, xd ,yd ,X1 ,Y1 ,X2, Y2)) then
  begin
    Mouse(xd, yd, 2, 2, true);
    Writeln('SwordMouse(' + IntToStr(xd) + ',' + IntToStr(yd) + ')');
    Result := true;
  end;
  if(not FindDtm(SwordMouse, xd ,yd ,X1 ,Y1 ,X2, Y2)) then
  begin
    Result := false;
    Writeln('SwordMouse DTM was not found');
  end;
  FreeDTM(SwordMouse);
end;

begin
  SetUpSRL;
  ActivateClient;
  ClearDebug;
  RanWait(1000);
  repeat
    FindSword;
  until(FindSword);
end.

now last night this script worked purfectly fine, it found the mouse DTM and wrote the coordinates. but now when i try it it not only has the coordinates locked like with the findcolortolerance, but also finds the DTM over and over when its not there.. which makes sence if it has coordinates for it..but yeah.

its weird its almost like Regnerok has learnt from my scripting and changed to stop me..

if anyone who has tried scripting for a game like regnerok or maby regnerok itself could help me?