Results 1 to 2 of 2

Thread: [OGL] Lobby

  1. #1
    Join Date
    Jan 2012
    Location
    East Coast
    Posts
    733
    Mentioned
    81 Post(s)
    Quoted
    364 Post(s)

    Default [OGL] Lobby

    @Justin requested a lobby include for OGL so I made one to input into scripts.
    The titles should be self explanatory but feel free to ask if it doesn't make sense! Let me know if I missed anything.


    Simba Code:
    program lobby;
    {$i ogLib\lib\core\core.simba}

    type tlobby = record
        __: boolean;
      end;

    function tlobby.hasLobby():boolean;
    begin
      result:=(not ogl.getTextures(35240).isEmpty());
    end;

    function tlobby.getTab(): integer;
    var
      tabs: glTextureArray;
      activeTab: glTexture;
      index: integer;
    begin
      if (self.hasLobby()) then
      begin
        tabs:=ogl.getTextures(235527);
        activeTab:=ogl.getTextures(569850)[0];
        for index:=0 to high(tabs) do
        begin
          if (tabs[index].toPoint().x > activeTab.toPoint().x) then
          begin
            result:= index-1;
            exit(result);
          end
          else
            result:=index;
        end;
      end;
      exit(result);
    end;

    function tlobby.setTab(tab: integer): boolean;
    begin
      if (self.hasLobby()) then
      begin
        mouse.click(ogl.getTextures(235527)[tab].toPoint().adjustPosition(random(-4, 25), random(-5, 5)));
        result:=true;
      end;
      exit(result);
    end;

    function tlobby.clickPlay(): boolean;
    begin
      if (self.hasLobby()) then
      begin
        mouse.click(ogl.getTextures(1331318)[0].toPoint().adjustPosition(random(-30, 30), random(-10, 10)));
        result:=true;
      end;
      exit(result);
    end;

    function tlobby.getWorld(): integer;
    var
      texture: glTexture;
      textureBox: TBox;
    begin
      if (self.hasLobby()) and (self.getTab() = 1) then
      begin
        texture:=ogl.getTextures(193824)[0];
        textureBox:=intToBox(texture.bounds.x1+135, texture.bounds.y1+10, texture.bounds.x2+180, texture.bounds.y2-30);
        result:=ogl.getChars(textureBox).toString().parseInt();
      end;
    end;

    function tlobby.clickWorld(worldToClick: integer): boolean;
    var
      index, world: integer;
      stars: glTextureArray;
      worldBox:TBox;
    begin
      if (self.hasLobby()) then
      begin
        if (not self.getTab() = 1) then
        begin
          self.setTab(1);
          wait(100);
        end;
        stars:= ogl.getTextures(13504);
        for index:=0 to high(stars) do
        begin
          worldBox:=intToBox(stars[index].bounds.x1, stars[index].bounds.y1, stars[index].bounds.x2+70, stars[index].bounds.y2);
          world:=ogl.getChars(worldBox).toString().parseInt();
          if (world = worldToClick) then
          begin
            mouse.click(middleBox(worldBox).adjustPosition(random(-10, 20), random(-2, 2)));
            result:= true;
          end;
        end;
      end;
      exit(result);
    end;

    begin
    ogl.setup();
    end.


    @Clarity and @Obscurity can alter these later for the official include.

  2. #2
    Join Date
    Jun 2012
    Posts
    586
    Mentioned
    112 Post(s)
    Quoted
    296 Post(s)

    Default

    Can't rep you again. Lol. Look forward to using this!




    Skype: obscuritySRL@outlook.com

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
  •