Page 1 of 3 123 LastLast
Results 1 to 25 of 52

Thread: Request a Function/Procedure

  1. #1
    Join Date
    May 2007
    Location
    UK
    Posts
    4,007
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default Request a Function/Procedure

    So I will start up a little service where people can post a Function/Procedure that they want to know about and I will tell them about it and how to use it.

    <3
    -Boom

  2. #2
    Join Date
    Nov 2011
    Posts
    255
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Your answers should be compiled and added to the docs for functions that don't have an example with them (90% of them)

  3. #3
    Join Date
    Feb 2009
    Location
    inside Hello World! Application
    Posts
    232
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    One i dont understand are these :/

    Simba Code:
    GetTextat()
    GetTextatEx()
    GetTextatExWrap()
    GetTextATPA()

    No idea of any of these 0.0 i saw how they were used for;
    Simba Code:
    GetBlackChatMessage();

    Confuses my brain so can you like explain it so i can get text from Screen :/
    I'm not a lesser Being imma Lesser demon


    http://i.imgur.com/faGr0.png << First Script With Paint. Good First proggy? exp 21k/hr is ok pretty buggy

  4. #4
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Quote Originally Posted by bro433 View Post
    One i dont understand are these :/

    Confuses my brain so can you like explain it so i can get text from Screen :/
    Simba Code:
    GetTextAt(const atX, atY, minvspacing, maxvspacing, hspacing,color, tol, len: integer;const font: string): string;

    Reads text starting from X, Y.. min v spacing is the vertical spacing, hspacing is horizontal spacing. len = length of the text.. font = the font name such as:
    'Courier New'..

    As for GetTextAtEx.. it does the same thing except it finds text in a given box from X1, Y1, X2, Y2.. that way you don't need to specify the length of the text.. rest of parameters are the same as the above..

    Now for GetTextWrapper.. don't use it.. just ignore it.. its a wrapper for the functions above..

    GetBlackChatText is the system text that runescape displays in your chatbox.. such as stuff that happens in the game..

    Example: 'the box slowly opens...', 'You haven't received any messages to which you can reply.'.. 'your dueling ring has 7 charges left'..
    etc..

    For GetTextATPA.. same as the above functions except it reads text from a T2DPointArray. That's all of them I think.
    See here for other text functions I guess:
    http://docs.wizzup.org/simba/scriptref/ocr.html
    I am Ggzz..
    Hackintosher

  5. #5
    Join Date
    Feb 2009
    Location
    inside Hello World! Application
    Posts
    232
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by ggzz View Post
    Simba Code:
    GetTextAt(const atX, atY, minvspacing, maxvspacing, hspacing,color, tol, len: integer;const font: string): string;

    Reads text starting from X, Y.. min v spacing is the vertical spacing, hspacing is horizontal spacing. len = length of the text.. font = the font name such as:
    'Courier New'..

    As for GetTextAtEx.. it does the same thing except it finds text in a given box from X1, Y1, X2, Y2.. that way you don't need to specify the length of the text.. rest of parameters are the same as the above..

    Now for GetTextWrapper.. don't use it.. just ignore it.. its a wrapper for the functions above..

    GetBlackChatText is the system text that runescape displays in your chatbox.. such as stuff that happens in the game..

    Example: 'the box slowly opens...', 'You haven't received any messages to which you can reply.'.. 'your dueling ring has 7 charges left'..
    etc..

    For GetTextATPA.. same as the above functions except it reads text from a T2DPointArray. That's all of them I think.
    See here for other text functions I guess:
    http://docs.wizzup.org/simba/scriptref/ocr.html
    Ahhhh ok the Spacings are what made me get wierd texts like;

    " Bse$2 de$f"s*oe"

    instead of;

    "Grand Exchange"

    Makes sense thanks i'll try it again and see the outcome . I havent seen many people explain the spacings but i get it its the spacings for the Vert spacings and Horizontal spacings ^^
    I'm not a lesser Being imma Lesser demon


    http://i.imgur.com/faGr0.png << First Script With Paint. Good First proggy? exp 21k/hr is ok pretty buggy

  6. #6
    Join Date
    May 2007
    Location
    UK
    Posts
    4,007
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    I am so sorry, I don't even remember posting this thread xD
    Thanks ggzz <3

  7. #7
    Join Date
    Dec 2011
    Posts
    59
    Mentioned
    1 Post(s)
    Quoted
    11 Post(s)

    Default

    Please, I beg of you, help me. I'm looking for some documentation of an api or something which contains all the functions/procedures which are built into Simba. Some of these functions would be like the bank ones where DepositAll; would do what it suggests. Where could I find functions like these? Thanks

  8. #8
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Quote Originally Posted by Man16 View Post
    Please, I beg of you, help me. I'm looking for some documentation of an api or something which contains all the functions/procedures which are built into Simba. Some of these functions would be like the bank ones where DepositAll; would do what it suggests. Where could I find functions like these? Thanks


    See where the blue circle/oval/whatever is? Click there and start typing the name of a function and it will narrow everything down.. from there you can double click the narrowed down results and it will show you the documentation for the function.. if it doesn't, it's built into the simba.exe itself or a plugin and would require that you go here and look for it:
    http://wizzup.org/simbafpcdoc/index-8.html

    OR

    https://github.com/MerlijnWajer/Simba


    Another tip is that if you see someone using a function in a script you like, hold control button on the keyboard and click the function, it'll jump to the include or wherever the function's documentation is..
    I am Ggzz..
    Hackintosher

  9. #9
    Join Date
    May 2007
    Location
    UK
    Posts
    4,007
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    To add on to ggzz's post, simply try going to: C://Simba/Includes/SRL (As long as defaults are set)
    You will find all of the include files in there with the functions and procedures inside them.
    That is where you will learn the most.

    -Boom

  10. #10
    Join Date
    Oct 2011
    Location
    Australia, Vic
    Posts
    1,517
    Mentioned
    2 Post(s)
    Quoted
    120 Post(s)

    Default

    nvm
    Last edited by John; 01-16-2012 at 01:10 PM.

  11. #11
    Join Date
    Apr 2007
    Location
    Colchester, UK
    Posts
    1,220
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Evlin View Post
    could some one make me a that goes from edgy bank to the strong hold down inside the rock through the portal down the other ladder then walks through some doors to the flesh crawlers? I have tried myself with sps, radial walking and dtm walking i keep getting numerous errors if some one could do this for me and pm it to me, it would be extremely appreciated.
    I am working on the fighting area of my script and the banking area(banking is 80% done). If you have the time/knowledge then give it a go

    here are some pics of the location
    Location: Edgeville to Stronghold of Security.

    Stronghold of Security:



    Prayer: Not required.

    ~Evlin
    This is not a request thread its about asking what functions/procedures do.

  12. #12
    Join Date
    Oct 2011
    Posts
    805
    Mentioned
    21 Post(s)
    Quoted
    152 Post(s)

    Default

    Hello
    I don't get QuickTPASort
    Code:
    procedure QuickTPASort(var A: TIntegerArray; var B: TPointArray; iLo, iHi: Integer; SortUp: Boolean);
    What are iLo ,iHi parameters? What criteria it use for sort?

    Also I'm not sure if i understand InvertTPA. It just swap x and y in all TPoints?

    And third question: is there any function ,which removes duplicated points from TPA?

    edit:

    Last one - Whats the difference between SortATPAFromFirstPoint and SortATPAFrom ?
    Last edited by bg5; 01-18-2012 at 03:05 AM.

  13. #13
    Join Date
    Nov 2011
    Posts
    67
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Hi. first of all, Thank you for taking your time to help other people.

    I made this procedure

    Procedure ChopRoot;
    var x, y: integer;
    begin
    if FindObj(x, y, 'hop', 2380663, 35) then
    begin
    FindNormalRandoms;
    Mouse(x, y, 2, 2, true);
    ChooseOption('hop');
    if not FindObj(x, y, 'hop', 2446713, 35) then
    begin
    FindNormalRandoms;
    Mouse(x, y, 2, 2, true);
    ChooseOption('hop');
    end;
    end;
    end;

    According to what i think ive done, it shld chop one root, and if it doesnt find it, chop the other root...But it doesnt do that. it chops one root and then stops. Ik ive gone wrong somewhere, but Where?

    Sorry if im not supposed to post this question here.

    Thanks in advance! =]

  14. #14
    Join Date
    Jan 2012
    Posts
    522
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Okay so I have created this procedure :

    procedure WalkBank;
    begin
    FindNormalRandoms;
    SPS_Setup(RUNESCAPE_SURFACE,['12_8','12_7']);
    WriteLn('Inventory is full. Proceeding to bank.');
    WalkToBank := [Point(4965, 3205), Point(4983, 3184), Point(5003, 3154), Point(5008, 3119), Point(5005, 3076), Point(5004, 3033), Point(4987, 2991), Point(4979, 2956), Point(4954, 2937), Point(4909, 2935), Point(4873, 2941), Point(4855, 2934), Point(4853, 2974)];
    SPS_WalkPath(WalkToBank);
    WriteLn('We have arrived at the bank.');
    end;

    Whenever I compile the whole script itself this happens
    [Error] (38:1): Identifier expected at line 37
    Compiling failed.

    Still learning how to make a script. Just trying to compile the script before my first script is done =)

  15. #15
    Join Date
    Nov 2011
    Location
    Jozi, South Africa
    Posts
    249
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Smile Request a Function/Procedure

    You need to declare 'WalkToBank' as a TPointArray - either globally, or preferrably locally - ie in the procedure you use it.

    Simba Code:
    var
      WalkToBank:TpointArray;
    Ciao
    NM

  16. #16
    Join Date
    Jan 2012
    Posts
    522
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by NickMystre View Post
    You need to declare 'WalkToBank' as a TPointArray - either globally, or preferrably locally - ie in the procedure you use it.

    Simba Code:
    var
      WalkToBank:TpointArray;
    I put it at the top :

    {$DEFINE SMART}
    {$i srl/srl.simba}
    {$i sps/sps.simba}
    Var
    WalkToBank:TPointArray;
    WalkToMine:TPointArray;

    That is the position. DEFINE SMART is right under "Program"

  17. #17
    Join Date
    Nov 2011
    Location
    Jozi, South Africa
    Posts
    249
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Smile [Error] (38:1): Identifier expected at line 37

    Which line of code is no 37 ?
    Ciao
    NM

  18. #18
    Join Date
    Jan 2012
    Posts
    522
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I fixed it up but when I compile now a new tab in simba comes up with the title 'Sps' I know what it means but gives me this error in the Debug Box.

    [Error] C:\Simba\Includes\Sps/Sps.simba(136:34): Unknown identifier 'MMCX' at line 135
    Compiling failed.

  19. #19
    Join Date
    Nov 2011
    Location
    Jozi, South Africa
    Posts
    249
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    MMCX, which is defined in globals.simba, is the x-coordinate for the Minimap centre.

    globals.simba is loaded when you include srl.simba (I think)

    Can you post all the code you have so far ?
    Ciao
    NM

  20. #20
    Join Date
    Jan 2012
    Posts
    522
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    The code for my script itself?

    If so I can send it to you over MSN.

    Phyaskou@hotmail.com

  21. #21
    Join Date
    Nov 2011
    Location
    Jozi, South Africa
    Posts
    249
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Send it to me via PM (private message)

    You do this by left clicking my name (in my post), and choosing send private message
    Ciao
    NM

  22. #22
    Join Date
    Jan 2012
    Posts
    522
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Sent it. I hope you know how to fix this

  23. #23
    Join Date
    Nov 2011
    Location
    Jozi, South Africa
    Posts
    249
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yes, I've PM'd you the code.

    You will also need to declare or remove SIGNED. It's only referenced once. OK ?
    Last edited by NickMystre; 01-29-2012 at 04:52 AM.
    Ciao
    NM

  24. #24
    Join Date
    Jan 2012
    Posts
    522
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I took that out. THANK YOU SO MUCH!!
    It has finally compiled.
    Now for the final result....testing it out

  25. #25
    Join Date
    Nov 2011
    Location
    Jozi, South Africa
    Posts
    249
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Smile Request a Function/Procedure

    Instead of taking it out, I see that you miss-spelt SIGNED ...

    Simba Code:
    const
    {==========Smart Setup==========}
    World = 0; // Input the runescape world number right here for it to select. You may leave it as 0 if you would like it to select a random world.
    MEMBERS = False; // Select False if you are not a member. Select True if you are a member.
    SINGED = True;

    ... change it to SIGNED. As you need this and the other variables as well.

    Good luck!
    Ciao
    NM

Page 1 of 3 123 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
  •