Results 1 to 10 of 10

Thread: Potting with dtms

  1. #1
    Join Date
    May 2012
    Posts
    44
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default Potting with dtms

    this is meant to be embedded into a fighter eventually, but this is what I have so far:

    Code:
    program New;
    {$DEFINE SMART}
    {$i srl/srl.simba}
    
    Const
      StrToPot = 27; //Enter Str level at which to pot
      Potdownlog = True;
      Sworld= 7;
    
    Procedure DeclarePlayers;
    begin
    
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
    
      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Active:=True;
    
    end;
    
    procedure PotUp;
    var potone, pottwo, potthree, potfour, x, y: integer;
    begin
      if StrToPot > 0 then
      begin;
    
      potone := DTMFromString('mbQAAAHicY2VgYGADYh4gZgdiXgYIEILS4kDMBcTcQLx1Sx2QZELDmIARCwYDAJ/KAl4=');
      pottwo := DTMFromString('mbQAAAHicY2VgYGADYh4gZgdiXgYIEILS4kDMBcTcQLx1Sx2QZELDmIARCwYDAJ/KAl4=');
      potthree := DTMFromString('mrAAAAHic42BgYOACYhYGCGAGYh4gFgZiISDmg4oxQ9UJALEgEPMCMQdUz+o15UCSCQ/GDxgJYBgAABXNAoM=');
      potfour := DTMFromstring('mwQAAAHic42RgYOAEYl4gFgRiASBmZ0AAViBmhooxQdWC1AgBMT8Qc0HVsQDxlk0WUFW4MRMDYcBIBIYDACfXAlo=');
      if GetSkillInfo('Strength', True) < (StrToPot+1) then
      begin
        writeln('Potting UP!');
      if ExistsItemDTM(potone, x, y) then
        begin
          writeln('...Found 1dose POT!');
          wait (500+random(500));
          mouse(x, y, 2, 2, true);
        end else
      if ExistsItemDTM(pottwo, x, y) then
        begin
          writeln('...Found 2dose POT!');
          wait (500+random(500));
          mouse(x, y, 2, 2, true);
        end else
      if ExistsItemDTM(potthree, x, y) then
        begin
          writeln('...Found 3dose POT!');
          wait (500+random(500));
          mouse(x, y, 2, 2, true);
        end else
      if ExistsItemDTM(potfour, x, y) then
        begin
          writeln('...Found 4dose POT!');
          wait (500+random(500));
          mouse(x, y, 2, 2, true);
        end else
          begin
            writeln('no pots!')
            if Potdownlog = True then
              begin
              writeln('LOGGING OUT!');
              logout;
              TerminateScript;
              end;
          end;
         end else
          begin
          wait(20000+random(5000));
          end;
         freedtm(Potone);
         freedtm(Pottwo);
         freedtm(Potthree);
         freedtm(Potfour);
    
       end;
      end;
    
    begin
      Smart_Server := SWorld;
      Smart_Members:= true;
      Smart_Signed := true;
      Smart_SuperDetail := false;
      SetUpSRL;
      ActivateClient;
      ClearDebug;
      DeclarePlayers;
      LoginPlayer;
      wait(5000 +random(600));
      while(true) do
      begin
      PotUp;
      end;
    end.
    This is my updated code. One problem is that no matter how many times I redo the DTM's, it always overlooks 1 dose pots in favor of 4 doses. Is there an easy fix for this?
    Last edited by shiningwhite; 05-17-2012 at 03:19 PM.
    "A child of five would understand this. Send someone to fetch a child of five."

  2. #2
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    When you say it wouldn't work, what was going wrong? Was it giving an error or just not doing anything?
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  3. #3
    Join Date
    May 2012
    Posts
    44
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    It loaded the client correctly, logged in, then instantly crashed. I added the wait function afterwards. Now it wont Log in at all.
    "A child of five would understand this. Send someone to fetch a child of five."

  4. #4
    Join Date
    May 2012
    Posts
    44
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Actually, i got it to work now.. My DTM's seem to be incorrect because it cant find any pots.
    "A child of five would understand this. Send someone to fetch a child of five."

  5. #5
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Ah OK. Checked out my guide if you're struggling to get the DTMs working for you. It's quite old, but still relevant.
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  6. #6
    Join Date
    May 2012
    Posts
    44
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    That's really helpful, thank you for all your help. NOW just to piggyback off a fighter script and test this thing out!
    "A child of five would understand this. Send someone to fetch a child of five."

  7. #7
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    No problem. The guide is actually for SCAR, but the concept is exactly the same. I might actually update my guides come to think of it...
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  8. #8
    Join Date
    May 2012
    Posts
    44
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    I can't seem to get it to consistently find some of my dtms.
    "A child of five would understand this. Send someone to fetch a child of five."

  9. #9
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Quote Originally Posted by shiningwhite View Post
    I can't seem to get it to consistently find some of my dtms.
    Then you need to make more accurate DTM's. I have some which I got from scripts that are years old - but they still work like a charm.

  10. #10
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Problem fixed over PM. Tolerance need to be raised.
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

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
  •