help simba script plz!!!

Posts 1–2 of 2 · Page 1 of 1
help simba script plz!!!
my script !!

Code:
program rotmg_priest_autoheal_autoescape;
const
    window = 'Realm of the Mad God'; // text from the title of the window that runs rotmg.  doesn't have to be the whole text.  just enough to identify the window.
    escapehealthpercentage = 0.45; // when health drops below this percentage, hit the escape key
    healhealthpercentage = 0.85; // when health drops below this percentage, hit the heal key (priest)
    escapekeycode = 9; // tab key; if you change this key, you MUST also change the 'IsKeyDown' value at line 76
    healkeycode = 32; // space key; list of keycodes at http://docs.************/simba/scriptref/mouseandkeyboard.html?highlight=sendkeys#keyboard-virtual-keys
var
    windoww : Integer;
    windowh : Integer;
    realmx : Integer;
    realmy : Integer;
    hpimage : Integer;
    running : Boolean;
    nohealthcolor : TColor;
    healthx : Integer;
    healthy : Integer;
function FindAndSetTarget(TitlePrefix: String; SetAsTarget: Boolean): Boolean;
var
    T: TSysProcArr;
    I: Integer;
begin
    T:= GetProcesses();
    for I := 0 to high(T)-1 do
    begin
        if ExecRegExpr(TitlePrefix, T[I].Title) then
        begin
          Result := True;
          if SetAsTarget then
          begin
              SetTarget(T[I]);
              ActivateClient;
          end;
        end;
    end;
end;
procedure Initialize;
begin
    running := true;
    FindAndSetTarget(window, true);
    GetClientDimensions(windoww, windowh);
    hpimage := LoadBitmap(IncludePath + 'ROTMG\hp.png');
    Writeln('Finding Realm of the Mad God');
    if FindBitmapToleranceIn(hpimage, realmx, realmy, 0, 0, windoww-1, windowh-1, 50) then
        begin
            Writeln('Realm of the Mad God window found at '+IntToStr(realmx)+','+IntToStr(realmy));
            running := true;
        end else
        begin
            Writeln('Realm of the Mad God window not found! :(');
        end;
    nohealthcolor := RGBtoColor(84, 84, 84);
    healthx := floor(176 * escapehealthpercentage);
    healthy := floor(176 * healhealthpercentage);
end;
begin
    Initialize();
    Writeln('Auto-escaper started...');
    while running do
    begin
        if CountColorTolerance(nohealthcolor, realmx + healthx +2 , realmy + 7, realmx + healthx +3, realmy + 8, 25) > 2 then
          begin
              Writeln('Escaping!');
              KeyDown(escapekeycode);
              Wait(1);
              KeyUp(escapekeycode);
              Wait(1);
          end else
          begin
              if CountColorTolerance(nohealthcolor, realmx + healthy +2, realmy + 7, realmx + healthy +3, realmy + 8, 25) > 2 then
                begin
                  Writeln('Healing!');
                  KeyDown(healkeycode);
                  Wait(1);
                  KeyUp(healkeycode);
                  if IsKeyDown(9) then
                  Wait(1);
                end;
          end;
        Wait(100);
    end;
    Writeln('Failed to start auto-escaper.');
end.
i get this shiit no work why?

Compiled successfully in 0 ms.
Finding Realm of the Mad God
Realm of the Mad God window not found!
Auto-escaper started...
Successfully saved: C:\Simba\Scripts\AutoNexus updated 2.simba
Maybe you should change "window = 'Realm of the Mad God'; // text from the title of the window that runs rotmg. doesn't have to be the whole text. just enough to identify the window."....

If you are using a projector, 'Realm of the Mad God' would change to 'Adobe Flash Player 11'.
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?