Results 1 to 16 of 16

Thread: Is my script able to..

  1. #1
    Join Date
    May 2006
    Location
    Helsinki, Finland (capital)
    Posts
    269
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Is my script able to..

    .. look for the name of the item in ground, for example
    Code:
    if IsUpText('Take Party Hat') then
    Does that work, or does it mess it up, because the Party Hat is in different colour in the game?

    If you didnt understand, then just tell me

  2. #2
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    You can use part of the line. For example IsUpText('arty hat').

  3. #3
    Join Date
    May 2006
    Location
    Helsinki, Finland (capital)
    Posts
    269
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok, so the
    Code:
    if IsUpText('ron pickaxe') then
    would work?

  4. #4
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Yes, anything as long as it is unique to that item. You don't want IsUpText('axe') or something that all axes have in common.

  5. #5
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    Yes you can. Color is not an issue with IsUpText unless the background color is very similar to the color of the text (which is not very opten, the only example i can thing of is white text in the ess mining place since the background is also a very light color). Only then does SCAR have a hard time recognising the colors.
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


  6. #6
    Join Date
    May 2006
    Location
    Helsinki, Finland (capital)
    Posts
    269
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok, thanks alot guys!

  7. #7
    Join Date
    May 2006
    Location
    Helsinki, Finland (capital)
    Posts
    269
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    And sorry for the double post, but why this wont work?
    Code:
    program Test;
    {.include SRL\SRL.scar}
    begin
    FindPick;
    end.

  8. #8
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    {.include SRL/SRl/Skill/Mining.scar}
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


  9. #9
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    And because you need to tell it to do something.

    For example:

    SCAR Code:
    program Test;
    {.include SRL\SRL.scar}

    begin
      if (FindPick) then
        Writeln('Found Pick!');
    end.

  10. #10
    Join Date
    May 2006
    Location
    Helsinki, Finland (capital)
    Posts
    269
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yea i got that workin, but umm, im trying to make a script that finds gems and coins and stuff like that what bots drop. At the moment my script looks like this.
    Code:
    function FindPick: Boolean;
    var
      c, XH, YH, BR: Integer;
      ReequipPick: Boolean;
    begin
        Wait(2000 + Random(100));
        repeat
          if not (LoggedIn) then Exit;
          c := c + 1;
          x := Random(510) + 5;
          y := Random(330) + 5;
          if (FindColorSpiral(x, y, hc1, 3, 3, 515, 338)) or
            (FindColorSpiral(x, y, hc2, 3, 3, 515, 338)) or
            (FindColorSpiral(x, y, hc3, 3, 3, 515, 338)) or
            (FindColorSpiral(x, y, hc4, 3, 3, 515, 338)) or
            (FindColorSpiral(x, y, hc5, 3, 3, 515, 338)) then
          begin
            MMouse(x, y, 2, 2);
            if IsUpText('ncut') or (IsUpText('oins') or (IsUpText('iamond')
            or (IsUpText('apphire') or (IsUpText('uby') or (IsUpText('merald') then
            begin
              GetMousePos(x, y);
              Mouse(x, y, 0, 0, True);
            end;
            Flag;
            Wait(1000 + Random(100));
          end else
            if (PickUpItems) then
              ItemGrab;
      end;
    Ok, ok, I copied it from stupid3ooo's script, but isnt it legal? I wont be selling my script, or even sharing, I'd just use it myself. But yea, i get an error that says
    Code:
    Line 471: [Error] (17809:68): Close round expected in script C:\Documents and Settings\Johtaja\Desktop\SCAR3.01\includes\SRL\SRL\skill\Mining.scar
    and line 471 is the 19th line from the top of my script.

  11. #11
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Check that all opening brackets '(' have a closing bracket ')'. I can see that several of them are missing closed brackets.

  12. #12
    Join Date
    May 2006
    Location
    Helsinki, Finland (capital)
    Posts
    269
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh noes what a nub mistake Thanks ZephyrsFury

    And now the script says:
    MouseFlag(648, 84, 2, 2); <--- unknown identifier MouseFlag

    and how can that be possible? Mouse flag is a function

  13. #13
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    look in the srl include :P might the answer is in there


    you could use
    findobj for finding a pick(might)
    like this
    if FindObj(x, y, 'one',BoneColor, 50) then Mouse(x, y, 2, 1, True);
    one is from bone because B of bone is a captical letter in runscape so you can use this to for other items
    ~Hermen

  14. #14
    Join Date
    May 2006
    Location
    Helsinki, Finland (capital)
    Posts
    269
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by hermpie View Post
    look in the srl include :P might the answer is in there


    you could use
    findobj for finding a pick(might)
    like this
    if FindObj(x, y, 'one',BoneColor, 50) then Mouse(x, y, 2, 1, True);
    one is from bone because B of bone is a captical letter in runscape so you can use this to for other items
    Ok, so that searches the item from screen and reads the text at the upper left corner? So if i'd make the mouse go quickly, i might be able to use it, so it would just click those coordinates quickly? :P

  15. #15
    Join Date
    May 2007
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    MouseFlag Is A Function, therefore it returns true or false. u hafta do

    If MouseFlag(xxx,x,x) then;
    Begin;
    //rest of your script
    Originally Posted by YoHoJo
    I like hentai.

  16. #16
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by llamaman View Post
    MouseFlag Is A Function, therefore it returns true or false. u hafta do

    If MouseFlag(xxx,x,x) then;
    Begin;
    //rest of your script
    No you don't. You can just call MouseFlag on its own.

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
  •