Results 1 to 10 of 10

Thread: HPPercent

  1. #1
    Join Date
    May 2007
    Location
    Some where fun.
    Posts
    2,891
    Mentioned
    1 Post(s)
    Quoted
    5 Post(s)

    Default HPPercent

    Works often. just randomly didn't work, I'm running a bandits afker which relies on HPPercent. It worked for like 20min , then HPPercent stopped working, and the script just ate all my fish. >.>

    It may of been a scar bug, but I just wanted to put it out there.

  2. #2
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Colors/font could have very possibly changed.

  3. #3
    Join Date
    May 2007
    Location
    Some where fun.
    Posts
    2,891
    Mentioned
    1 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by i luffs yeww View Post
    Colors/font could have very possibly changed.
    So if the fonts/colors change during runtime, HPPercent wont work?

  4. #4
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    What? Haha no I meant like.. from the last login update. The font/colors they use for HP could have changed, so it doesn't work at all percents. Unless it worked at one point then it didn't at that same point later.. But uhh.. What about it just getting stuck in an infinite loop somehow (in your script)? Could that be a possibility?

    Or if it's neither, then it might be that the OCR is wrong for that for whatever reason. If that's the case, then I dunno right now. At work. :<

  5. #5
    Join Date
    May 2007
    Location
    Some where fun.
    Posts
    2,891
    Mentioned
    1 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by i luffs yeww View Post
    What? Haha no I meant like.. from the last login update. The font/colors they use for HP could have changed, so it doesn't work at all percents. Unless it worked at one point then it didn't at that same point later.. But uhh.. What about it just getting stuck in an infinite loop somehow (in your script)? Could that be a possibility?

    Or if it's neither, then it might be that the OCR is wrong for that for whatever reason. If that's the case, then I dunno right now. At work. :<
    It failed again, it started eating all my fish at 100 % HP

    SCAR Code:
    program new;
    {.include srl/srl.scar}

    Procedure DeclarePlayers;
    begin
      NumberOfPlayers(1);
      CurrentPlayer := 0;

      Players[0].Name :='i i';
      Players[0].Pass :='';
      Players[0].Nick :='eeee';
      Players[0].Active := True;
    end;

    Procedure afk;
    Begin
     // cleardebug;
            case random(88) of
        0: begin
             KeyDown(VK_RIGHT);
             Wait(Random(1000));
             KeyUp(VK_Right);
           end;
        1: begin
             KeyDown(VK_UP);
             Wait(Random(1000));
             KeyUp(VK_UP);
           end;
        2..5: begin
             mmouse(random(500),random(500), 0,0);
           end;
        6: begin
             KeyDown(VK_LEFT);
             Wait(Random(1000));
             KeyUp(VK_LEFT);
           end;
        7: begin
             KeyDown(VK_DOWN);
             Wait(random(1000));
             KeyUp(VK_DOWN);
           end;
        8..88: Wait(random(1000));
        end;
        findnormalrandoms;
        userewardbox;
       
    end;

    procedure letseat;
    var i,x,y:integer;
    begin
      cleardebug;
      for i := 5 to 28 do
      begin
        if ExistsItem(i) then
        begin
          mMouseItem(i);
          wait(60+random(60));
          if isuptext('at') then
          begin
            getmousepos(x,y);
            mouse(x,y,0,0,true);
           
            writeln('ate');
            wait(1500+random(1500));
          end;
          if (hppercent > (65 + random(3))) then exit;
        end;
      end;
      if hpPercent < 50 then
      begin
        writeln('uh oh ');
        alert('HELPZ0r');
      end;
    end;

         


    begin
      setupsrl;
      declareplayers;
      gametab(tab_inv);

      repeat
        afk;
        if HpPercent < ( 60 - random(5)) then
          letseat;
        wait(400+random(400));
        writeln('t r = '+timerunning+'');
      until false;
    end.
     
    end.

    That script works fine, until a random moment in time BOOM, Lets eat all of camaro's fish.

  6. #6
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Maybe it's missing one of the numbers for example maybe it always misses the number 5 ect... the bitmap for one the chars might of changed, if not debug it and check if it's returning 0... if that's the case then simply do if (Whatever < 1) then Ignore...
    Last edited by Wanted; 03-11-2010 at 10:45 PM.

  7. #7
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    That's kind of what I meant, IceFire. But thanks for explaining. :3

    Oh wait.. HPPercent checks the thing in the top right, right? Now that it's 100-990, could that have any effect on it? Since some of the numbers may just be unreadable, it'd just mistake the whole thing for a very small number. But that doesn't really solve the nonstop eating.. :/ If anything, it should stop at 100% health, I think.

  8. #8
    Join Date
    May 2007
    Location
    Some where fun.
    Posts
    2,891
    Mentioned
    1 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by i luffs yeww View Post
    That's kind of what I meant, IceFire. But thanks for explaining. :3

    Oh wait.. HPPercent checks the thing in the top right, right? Now that it's 100-990, could that have any effect on it? Since some of the numbers may just be unreadable, it'd just mistake the whole thing for a very small number. But that doesn't really solve the nonstop eating.. :/ If anything, it should stop at 100% health, I think.
    You guys are probably right with the 'one' bitmap being broken. Now, which one.........

  9. #9
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Uhh.. Just get down to your max health - 10, and then take a screen shot and save it after every number (0, 1, 2, 3, 4, 5, 6, 7, 8, 9), and then if all of those work, it's something to do with how the text is read/displayed. :/

  10. #10
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Or just debug a bunch of different HPPercent's until one comes up wrong, then that's the bad one?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •