Results 1 to 12 of 12

Thread: Drink a prayer potion

  1. #1
    Join Date
    Mar 2007
    Posts
    5,125
    Mentioned
    275 Post(s)
    Quoted
    901 Post(s)

    Default Drink a prayer potion

    Hey
    What would be the best way for a script to drink a prayer potion dose (4),(3),(2),(1) in any order.

    If you could also provide me with an example that would be awesome

    Thanks

  2. #2
    Join Date
    Oct 2011
    Location
    Chicago
    Posts
    3,352
    Mentioned
    21 Post(s)
    Quoted
    437 Post(s)

    Default

    FindObjCustom(x, y, ['rink'], [(put colors here)], 10);
    Mouse(x, y, 5, 5, true);




    Anti-Leech Movement Prevent Leeching Spread the word
    Insanity 60 Days (Killer workout)
    XoL Blog (Workouts/RS/Misc)

  3. #3
    Join Date
    Mar 2007
    Posts
    5,125
    Mentioned
    275 Post(s)
    Quoted
    901 Post(s)

    Default

    Doesn't seem to work... Just idles

  4. #4
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Make a DTM of the potion and do this:
    Simba Code:
    procedure Example;
    var
      DTM_Name, X, Y : Integer;
    begin
      DTM_Name := DTMFromString('');

      if FindDTM(DTM_Name, X, Y, MIX1, MIY1, MIX2, MIY2) then
      begin
        FreeDTM(DTM_Name);
        MMouse(X, Y, 2, 2);
      end;

      FreeDTM(DTM_Name);
    end;

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

    Default

    I'd also make a DTM.
    Make it based on a (1) Dose potion, and make the parent point very low on the item (but still on the potion blue color itself) that way one dtm will work for all 4 doses.
    Video Tutorial I made about DTMs here:
    http://www.youtube.com/watch?v=SlS4q9MiFX4
    Picture/Text tutorial here:
    http://villavu.com/forum/showthread.php?t=564

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

    Default

    Quote Originally Posted by ~Justin View Post
    Doesn't seem to work... Just idles
    Findobj should work just fine assuming you picked good colors and add enough tolerance do it. Show us your findobj line please if you will.

  7. #7
    Join Date
    Mar 2007
    Posts
    5,125
    Mentioned
    275 Post(s)
    Quoted
    901 Post(s)

    Default

    Quote Originally Posted by RISK View Post
    Make a DTM of the potion and do this:
    Simba Code:
    procedure Example;
    var
      DTM_Name, X, Y : Integer;
    begin
      DTM_Name := DTMFromString('');

      if FindDTM(DTM_Name, X, Y, MIX1, MIY1, MIX2, MIY2) then
      begin
        FreeDTM(DTM_Name);
        MMouse(X, Y, 2, 2);
      end;

      FreeDTM(DTM_Name);
    end;

    Still unable to get it to work :S

    Code:
    procedure DrinkPrayerPotion;
    var
      DTM_Name, X, Y : Integer;
    
    
    begin
      PrayerPot := DTMFromString('78DA632C656160E86164400696FB7BC1344C9' +
        '4B112A8A617558DC5DE1E54357540357DA86ACCB7B5A1AA69C2B44BA' +
        'B3F0B554D2B504D17AA9A80EE725435A5986A2AB72EC65483E666060' +
        '626143500D6A61024');
    
      if FindDTM(PrayerPot, X, Y, MIX1, MIY1, MIX2, MIY2) then
      begin
      Mouse(X, Y, 2, 2, true);
      end;
    
      FreeDTM(PrayerPot);
    end;

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

    Default

    If that is not working, then you made your DTM incorrectly.

    Parent point should be where you want to click the object, and have a tolerance of about 30-50.
    All of the other points you make should be along the black outline of the item and all be the same color, and have 0 tolerance.

  9. #9
    Join Date
    Mar 2007
    Posts
    5,125
    Mentioned
    275 Post(s)
    Quoted
    901 Post(s)

    Default

    This is doing my head in..

    Code:
    Procedure CheckPrayer;
    Var
        xi, yi: integer;
    begin
         if(GetPrayerPoints < 503) then
         begin
         WriteLn('We are low in prayer... drinking a potion!');
        FindObj(x,y,'rink',7971378,20)
        Mouse(x, y, 3, 3, true);
    end
    end;
    mouse just hovers above the gameclient

  10. #10
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Add another ";" at the end of that second 'end'.

  11. #11
    Join Date
    Nov 2010
    Posts
    305
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Quote Originally Posted by ~Justin View Post
    This is doing my head in..

    Code:
    Procedure CheckPrayer;
    Var
        xi, yi: integer;
    begin
         if(GetPrayerPoints < 503) then
         begin
         WriteLn('We are low in prayer... drinking a potion!');
        FindObj(x,y,'rink',7971378,20)
        Mouse(x, y, 3, 3, true);
    end
    end;
    mouse just hovers above the gameclient
    You're sure you targeted Runescape?

  12. #12
    Join Date
    Mar 2007
    Posts
    5,125
    Mentioned
    275 Post(s)
    Quoted
    901 Post(s)

    Default

    Quote Originally Posted by Failure View Post
    You're sure you targeted Runescape?
    Im using SMART

    Quote Originally Posted by RISK View Post
    Add another ";" at the end of that second 'end'.
    Okay ill give that a shot

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
  •