Results 1 to 6 of 6

Thread: Help =D

  1. #1
    Join Date
    Apr 2013
    Posts
    680
    Mentioned
    13 Post(s)
    Quoted
    341 Post(s)

    Default Help =D

    Could someone please help or point me in the right direction as too how i extract information from portals in the pest control mini-game

    Code:
    {$DEFINE SMART}
    {$i Reflection/Reflection.Simba}
    
    procedure debugit;
    var
      ParentWidget, ChildWidget: TReflectWidget;
      I, J, S, ChildWidth: Integer;
    
    begin
      Reflect.Setup;
      for I := 0 to 1000 do
        for J := 0 to 1000 do
        begin
          if (not ParentWidget.Exists(I, J)) then
            Continue;
          ParentWidget.GetWidget(I, J);
          if (not ParentWidget.HasChild) then
          begin
            Writeln('Parent => ' + ToStr(I) + ', ' + 'Child => ' + ToStR(J) + ' => ' + 'Text => ' + ParentWidget.GetText);
            ParentWidget.Free;
            Continue;
          end;
          ChildWidth := Reflect.Smart.GetArraySize(ParentWidget.Reference, Widget_Children, 0);
          for S := 0 to ChildWidth do
          begin
            ChildWidget.GetChild(ParentWidget, S);
            Writeln('Parent => ' + ToStr(I) + ', ' + 'Child => ' + ToStR(J) + ' => ' + ' ChildWidget => ' + ToStr(S) + ' => ' + 'Text => ' + ChildWidget.GetText);
            ChildWidget.Free;
          end;
          ParentWidget.Free;
        end;
    end;
    
    begin
    
    debugit;
    wait(1000);
    
    end
    I have used the debug; but it only outputs - > Parent => 162, Child => 43 => ChildWidget => 0 => Text => The yellow, south-eastern portal shield has dropped!

    Which is in regards to text.

    I was wondering if health and portal (shield) status could be extracted?

    <------------------>



  2. #2
    Join Date
    Dec 2007
    Posts
    2,112
    Mentioned
    71 Post(s)
    Quoted
    580 Post(s)

    Default

    Main screen objects aren't widgets. Dreambot has a nice reflection debugger. Also, https://villavu.com/forum/showthread.php?t=112438 seems okay.

  3. #3
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,011
    Mentioned
    50 Post(s)
    Quoted
    505 Post(s)

    Default

    Quote Originally Posted by Kasi View Post
    Main screen objects aren't widgets. Dreambot has a nice reflection debugger. Also, https://villavu.com/forum/showthread.php?t=112438 seems okay.
    I think he's talking about the portal status info that shows up in the top right of your mainscreen while you're in the minigame. I don't think that's a mainscreen object?

    This:
    Last edited by Citrus; 03-19-2017 at 01:58 PM.

  4. #4
    Join Date
    Apr 2013
    Posts
    680
    Mentioned
    13 Post(s)
    Quoted
    341 Post(s)

    Default

    Quote Originally Posted by Kasi View Post
    Main screen objects aren't widgets. Dreambot has a nice reflection debugger. Also, https://villavu.com/forum/showthread.php?t=112438 seems okay.
    I am aware of ineedbot debugger. Somebody suggested it was possible.

    I may have a look at dreambot.

    <------------------>



  5. #5
    Join Date
    Jun 2013
    Location
    Scranton
    Posts
    496
    Mentioned
    5 Post(s)
    Quoted
    220 Post(s)

    Default

    Quote Originally Posted by AFools View Post
    I am aware of ineedbot debugger. Somebody suggested it was possible.

    I may have a look at dreambot.
    this is ripped from kristi's pc script.
    Simba Code:
    function TPortal.getHealth : Integer;
    var
      PortalHealth : TReflectWidget;
    begin
      if Length(Portals) = 0 then
        Exit;
      PortalHealth.GetWidget(408, Self.WidgetChild);
      if (PortalHealth.GetText = '') then
        Exit;
      Result := StrtoInt(PortalHealth.GetText());
      Self.Health := Result;
      PortalHealth.Free();
    end;
    You should be able to figure it out by searching for container index of 408 in widget debugger results and seeing which child values correspond to the portal health(s)

    e; Just by looking at the script it looks like the child widgets are 14, 15, 16 and 17

  6. #6
    Join Date
    Dec 2007
    Posts
    2,112
    Mentioned
    71 Post(s)
    Quoted
    580 Post(s)

    Default

    Quote Originally Posted by Citrus View Post
    I think he's talking about the portal status info that shows up in the top right of your mainscreen while you're in the minigame. I don't think that's a mainscreen object?

    This:
    ah yeah, those look like widgets, never played Pest Control.

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
  •