Results 1 to 2 of 2
  1. #1
    pings's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    Montreal, Quebec
    Posts
    161
    Reputation
    10
    Thanks
    253
    My Mood
    Sad

    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 https://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

  2. #2
    nilly's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    2,652
    Reputation
    155
    Thanks
    13,983
    My Mood
    Angelic
    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'.

  3. The Following User Says Thank You to nilly For This Useful Post:

    pings (10-02-2012)

Similar Threads

  1. [Help] Simba script help plz!
    By pings in forum Realm of the Mad God Hacks & Cheats
    Replies: 3
    Last Post: 09-03-2012, 10:48 PM
  2. [Help Request] Need help running MiniHackPack plz
    By eldadleyba in forum Alliance of Valiant Arms (AVA) Help
    Replies: 0
    Last Post: 07-13-2012, 01:18 PM
  3. [Help Request] help me fasst plz guys
    By wakosam in forum CrossFire Help
    Replies: 3
    Last Post: 06-20-2011, 09:10 PM
  4. [Done] Help Wit Sig Plz?
    By acepwnage in forum Art & Graphic Design
    Replies: 11
    Last Post: 09-12-2009, 06:03 AM
  5. [Done] Help Wit Sig Plz?
    By acepwnage in forum Help & Requests
    Replies: 12
    Last Post: 06-10-2006, 01:15 PM