Results 1 to 8 of 8

Thread: how to implement eating?

  1. #1
    Join Date
    Jan 2012
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default how to implement eating?

    My eating procedures aren't working.
    Is it the HPPercent that is broken?
    Because the inventory spots haven't changed, and uptext is working fine?
    What are possible ways around it?
    Thanks
    -Ilya

  2. #2
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    So do you need help with eating procedure?
    Or help with making and eating function?

    You can check yourself if HP function is working by doing something like
    WriteLn(IntToStr(HPPercent));
    Not sure if that's the exact right way, but you should get the picture.

    As for earing, make a DTM of the food, search for it, and click it.
    Check you my YouTube channel YoHoJoSRL to see a video tutorial on how to make DTMs and use them.

  3. #3
    Join Date
    Jan 2012
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    i would love help with making an eating function here is roughly what i have now.

    procedure Hungry;
    var
    c, T, i, x, y: Integer;


    begin
    if (HPPercent < RandomRange(50, 70)) and LoggedIn then
    begin
    if not InvEmpty then
    for c := 0 to 2 do
    for i := 1 to 28 do
    if ExistsItem(i) then
    begin
    MMouseItem(i);
    GetMousePos(x, y);
    if WaitUptext('Eat', 100) then
    begin
    Mouse(x, y, 0, 0, false);
    if WaitOption('Eat', 100) then
    begin
    Writeln('Eating.')
    t := GetSystemTime;
    while ExistsItem(i) and ((GetSystemTime - t) < 2000) do
    wait(20);
    end;
    Exit;
    end;
    end;
    end;
    end;

  4. #4
    Join Date
    Jan 2012
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    Never mind, what i had was working, i had conflicting vars.
    Thanks tho!!

  5. #5
    Join Date
    Nov 2008
    Location
    Norway, Alesund
    Posts
    924
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    So do you need help with eating procedure?
    Or help with making and eating function?

    You can check yourself if HP function is working by doing something like
    WriteLn(IntToStr(HPPercent));
    Not sure if that's the exact right way, but you should get the picture.

    As for earing, make a DTM of the food, search for it, and click it.
    Check you my YouTube channel YoHoJoSRL to see a video tutorial on how to make DTMs and use them.
    I'm pretty sure not necesary to change var type if you printing only one var at line.

    WriteLn(IntToStr(HPPercent));
    AND this one
    WriteLn(HPPercent);

    should give same output (unleas you add)
    WriteLn(IntToStr(HPPercent) + 'something'); then it's probably gives back error

  6. #6
    Join Date
    Dec 2011
    Location
    Nj
    Posts
    2,341
    Mentioned
    1 Post(s)
    Quoted
    18 Post(s)

    Default

    Gwag you got it fixed
    ~Rez

    For the basics of the basics of pascal, try my TuT. ||Photoshop Editing ||MapleResourceDung Script || Book a flight! BuySellTrip

  7. #7
    Join Date
    Mar 2012
    Posts
    690
    Mentioned
    2 Post(s)
    Quoted
    40 Post(s)

    Default

    program new implements Eating;

    Nah kidding, but this is what I used in a old script, eats lobs at bank
    Simba Code:
    procedure Eat;
    var
      x, y, Tried: integer;
    begin
      if CurrentHP < EatAt then
      begin
        FindDTM(Lobster, X, Y, MSX1, MSY1, MSX2, MSY2);
        Mouse(X, Y, 7, 7, false);
        WaitOption('10', 1500);
        Wait(1000 + random(200));
        repeat
          FindDTM(Lobster, X, Y, MIX1, MIY1, MIX2, MIY2);
          Mouse(X, Y, 7, 7, false);
          WaitOption('at', 1500);
          Wait(1000 + random(200));
          Inc(Tried);
          Inc(lobstersEaten);
        until (CurrentHP = TotalHP) or (Tried > 10)

        if FindDTM(Lobster, X, Y, MIX1, MIY1, MIX2, MIY2)then
        begin
          Mouse(X, Y, 7, 7, false);
          WaitOption('ll', 1500);
          Wait(500 + random(200));
        end;
      end;
    end;

  8. #8
    Join Date
    Jan 2012
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    Well I also noticed that the HPPercent is messed up too. At 86 HP my account has 500+% HP, so I had to set eating at ~200.

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
  •