Page 5 of 34 FirstFirst ... 3456715 ... LastLast
Results 101 to 125 of 827

Thread: AeroLib Include

  1. #101
    Join Date
    Mar 2013
    Posts
    1,010
    Mentioned
    35 Post(s)
    Quoted
    620 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    The whole include is slowing moving to the SRL-6 style; completely object-oriented. Here's an example of how to create (and use) a TMSObject:

    Simba Code:
    procedure TMSObject.create(_Name: string; _UpText: TStringArray; _InnerCols, _OuterCols: Array of TColEx);

    Simba Code:
    procedure openTheBank();
    var
      foundPoint    : TPoint;
      obj_BankBooth : TMSObject;
    begin                // Obj name        Uptext array             Array of TColEx (primary)       Array of TColEx (secondary)
      obj_BankBooth.create('BankBooth', ['ank B','nk bo','booth'], [createCol(540243, 3, 0.10, 1.07)], [createCol(3545, 10)]);

      if obj_BankBooth.find(foundPoint) then
        if openBankPoint(foundPoint, True) then
          writeln('We opened the bank!')
        else
          writeln('Failed to open the bank')
      else
        writeln('Failed to find the bank booth');
    end;

    I apologize as I realize this will cause some minor compile issues but clearly it's simple to fix.

    Edit:
    I need to write a bunch of tutorials, unfortunately the PrintScreen button doesn't work on my laptop so I'll have to come up with something else to take snapshots for graphic tutorials.
    Use something like Sharex or puush?
    #slack4admin2016
    <slacky> I will build a wall
    <slacky> I will ban reflection and OGL hooking until we know what the hell is going on

  2. #102
    Join Date
    Oct 2006
    Posts
    6,752
    Mentioned
    95 Post(s)
    Quoted
    532 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    ...
    logInPlayer(False); Doesn't work. It missclicks on the boxes and types both username and password in the username box.
    “The long-lived and those who will die soonest lose the same thing. The present is all that they can give up, since that is all you have, and what you do not have, you cannot lose.” - Marcus Aurelius

  3. #103
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    The whole include is slowing moving to the SRL-6 style; completely object-oriented. Here's an example of how to create (and use) a TMSObject:

    Simba Code:
    procedure TMSObject.create(_Name: string; _UpText: TStringArray; _InnerCols, _OuterCols: Array of TColEx);

    Simba Code:
    procedure openTheBank();
    var
      foundPoint    : TPoint;
      obj_BankBooth : TMSObject;
    begin                // Obj name        Uptext array             Array of TColEx (primary)       Array of TColEx (secondary)
      obj_BankBooth.create('BankBooth', ['ank B','nk bo','booth'], [createCol(540243, 3, 0.10, 1.07)], [createCol(3545, 10)]);

      if obj_BankBooth.find(foundPoint) then
        if openBankPoint(foundPoint, True) then
          writeln('We opened the bank!')
        else
          writeln('Failed to open the bank')
      else
        writeln('Failed to find the bank booth');
    end;

    I apologize as I realize this will cause some minor compile issues but clearly it's simple to fix.

    Edit:
    I need to write a bunch of tutorials, unfortunately the PrintScreen button doesn't work on my laptop so I'll have to come up with something else to take snapshots for graphic tutorials.
    you can use the snipping tool on your pc.

    ps: didRedClick is not working 100% of the time.

    edit: after debugging with bitmaps, i noticed that sometimes the red cross is behind an osbuddy layer this is why it wasnt working

  4. #104
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Quote Originally Posted by elfyyy View Post
    logInPlayer(False); Doesn't work. It missclicks on the boxes and types both username and password in the username box.
    Are you using SMART? I can't imagine the coordinates being off. I haven't ran SMART in well over a month, I'll have to use a throw away account and test the login procedures for SMART. Have you tried using "logInPlayer(True);"?

    Quote Originally Posted by hoodz View Post
    you can use the snipping tool on your pc.

    ps: didRedClick is not working 100% of the time.

    edit: after debugging with bitmaps, i noticed that sometimes the red cross is behind an osbuddy layer this is why it wasnt working
    Yes the include doesn't handle anything from that client. You'll have to play with the colors in "didClick" function in InputHandler.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  5. #105
    Join Date
    Mar 2013
    Posts
    1,010
    Mentioned
    35 Post(s)
    Quoted
    620 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    Are you using SMART? I can't imagine the coordinates being off. I haven't ran SMART in well over a month, I'll have to use a throw away account and test the login procedures for SMART. Have you tried using "logInPlayer(True);"?



    Yes the include doesn't handle anything from that client. You'll have to play with the colors in "didClick" function in InputHandler.
    If you want a throw away account, PM me.
    #slack4admin2016
    <slacky> I will build a wall
    <slacky> I will ban reflection and OGL hooking until we know what the hell is going on

  6. #106
    Join Date
    Jan 2012
    Posts
    1,596
    Mentioned
    78 Post(s)
    Quoted
    826 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    Simba Code:
    createCol(540243, 3, 0.10, 1.07)
    CTS3? Pfft. waste of time!

  7. #107
    Join Date
    Oct 2006
    Posts
    6,752
    Mentioned
    95 Post(s)
    Quoted
    532 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    Are you using SMART? I can't imagine the coordinates being off. I haven't ran SMART in well over a month, I'll have to use a throw away account and test the login procedures for SMART. Have you tried using "logInPlayer(True);"?
    Yeah that's with SMART. 'True' does work but it just takes so long to login that way lol.
    “The long-lived and those who will die soonest lose the same thing. The present is all that they can give up, since that is all you have, and what you do not have, you cannot lose.” - Marcus Aurelius

  8. #108
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    Are you using SMART? I can't imagine the coordinates being off. I haven't ran SMART in well over a month, I'll have to use a throw away account and test the login procedures for SMART. Have you tried using "logInPlayer(True);"?



    Yes the include doesn't handle anything from that client. You'll have to play with the colors in "didClick" function in InputHandler.
    yes i already fixed it

    agility script is close to running smooth

  9. #109
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Quote Originally Posted by elfyyy View Post
    Yeah that's with SMART. 'True' does work but it just takes so long to login that way lol.
    Ok, this should fix the login problem: Go to Login.simba (entities > player > Login) and line 373 I believe is the part that hits enter after typing in the username. Let's replace that with a simple mouseBox:

    Simba Code:
    mouseBox(pBox, MOUSE_LEFT);

    I thought there might be input problems between the browser and SMART but I just tested and they work fine, just in the login procedure is VK_ENTER not handled correctly by SMART. I'll send in the fixed file to GitHub now.


    Edit:
    Hoodz, I believe you'll find the GroundItems file very handy seeing as you have fighting scripts. I actually wrote this to aid combat-related scripts, I hope it helps.

    Edit2:
    Quote Originally Posted by Turpinator View Post
    CTS3? Pfft. waste of time!
    You misinterpreted the parameters of that function. The second parameter is the color tolerance (CTS0-CTS2), CTS3 isn't supported for TColEx right now.
    Last edited by Flight; 11-23-2014 at 06:59 PM.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  10. #110
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    Hoodz, I believe you'll find the GroundItems file very handy seeing as you have fighting scripts. I actually wrote this to aid combat-related scripts, I hope it helps.
    mmh okay ill implement that if people want it. now working on some other fancy scripts.

  11. #111
    Join Date
    Jan 2012
    Posts
    1,596
    Mentioned
    78 Post(s)
    Quoted
    826 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    Edit2:

    You misinterpreted the parameters of that function. The second parameter is the color tolerance (CTS0-CTS2), CTS3 isn't supported for TColEx right now.
    I probably did. so... CST0 = 1, CST1 = 2, and CTS2 = 3?


    Oh. just standard tolerance.

  12. #112
    Join Date
    Aug 2007
    Posts
    539
    Mentioned
    20 Post(s)
    Quoted
    266 Post(s)

    Default

    a few bugs,

    isInvFull (or getInvCount) returns 0 if in a deposit boxscreen

    depositAllFrom (or depositItem) tries to look for 'Deposit-All', when in deposit boxes, its 'Deposit All'.

  13. #113
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Quote Originally Posted by ineedbot View Post
    a few bugs,

    isInvFull (or getInvCount) returns 0 if in a deposit boxscreen

    depositAllFrom (or depositItem) tries to look for 'Deposit-All', when in deposit boxes, its 'Deposit All'.
    Alright, I didn't know the text would differ between bank screens and deposit boxes. Thanks a lot for letting me know, I'll fix that up and push it to GitHub.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  14. #114
    Join Date
    Feb 2013
    Location
    Rimmington
    Posts
    319
    Mentioned
    33 Post(s)
    Quoted
    183 Post(s)

    Default

    Hello again,

    Just wanted to see if there's a possibility to add this code into aeroLib?

    Reason:
    Hovering the skill to get the "start" experience/level is really stupid everytime we run scripts.

    Explained:
    It'll use getPage once, and then work out all the numbers for each variable(rank, level and experience). I didn't want to create a separate record for such a small function.

    Code:
    Simba Code:
    program Hiscore;
    {$i AeroLib/AeroLib.Simba}

    const
      HISCORE_RANK = 0;
      HISCORE_LEVEL = 1;
      HISCORE_XP = 2;

    function getHiscoreInfo(Username: String): T2DIntegerArray;
    var
      I, II: Integer;
      S, tS: String;
      sArr, skillArr: TStringArray;
    begin
      S := GetPage('http://services.runescape.com/m=hiscore_oldschool/hiscorepersonal.ws?user1=' + Username);
      skillArr := ['Attack', 'Defence', 'Strength', 'Hitpoints', 'Ranged', 'Prayer', 'Magic', 'Cooking', 'Woodcutting', 'Fletching', 'Fishing', 'Firemaking', 'Crafting', 'Smithing', 'Mining', 'Herblore', 'Agility', 'Thieving', 'Slayer', 'Farming', 'Runecraft', 'Hunter', 'Construction'];

      SetLength(Result, 3);
      For I:=0 to 2 do
        SetLength(Result[I], 23);

      For I:=SKILL_ATTACK to SKILL_CONSTRUCTION do
      begin
        If I = SKILL_CONSTRUCTION then
          tS := Between(skillArr[I], '</table>', S)
        else
          tS := Between(skillArr[I], '<img class', S);

        sArr := MultiBetween(tS, '="right">', '</td>');
        For II:=0 to 2 do
          Result[II][I] := StrToIntDef(GetNumbers(sArr[II]), -1);
      end;
    end;

    var
      CharInfo: T2DIntegerArray;

    begin
      initAL;
      CharInfo := getHiscoreInfo('vestfold');
      Writeln(CharInfo[HISCORE_LEVEL][SKILL_FIREMAKING]);
    end.





  15. #115
    Join Date
    Oct 2006
    Posts
    6,752
    Mentioned
    95 Post(s)
    Quoted
    532 Post(s)

    Default

    Made a pull request for a couple commits. Mousebox needs a wait or it fails to click sometimes and now smart will be automatically enable upon start of script. @Flight;
    “The long-lived and those who will die soonest lose the same thing. The present is all that they can give up, since that is all you have, and what you do not have, you cannot lose.” - Marcus Aurelius

  16. #116
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Quote Originally Posted by elfyyy View Post
    Made a pull request for a couple commits. Mousebox needs a wait or it fails to click sometimes and now smart will be automatically enable upon start of script. @Flight;
    I've already made the adjustments. I'm going to look into a possible bug with SEWalker before I push the small bug fixes. Thanks for pointing that out, Elfyyy.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  17. #117
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Ok Elfyyy, I pushed your fixes you told me about and I also revived the moderator detection via the chat screen. It should detected both P-Mods and J-Mods and, by default, log out if either are seen in the chat screen. This is optional, however, and can be changed at the beginning of the script.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  18. #118
    Join Date
    Mar 2013
    Posts
    1,010
    Mentioned
    35 Post(s)
    Quoted
    620 Post(s)

    Default


    You forgot to search for bank chests in openBankPoint()
    #slack4admin2016
    <slacky> I will build a wall
    <slacky> I will ban reflection and OGL hooking until we know what the hell is going on

  19. #119
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Quote Originally Posted by Harrier View Post

    You forgot to search for bank chests in openBankPoint()
    That's a wonderful issue to bring up. You're right, I absolutely forgot about bank chests. I'll add that in immediately and push it to GitHub. Also, thanks for the picture.

    Edit:
    I'm also going to fix a small issue with the bank symbol on the minimap. Apparently if the player has running enabled the include could detect this as a bank symbol.
    Last edited by Flight; 11-29-2014 at 01:32 PM.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  20. #120
    Join Date
    Feb 2013
    Location
    Rimmington
    Posts
    319
    Mentioned
    33 Post(s)
    Quoted
    183 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    Apparently if the player has running enabled the include could detect this as a bank symbol.
    What are the odds of this? haha..


    Flight, could you please make a global variable for updating the include by default directly from github when initAL is called?

    Simba Code:
    program new;
    {$i AeroLib/AeroLib.Simba}

    begin
      AL_ForceUpdate := True;
      initAL;
    end.

    Would be extremely helpful.





  21. #121
    Join Date
    Oct 2006
    Posts
    6,752
    Mentioned
    95 Post(s)
    Quoted
    532 Post(s)

    Default

    Quote Originally Posted by Fitta View Post
    What are the odds of this? haha..


    Flight, could you please make a global variable for updating the include by default directly from github when initAL is called?

    Simba Code:
    program new;
    {$i AeroLib/AeroLib.Simba}

    begin
      AL_ForceUpdate := True;
      initAL;
    end.

    Would be extremely helpful.
    Atm you really can't update through github with simba as simba can't resolve the https through github. It works for some computers but not for the rest.
    “The long-lived and those who will die soonest lose the same thing. The present is all that they can give up, since that is all you have, and what you do not have, you cannot lose.” - Marcus Aurelius

  22. #122
    Join Date
    Feb 2013
    Location
    Rimmington
    Posts
    319
    Mentioned
    33 Post(s)
    Quoted
    183 Post(s)

    Default

    Quote Originally Posted by elfyyy View Post
    Atm you really can't update through github with simba as simba can't resolve the https through github. It works for some computers but not for the rest.
    There must be a work-around?





  23. #123
    Join Date
    Oct 2006
    Posts
    6,752
    Mentioned
    95 Post(s)
    Quoted
    532 Post(s)

    Default

    Quote Originally Posted by Fitta View Post
    There must be a work-around?
    Not that I know of, @Olly; found a site that worked perfectly, but it saved a cached version from the first time you use it, which doesn't exactly help for making a updater!
    “The long-lived and those who will die soonest lose the same thing. The present is all that they can give up, since that is all you have, and what you do not have, you cannot lose.” - Marcus Aurelius

  24. #124
    Join Date
    Mar 2013
    Posts
    1,010
    Mentioned
    35 Post(s)
    Quoted
    620 Post(s)

    Default

    Quote Originally Posted by elfyyy View Post
    Not that I know of, @Olly; found a site that worked perfectly, but it saved a cached version from the first time you use it, which doesn't exactly help for making a updater!
    2 methods to get around it; make people download OpenSSL or setup a proxy/ask frement if we can use his proxy
    #slack4admin2016
    <slacky> I will build a wall
    <slacky> I will ban reflection and OGL hooking until we know what the hell is going on

  25. #125
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    Quote Originally Posted by Harrier View Post
    2 methods to get around it; make people download OpenSSL or setup a proxy/ask frement if we can use his proxy
    Well it's a public link, has no restrictions, 100% live, and the main reason why I made it.
    There used to be something meaningful here.

Page 5 of 34 FirstFirst ... 3456715 ... LastLast

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
  •