Results 1 to 7 of 7

Thread: Eating function..

  1. #1
    Join Date
    Feb 2012
    Posts
    168
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Eating function..

    Simba Code:
    function Eating:Boolean;
    var
      x,y,Shark:Integer;
    begin
      Shark := DTMFromString('mggAAAHicY2NgYChnYmDIBeJ6IG4F4jogLgViH0YGhhAgjgTiaCD2BWI3IA6y02Xg5eFhiHUzZnA0VGHoK45jyAx1Y+AHmoUNM+LAEAAARuYJ7A==');
      if HPPercent < 25 then
        while HPPercent < 75 do
          begin
            writeln('Need to eat');
            GameTab(25);
            if FindDTM(Shark, x, y,MIX1,MIY2,MIX2,MIY2) then
            begin
              writeln('Found Shark');
              Mouse(x,y,3,3,True);
              Result := True;
            end
            else begin
              LogOut;
              TerminateScript
            end;
          end;
      FreeDTM(Shark);
    end;

    For some reason, this never eats. The DTM has enough matches when I use it on the DTM editor, so I'm really puzzled.

  2. #2
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    Do the lines "Need to eat" and "Found shark" come in debug?
    Current Project: Retired

  3. #3
    Join Date
    Mar 2012
    Location
    Over there
    Posts
    840
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    Simba Code:
    FindDTM(Shark, x, y,MIX1,MIY1,MIX2,MIY2)

    You have it wrong in your procedure, you have Y2 as your Y1.

  4. #4
    Join Date
    Feb 2012
    Location
    SRL Jail
    Posts
    1,319
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Simba Code:
    GameTab(25);
    whats this? the proper gametab clicker would be
    Simba Code:
    (GameTab_Inv or GameTab_Magic);

  5. #5
    Join Date
    Feb 2012
    Posts
    168
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by TotalKillz View Post
    Simba Code:
    FindDTM(Shark, x, y,MIX1,MIY1,MIX2,MIY2)

    You have it wrong in your procedure, you have Y2 as your Y1.
    Ohhh, stupid typos :/

    Quote Originally Posted by JOEbot View Post
    Simba Code:
    GameTab(25);
    whats this? the proper gametab clicker would be
    Simba Code:
    (GameTab_Inv or GameTab_Magic);
    GameTab(25); is equivalent to Gametab(Tab_Inv);

    Constants are better though I guess...

  6. #6
    Join Date
    Feb 2012
    Location
    SRL Jail
    Posts
    1,319
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Imagine View Post
    GameTab(25); is equivalent to Gametab(Tab_Inv);

    Constants are better though I guess...
    Whatever floats your boat... It might be easier to read with Inv instead of 25 though

  7. #7
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by JOEbot View Post
    Whatever floats your boat... It might be easier to read with Inv instead of 25 though
    Also if there is an update that needs to change the numbers, your script will break if you haven't used constants

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
  •