Results 1 to 9 of 9

Thread: Need some help with eating

  1. #1
    Join Date
    Jan 2012
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default Need some help with eating

    How can i add eating to my autofighter (07scape)
    Thank you for help!
    ...

  2. #2
    Join Date
    Feb 2013
    Location
    Narnia
    Posts
    615
    Mentioned
    8 Post(s)
    Quoted
    252 Post(s)

    Default

    is it OSR or P07, ive done both. You will need to do a combination of reading how many green pixels are left in your hp, pixel shift, and checking skills tab
    Last edited by Sk1nyNerd; 05-07-2013 at 04:47 PM.

    View my OSR Script Repository!


    Botted to max
    Guides: How to Report Bugs to the Scripter
    ~~~~ Moved to Java. Currently Lurking ~~~~

  3. #3
    Join Date
    Jan 2012
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Simba Code:
    do begin Name := ''; Pass := ''; Active := True; end; end; //More human like movement Procedure HumanMove; Begin case random(200) of 1..160: MMouse(RandomRange(X - 7, X + 7), RandomRange(y - 7, y + 7), 0, 0); 161..190: MMouse(RandomRange(X - 9, X + 9), RandomRange(y - 9, y + 9), 0, 0); 191..200: MMouse(RandomRange(X - 12, X + 12), RandomRange(y - 12, y + 12), 0, 0); End; End; procedure Antiban; begin case Random(100) of 1: HoverSkill('strenght', False); 2: HoverSkill('random', False); 3: Boredhuman; 4: Wait(2500 + random(4500)); 5: HoverSkill('attack', False); 6: PickUpMouse; 7: RandomMovement; 8: RandomRClick; end; end; procedure MiniBreaker; begin case Random(160) of 1: Wait(4000 + random(7400)); 2: Wait(2550 + random(8550)); 3: Wait(6004 + random(6759)); 4: Wait(2040 + random(2549)); end; end; procedure ClickGoblin; begin if (not LoggedIn) then begin LogInPlayer; MakeCompass('N'); KeyDown(VK_UP); Wait(RandomRange(1500, 2500)); KeyUp(VK_UP); end; repeat repeat wait(1200); until (FindColor(x, y, greenLifeBar, 206, 127, 298, 196) = false); if FindObjCustom(x, y, ['Goblin'], [goblinCOLOR1, goblinCOLOR2], 25) then begin x := x - 40; y := y - 40; if x < 0 then begin x := 0; end; if y < 0 then begin y := 0; end; end else begin KeyDown(VK_RIGHT); repeat Wait(RandomRange(50, 100)); until (FindObjCustom(x, y, ['Goblin'], [goblinCOLOR1, goblinCOLOR2], 5)) KeyUp(VK_RIGHT); end; if FindColor(x1, y1, greenLifeBar, x, y, x + 40, y + 40) = false then begin x := x + 40; y := y + 40; MMouse(x, y, 3, 3); Writeln('Goblins..Lets get experience!'); ClickMouse2(mouse_left); end else begin case Random(2) of 0: Antiban(); 1: MiniBreaker(); end; end; wait(2000); until (false) end; begin ClearDebug; SetupSRL; DeclarePlayer; ActivateClient; Wait(2000); ClickGoblin; end.]
    Last edited by Poppee; 05-07-2013 at 05:29 PM.
    ...

  4. #4
    Join Date
    Nov 2011
    Posts
    335
    Mentioned
    0 Post(s)
    Quoted
    68 Post(s)

    Default

    use a for...to...do loop for eating and check hp by finding hp bar color in a box that is ~in the middle of the MainScreen.

  5. #5
    Join Date
    Jan 2012
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Cant find any tutorial about loop eating
    ...

  6. #6
    Join Date
    Apr 2013
    Location
    England
    Posts
    223
    Mentioned
    2 Post(s)
    Quoted
    106 Post(s)

    Default

    another way you can do it is to get your hp from the skill tab (the top number) and say if that is below a certain value, then eat.

  7. #7
    Join Date
    Jan 2012
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Could u add some code here ? : D



    How do i add this to my script.. tried kinda many ways
    Simba Code:
    , [foodcolor1, foodcolor2, foodcolor3], 10, 50, MIX1, MIY1, MIX2, MIY2) THEN begin status := ' eating' MouseBox(X+3, Y+3, X+3, Y+3, mouse_left); sleep(1000+random(1000)) gametab(tab_stats) end else begin status := ' out of food, logging out after 20 seconds' TabDTM := DTMFromString('m1gAAAHic42JgYOAFYmkg5gJiESBmBWJ+BgSQhmKQOh4kvjRUXgKqlw2IRYE4KykJSDISxP8ZiAOETYJgBAAAz9MDgg=='); if FindDTM(TabDTM, x, y, MIX1, MIY1, MIX2, MIY2) then begin MouseBox(X+1, Y+1, X+1, Y+1, mouse_left); sleep(10000+random(4000)) logout; FreeDTM(TabDTM); terminatescript; end; end end end end;]
    Last edited by Poppee; 05-07-2013 at 05:57 PM.
    ...

  8. #8
    Join Date
    Apr 2013
    Location
    England
    Posts
    223
    Mentioned
    2 Post(s)
    Quoted
    106 Post(s)

    Default

    i think that was aimed at me ??? well here's a snippet of how i sometimes eat ...

    Code:
    procedure Eat;
    var
      hitpoints, xc, yc: Integer;
    begin
      gametab(tab_stats);
      MyDeBug('Started eat');
      hitpoints := getskillinfo('hp', True);
    
      if hitpoints < 10 then
      begin
        GetMeOutOfHere;
      end;
    
      if hitpoints < 30 then
      begin
        MyDeBug('hp below 30, time to eat');
        gametab(tab_inv);
        FindNormalRandoms;
        if FindDTM(foodDTM, xc, yc, MIX1, MIY1, MIX2, MIY2) then
        begin
          MyDeBug('found food so about to eat it!');
          MMouse(xc, yc, 2, 2);
          wait(randomrange(50,150));
          ClickMouse2(True);
          wait(randomrange(400,800));
        end else
        begin
          MyDeBug('no food! runnnnn');
          GetMeOutOfHere;
        end;
        gametab(tab_stats);
      end;
    
    end;
    foodDTM is set at the beginning when the user chooses which type of food they will be using

  9. #9
    Join Date
    Jan 2012
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Like this ?

    procedure EattheFood;
    begin
    HpPercenttoEat := round(55 * (PercenttoEat/100));
    if(EatFood = 1) then
    begin
    repeat
    if(CountColorTolerance(65280, 224, 80, 294, 150, 1) < HpPercenttoEat) then
    begin
    writeln(FloatToStr(CountColorTolerance(65280, 224, 114, 294, 150, 1)));
    DrawCustomPaint('Eating', IntToStr(competitionsplayedcount), FloatToStr(expgained), IntToStr(ticketsgained), IntToStr(ctw), TimeRunning, FloatToStr(expperhour));
    writeln('Your Hp is below ' + IntToStr(PercenttoEat) + ' percent! Looking for food...');
    Open_Inv_Tab;
    wait(randomrange(500,1450));
    if P07_FindObjEx(x, y, ['at', FoodName], [FoodColor1, FoodColor2], 5, 50, MIX1, MIY1, MIX2, MIY2) then
    begin
    writeln('Food found! Eating food...');
    MMouse(x,y,2,2);
    wait(randomrange(50,150));
    ClickMouse2(mouse_left);
    wait(randomrange(100,450));
    end
    else
    begin
    DrawCustomPaint('Food not found!', IntToStr(competitionsplayedcount), FloatToStr(expgained), IntToStr(ticketsgained), IntToStr(ctw), TimeRunning, FloatToStr(expperhour));
    writeln('Food not found!');
    FoodnotFound := FoodnotFound + 1;
    Exit;
    end;
    end
    else
    Exit;
    until(CountColorTolerance(65280, 224, 80, 294, 150, 1) > HpPercenttoEat);
    end;
    if(EatFood = 0) then
    Exit;
    end;
    ...

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
  •