Results 1 to 10 of 10

Thread: HpPercent.

  1. #1
    Join Date
    Feb 2007
    Location
    Estonia.
    Posts
    1,938
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default HpPercent.

    Is HpPercent broken? Results me -1 and 0.

    ~Eerik.
    Last edited by Hobbit; 12-18-2011 at 07:52 PM. Reason: Resolved

  2. #2
    Join Date
    Oct 2008
    Location
    behind you!
    Posts
    1,688
    Mentioned
    2 Post(s)
    Quoted
    40 Post(s)

    Default

    Show your function?

    I am going to show you my eating function on my thieving script, maybe it helps !

    Simba Code:
    Function LowHPLetsEat(What: String): Boolean;
    var
      I, x, y: Integer;
    begin
      Result := (HPPercent < 50) and (LoggedIn);
      If(not(Result)) then
        Exit;

      if Result then
      If InvEmpty then
      begin
        Logout;
        TerminateScript;
      end
      else
        for i := 1 to 28 do
        begin
          InvMouse(I, 3);
          if WaitUpText(What, RandomRange(250, 300)) then
          begin
            GetMousePos(x, y);
            Mouse(x, y, 0, 0, True);
            Exit;
          end else
            Continue;
        end;
    end;
    Hi

  3. #3
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Should be working correctly.

    Tested.


    ~Home

  4. #4
    Join Date
    Feb 2007
    Location
    Estonia.
    Posts
    1,938
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Code:
    if (HPPercent <= EatAt) then
            Eat;
    EatAt is 50.
    Code:
    Procedure Eat;
      var
        DTM,X,Y,X2,
        Y2,T: Integer;
      begin
        if not LoggedIn then Exit;
        if not BankScreen then Exit;
    
        Case lowercase(Food) of
          'lobster' : DTM := DTMFromString('mbQAAAHicY2VgYOgB4g4g7gPiyUA8FYjPA/F1IL4CxHeA+DQQrw+TAJJMKJiLARMwYsFgAACaUQgl');
          'monkfish': DTM := DTMFromString('mggAAAHicY2NgYJjEyMAwEYgXQPE8IJ4GxB+Bct+A+A0DhP0diH8AsbejJcP8miogiwkFcwFJEEYHjDgwBAAAZ90L0w==');
          'shark'   : DTM := DTMFromString('mggAAAHicY2NgYLBjZGAwB2JHIHYHYg8g1gfiEqBcAxBXA3EzEJcCcQsQd+RHAUkmDMzFgB0w4sAQAAAltwXX');
        end;
    
        if FindDTM(DTM, X, Y, MSX1, MSY1, MSX2, MSY2) then
        begin
          HumanMMouse(X, Y, 5, 5);
          ClickMouse2(False);
          WaitOption('Withdraw-5', 300);
    
          MarkTime(T);
          repeat
            FindNormalRandoms;
            if (TimeFromMark(T) > 5000) then
              Exit;
            if (HPPercent >= 85) then
              break;
            if FindDTM(DTM, X2, Y2, MIX1, MIY1, MIX2, MIY2) then
            begin
              HumanMMouse(X2, Y2, 5, 5);
              ClickMouse2(False);
              WaitOption('Eat', 300);
              Wait(RandomRange(425, 675));
              MarkTime(T);
            end;
          until(false)
    
        end;
    
        if FindDTM(DTM, X, Y, MIX1, MIY1, MIX2, MIY2) then
        begin
          HumanMMouse(X, Y, 5, 5);
          ClickMouse2(False);
          WaitOption('Deposit-All', 300);
          Wait(RandomRange(425, 675));
        end;
    
        FreeDTM(DTM);
      end;
    It's from Flight's script, if I wasn't allowed to post it here, let me know, I don't mean to offend anyone in any way.

    ~Eerik.

  5. #5
    Join Date
    May 2011
    Location
    In an Island.
    Posts
    1,413
    Mentioned
    2 Post(s)
    Quoted
    149 Post(s)

    Default

    Quote Originally Posted by Heavenzeyez1 View Post
    Code:
    if (HPPercent <= EatAt) then
            Eat;
    EatAt is 50.
    Code:
    Procedure Eat;
      var
        DTM,X,Y,X2,
        Y2,T: Integer;
      begin
        if not LoggedIn then Exit;
        if not BankScreen then Exit;
    
        Case lowercase(Food) of
          'lobster' : DTM := DTMFromString('mbQAAAHicY2VgYOgB4g4g7gPiyUA8FYjPA/F1IL4CxHeA+DQQrw+TAJJMKJiLARMwYsFgAACaUQgl');
          'monkfish': DTM := DTMFromString('mggAAAHicY2NgYJjEyMAwEYgXQPE8IJ4GxB+Bct+A+A0DhP0diH8AsbejJcP8miogiwkFcwFJEEYHjDgwBAAAZ90L0w==');
          'shark'   : DTM := DTMFromString('mggAAAHicY2NgYLBjZGAwB2JHIHYHYg8g1gfiEqBcAxBXA3EzEJcCcQsQd+RHAUkmDMzFgB0w4sAQAAAltwXX');
        end;
    
        if FindDTM(DTM, X, Y, MSX1, MSY1, MSX2, MSY2) then
        begin
          HumanMMouse(X, Y, 5, 5);
          ClickMouse2(False);
          WaitOption('Withdraw-5', 300);
    
          MarkTime(T);
          repeat
            FindNormalRandoms;
            if (TimeFromMark(T) > 5000) then
              Exit;
            if (HPPercent >= 85) then
              break;
            if FindDTM(DTM, X2, Y2, MIX1, MIY1, MIX2, MIY2) then
            begin
              HumanMMouse(X2, Y2, 5, 5);
              ClickMouse2(False);
              WaitOption('Eat', 300);
              Wait(RandomRange(425, 675));
              MarkTime(T);
            end;
          until(false)
    
        end;
    
        if FindDTM(DTM, X, Y, MIX1, MIY1, MIX2, MIY2) then
        begin
          HumanMMouse(X, Y, 5, 5);
          ClickMouse2(False);
          WaitOption('Deposit-All', 300);
          Wait(RandomRange(425, 675));
        end;
    
        FreeDTM(DTM);
      end;
    It's from Flight's script, if I wasn't allowed to post it here, let me know, I don't mean to offend anyone in any way.

    ~Eerik.
    Yes Eerik. There is a problem with it. Do something like this:

    begin
    Name := '';
    Pass := '';
    Pin := '';
    Level[SKILL_HITPOINTS] := 99;
    BoxRewards := ['XP','xp','lamp'];
    LampSkill := 'Runecrafting';
    Active := True;
    end;

    Add that part to the script, below the pin. Place your HP level. Have fun!

    ~onilika
    ''If you want something you've never had, you have to do something you've never done''


    total leve 2715/1b exp +... exterminated.

  6. #6
    Join Date
    Feb 2007
    Location
    Estonia.
    Posts
    1,938
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Thank you, sir, working like a charm!

    ~Eerik.

  7. #7
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    Resolved
    STOP PM'ING ME

  8. #8
    Join Date
    Oct 2011
    Posts
    805
    Mentioned
    21 Post(s)
    Quoted
    152 Post(s)

    Default

    I's broken for me.

    Simba Code:
    writeln(inttostr(HPPercent));

    in gametab.scar:

    Code:
    Error: Out Of Range at line 615
    Simba Code:
    615:   if (Players[CurrentPlayer].Level[SKILL_HITPOINTS] < 1) then
    Last edited by bg5; 12-21-2011 at 09:46 PM.

  9. #9
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Have you called: NumberOfPlayers yet?
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  10. #10
    Join Date
    Oct 2011
    Posts
    805
    Mentioned
    21 Post(s)
    Quoted
    152 Post(s)

    Default

    I didn't. It works now ,thx

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
  •