Results 1 to 8 of 8

Thread: Kodex's POH teletaber

  1. #1
    Join Date
    Jul 2015
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Post Kodex's POH teletaber

    a very basic poh teletab maker.
    >How To use
    1. be in poh
    2. have Demon already fetched clay 24 from bank
    3. stand with demon butler infront of teak eagle lectern
    4. have screen zoomed in all the way
    5. have "dont ask again" toggled on for paying demon butler
    6. start
    7. ???
    8. Profit

    [/LIST]


    >TODO
    • antiban
    • improve progress screen
    • add gui and support for other butlers


    Change log
    1.1; added random waits
    1.2; cleaned it up and fixed bugs with progress screen
    Attached Files Attached Files
    Last edited by kodex; 07-31-2015 at 05:37 AM.

  2. #2
    Join Date
    Jun 2014
    Posts
    463
    Mentioned
    27 Post(s)
    Quoted
    229 Post(s)

    Default

    Congratulations on your release! You should use [ SIMBA ] tags instead!

    You can also enable the format extension to format your script so it looks nicer.
    Tsunami

  3. #3
    Join Date
    Apr 2015
    Location
    FireFox
    Posts
    528
    Mentioned
    10 Post(s)
    Quoted
    227 Post(s)

    Default

    Quote Originally Posted by Lucidity View Post
    Congratulations on your release! You should use [ SIMBA ] tags instead!

    You can also enable the format extension to format your script so it looks nicer.
    All scripts deserve equality, no matter the length or indentation! Haha

    Congratz on the release, though I have one tiny tip for your wait times. Try using wait(randomRange(xxxx,xxxx) as humans never operate with the same reaction time over and over again.
    Scripting with ogLib

  4. #4
    Join Date
    Feb 2013
    Posts
    342
    Mentioned
    8 Post(s)
    Quoted
    110 Post(s)

    Default

    Nice release, did you get the progress screen fix from mine by any chance? It was needed!

  5. #5
    Join Date
    Sep 2012
    Location
    Australia.
    Posts
    839
    Mentioned
    16 Post(s)
    Quoted
    225 Post(s)

    Default

    Hey there Kodex, congratulations on getting your first script up .

    Firstly, to make it far easier for people to read, chuck your script in [ simba ][ /simba ] tags, then it'll look like so:

    Simba Code:
    program TeleTabber;
    {$DEFINE SMART}
    {$i srl-6/srl.simba}

    procedure changeAngleBoss();
    begin
      mainScreen.setAngle(MS_ANGLE_HIGH);
    end;

    procedure clickTree();
    var
      x, y: integer;
    begin
      if mainscreen.findObject(x, y, 10266538, 19, ['ecter'], MOUSE_RIGHT) then
      begin
        chooseOption.select(['Study']);
        if productionScreen.isOpen(5000) then
          productionScreen.clickStart()
      end;
    end;

    function TRSProgressScreen.__find(): boolean;  //Credit to Mayor for the poh progress screen fix
    override;
    const
      BORDER_COLOR = 5327681;
      BORDER_COLOR_BOTTOM = 5919042;
      BORDER_LENGTH = 232;

    var
      tpa: TPointArray;
      atpa: T2DPointArray;
      i, hh: integer;
      b: TBox;
      p: TPoint;
    begin
      if findColors(tpa, BORDER_COLOR, getClientBounds()) then
        atpa := tpa.cluster(1);
      if length(atpa) < 1 then
        exit(false);
      for i := 0 to high(atpa) do
        //writeLn('[' + toStr(i) + '] length: ' + toStr(length(atpa[i])));
        for i := 0 to high(atpa) do
          if (length(atpa[i]) = BORDER_LENGTH) then
          begin
            b := atpa[i].getBounds();
            //writeLn(toStr(getColor(b.x1 - 39, b.y1 + 101)) + ' | ' + toStr(getColor(b.x1 - 39, b.y1 + 102)));
            if (getColor(b.x1 - 39, b.y1 + 101) = BORDER_COLOR_BOTTOM) or (getColor(b.x1 - 39, b.y1 + 102) = BORDER_COLOR_BOTTOM) then
            begin
              self.setBounds([b.x1 - 54, b.y1 - 27, b.x2 + 56, b.y2 + 122]);
              exit(true);
            end;
          end;
    end;

    procedure getclay();
    begin
      repeat
        wait(5000);
      until (not progressScreen.isOpen());
    end

    procedure getmore();
    var
      x, y: integer;
    begin
      if mainscreen.findObject(x, y, 2039572, 10, ['utler'], MOUSE_RIGHT) then
      begin
        writeLn('We right clicked a tree!');
        chooseOption.select(['Fetch']);
        wait(2000);
        conversationBox.selectOption(1);
      end;
    end;

    begin
      clearDebug();
      setupSRL();
      changeAngleBoss();
      clickTree();
      getclay();
      getmore();
      wait(20000);
      repeat
        clickTree();
        getclay();
        getmore();
        wait(20000);
      until false;
    end.

    I've gone ahead and ran this through the built-in code parser in Simba (View -> Extensions -> Enable formatter.sex) and then Parser -> Format Script. Standards help you troubleshoot your own script when there are errors and to make it much easier to read and add on to. I recommend viewing this tutorial on standards.

    As said above, ensure your wait times are randomised within a certain range using wait(RandomRange());.

    I look forward to seeing your ability improve and I certainly look forward to seeing your contributions to this amazing community .

  6. #6
    Join Date
    Jul 2015
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by GetHyper View Post
    Nice release, did you get the progress screen fix from mine by any chance? It was needed!
    yeah i got it from your thread where you posted having the problem with progress screens in the POH.

  7. #7
    Join Date
    Sep 2006
    Posts
    95
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    Gz on release

  8. #8
    Join Date
    Feb 2012
    Location
    Florida
    Posts
    180
    Mentioned
    14 Post(s)
    Quoted
    101 Post(s)

    Default

    Congrats on release man! I'll be downloading and trying it in a little bit
    Like others have said try to work on your standards a bit because it's a little hard to read, you also want to name your procedures/functions to accurately match what they do.
    For example; you could change
    Simba Code:
    procedure clickTree();
    to something like
    Simba Code:
    procedure clickLectern();
    because that's what you're actually doing.
    Anyway keep up the good work.

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
  •