Page 2 of 2 FirstFirst 12
Results 26 to 46 of 46

Thread: I need some quick help

  1. #26
    Join Date
    Jul 2007
    Location
    St. Louis, Missouri, USA.
    Posts
    575
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Lol. It kinda was... and I forgot to tell you not to double post for bumpage. Just link somebody to your post and ask them to help you, or wait till someone stumbles across your thread. Most questions get answered here by our kind forums users.
    -You can call me Mick-



  2. #27
    Join Date
    Dec 2007
    Location
    Florida... it sucks.
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok, that helps a bunch, and sorry about double posting. For some reason, it goes back to the iron and withdraws 18 of it. Its finding the coal, because i wrote in:
    SCAR Code:
    if not FindDTM(Coal, x, y, 0, 0, 515, 334) then writeLn('Coal not found')
    And it doesn't say anything about coal not being found, and i tested it withe the game not up and it said "Coal not found"

  3. #28
    Join Date
    Feb 2007
    Location
    EST (US East Coast)
    Posts
    250
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Is your coal DTM good? It could be thinking that it found the coal, but it's really iron. Your script would be working fine then, all except the coal DTM.
    Temporarily inactive.

  4. #29
    Join Date
    Dec 2007
    Location
    Florida... it sucks.
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hmmm, it could be just that. Does DTM just measure the points that I give it? If so then its probably doing just that, because the coal is more right than the iron, and it looks from top left to bottom right, correct?

  5. #30
    Join Date
    Feb 2007
    Location
    EST (US East Coast)
    Posts
    250
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by AJ2VM View Post
    it looks from top left to bottom right
    FindDTM does, yes. I don't think there's a FindDTMSpiral, but if there was it would start from a different point. But that's not what you're trying to do.

    Quote Originally Posted by YoHoJo
    A DTM is a special point on the screen that SCAR recognizes by how far it is from certain points and colors
    From his tutorial located here. I would recommend checking this out if you're still having troubles with DTMs.

    Also to make sure your DTM is good, pick the DTM in the client then refresh the client. The colors should have all changed, so if your DTM is good you will still be able to find it and distinguish it from other objects of similar shapes (coal is similar to iron - this may be your problem).
    Temporarily inactive.

  6. #31
    Join Date
    Dec 2007
    Location
    Florida... it sucks.
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hmmm, ok, but couldn't I just use a bitmap, or is there a disadvantage to that?

  7. #32
    Join Date
    Jul 2007
    Location
    St. Louis, Missouri, USA.
    Posts
    575
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Bitmaps work. DTM's are faster, but for what you're doing bitmaps will work. Just don't set your tolerance too high, or it will still confuse the iron and coal.
    -You can call me Mick-



  8. #33
    Join Date
    Dec 2007
    Location
    Florida... it sucks.
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Alright, but i tried it, and it still wont find the coal... so this is what I've got with the DTM:
    SCAR Code:
    program Smelt;
    {.include SRL/SRL.scar}
    var
       x, y: Integer;
       a, b: Integer;
       Iron: Integer;
       Coal: Integer;

    begin
      SetupSRL;
      Iron := DTMFromString('78DA631462606010604001EEDA8A609A1188F' +
           'F0301A3349021CE800618914820AD00243809A8110512CC04D4B0' +
           '13610E13901024A0861B484810A14686801A2122D4F012F61700E' +
           'CAD05ED');
      if FindDTM(Iron, a, b, 0, 0, 515, 334) then
      begin
        Mouse(a, b, 3, 3, False);
        Wait(400+random(1000))
        if not ChooseOption('draw X') then writeln('Withdraw X not found.');
        Wait(500+Random(1000))
        TypeSend('9');
      end;
      Coal := DTMFromString('78DA6314606060E0634001FA7AF2609A1188F' +
           'F0301A32890C1C4800618914820CD43841A5620C141400DC80C5E' +
           '22D4881350230824A408A89104126204D480828293801A1920C14' +
           'A408D3490E027A0860B4848E3570300349E0606');
      if not FindDTM(Coal, x, y, 0, 0, 515, 334) then writeLn('Coal not found')
      begin
        Mouse(x, y, 3, 3, False);
        Wait(400+random(1000))
        if not ChooseOption('draw X') then writeln('Withdraw X not found.');
         Wait(500+random(1000))
         Typesend('18');
      end;
    End.

    However, its just not finding the coal.

  9. #34
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Congratz on members Ducles

  10. #35
    Join Date
    Jul 2007
    Posts
    1,431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I tested it, works fine for me

    SCAR Code:
    program Smelt;
    {.include SRL/SRL.scar}
    var
       x, y: Integer;
       Iron, Timeout: Integer;

    begin
      SetupSRL;
      wait(1000);
      Iron := DTMFromString('78DA635CC9C8C0B09F010578EB2931C80169A' +
           '00CC37F2060DC0E64ED6640038C4824905E0F649D20A066059075' +
           '92809AB940D671026A6600590709A89945D8CD0096310EA5');
      if FindDTM(Iron, x, y, 0, 0, 515, 334) then
      begin
        Mouse(x, y, 3, 3, False);
        Wait(200+random(200))
        if ChooseOption('draw X') then
        while not GetColor(217, 400) = 0 do
        begin
          wait(100);
          inc(Timeout);
          if Timeout = 30 then Break;
        end else writeln('not chooseopt draw X');
        wait(750 + random(250));
        TypeSend('10');
      end;
    end.

    btw...about slow mouse speed, you can ste mouse speed like this
    SCAR Code:
    mousespeed:=25
    Higher = faster, lower = slower
    [CENTER][SIZE="4"]Inactive[/SIZE]I forgot my password[/CENTER]

  11. #36
    Join Date
    Dec 2007
    Location
    Florida... it sucks.
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hmmmmm, I don't know what I did, but I completely rewrote it, and made new DTMs and it works fine now. Weird,eh?
    Negaal, I solved that problem long ago... its because I didn't setup SRL...

    Arg... more problems. I tried putting in OpenBank in the beginning to open up the bank, but when I try to compile it, it tells me:
    Failed when compiling
    Line 10: [Error] (14691:9): Invalid number of parameters in script C:\Program Files\SCAR 3.13\Scripts\Smelting.scar
    Here's where I put it:
    SCAR Code:
    program Smelt;
    {.include SRL/SRL.scar}
    var
       x, y: Integer;
       Iron: Integer;
       Coal: Integer;

    begin
      SetupSRL;
      OpenBank;
      Iron := DTMFromString('78DA63F466646078C68002FC0C55C1342394C' +
           'FE80764DD6440038CA86AC281ACBB04D44400598F08A80905B2DE' +
           '1050E30564BD26A0C61DC8FA4C408D0311765903598F09A821267' +
           'C5C80ACFBF8D50000F83A0DDA');
      if not FindDTM(Iron, x, y, 0, 0, 515, 334) then WriteLn('Iron not found');
      begin
      //rest of script...

  12. #37
    Join Date
    Jul 2007
    Posts
    1,431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You usually need to put string of bank loc between the('')

    function OpenBankQuiet(WhichBank: string): Boolean;
    By: WT-Fakawi and modified by Ron
    Description:
    Opens any given bank in the free world using
    FindDeformedBitmapToleranceIn. Avoids strange mouse movements. Will cause
    significant lag (approx. 1 second), but finds the bank with one click.

    Valid arguments are:
    'feb' (Falador East Bank)
    'fwb' (Falador West Bank)
    'veb' (Varrock East Bank)
    'vwb' (Varrock West Bank)
    'db' (Draynor Bank)
    'eb' (Edgeville Bank)
    'akb' (Al-Kharid Bank)


    function FindBank(TheBank: String): Boolean;
    By: WT-Fakawi and modified by Ron
    Description:
    Finds and opens any given bank in the free world. If symbolcolor
    is in minimap it will walk to the bank and open it!
    Valid arguments are:
    'feb' (Falador East Bank)
    'fwb' (Falador West Bank)
    'veb' (Varrock East Bank)
    'vwb' (Varrock West Bank)
    'db' (Draynor Bank)
    'akb' (Al-Kharid Bank)

    function OpenBankFast(Location: String): Boolean;
    By: Wizzup? and Nielsie95
    Description:
    Opens the bank.
    Valid arguments are:
    'akb', 'al kharid', 'lb', 'lumbridge', 'veb', 'varrock east', 'vwb',
    'varrock west', 'feb', 'falador east', 'fwb', 'falador west', 'db', 'draynor',
    'eb', 'edgeville bank'

    function OpenBank(WhichBank: String, ChangeCompass, ChangeAngle: Boolean): Boolean;
    By: SRL Development Team
    Description:
    Opens the bank if possible.
    Valid arguments are:
    'feb' (Falador East Bank)
    'fwb' (Falador West Bank)
    'veb' (Varrock East Bank)
    'vwb' (Varrock West Bank)
    'db' (Draynor Bank)
    'akb' (Al-Kharid Bank)
    'lb' (Lumbridge Bank)

    EDIT: Sorry i didn't saw page 2...lol

    Example:
    SCAR Code:
    FindBank('fwb');
    It clicks on bank on minimap and opens it
    [CENTER][SIZE="4"]Inactive[/SIZE]I forgot my password[/CENTER]

  13. #38
    Join Date
    Dec 2007
    Location
    Florida... it sucks.
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok, so I used OpenBankFast this time, and put in
    SCAR Code:
    OpenBankFast(feb);
    and its telling me
    Failed when compiling
    Line 10: [Error] (14691:14): Unknown identifier 'feb' in script C:\Program Files\SCAR 3.13\Scripts\Smelting.scar
    Ok, so I got it to work with OpenBankQuiet, and it was giving me the above error because I didn't set it as a variable. But anyways, OpenBankQuiet causes too much of a lag, so I tried the others, with no luck. I set up the OpenBank with:
    SCAR Code:
    OpenBank(feb, false, false)
    Then, it tells me that it is an unknown bank when I run it. Did I set it up wrong?

  14. #39
    Join Date
    Feb 2007
    Location
    EST (US East Coast)
    Posts
    250
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    function OpenBankFast(Location: String): Boolean;

    Location is a string. Put 'feb' instead of just feb.

    You're getting an error for the same reason with OpenBank.
    Temporarily inactive.

  15. #40
    Join Date
    Dec 2007
    Location
    Florida... it sucks.
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok, that helps... but it yet again creates another problem. It now can't find the Iron or coal, and it was perfectly before... Heres what I've got:
    SCAR Code:
    program Smelt;
    {.include SRL/SRL.scar}
    var
       x, y: Integer;
       Iron: Integer;
       Coal: Integer;
       feb:  String;

    begin
      SetupSRL;
      OpenBankFast('feb');
      Iron := DTMFromString('78DA63F466646078C68002FC0C55C1342394C' +
           'FE80764DD6440038CA86AC281ACBB04D44400598F08A80905B2DE' +
           '1050E30564BD26A0C61DC8FA4C408D0311765903598F09A821267' +
           'C5C80ACFBF8D50000F83A0DDA');
      if not FindDTM(Iron, x, y, 0, 0, 515, 334) then WriteLn('Iron not found');
      begin
        Mouse(x, y, 3, 3, False);
        Wait(400+random(1000))
        if ChooseOption('draw X') then
        begin
         Wait(600 + Random(1000));
         TypeSend('9');
        end else WriteLn('Withdraw X not found');
      end;
      Coal := DTMFromString('78DA63AC64646078C28002CCCC54C1342394C' +
           'F580B64DD6440038CA86A3281ACA704D4140259F709A86907B2EE' +
           '1150D306643D26A0A619C87A45400DC8EFEF09A82922424D3990F' +
           '59988F0794D404D0E90F500BF1A00C8581120');
      if not FindDTM(Coal, x, y, 0, 0, 515, 334) then writeLn('Coal not found')
      begin
        Mouse(x, y, 3, 3, False);
        Wait(400+random(1000))
        if ChooseOption('draw X') then
        begin
         Wait(600 + Random(1000));
         TypeSend('18');
        end else WriteLn('Withdraw X not found');
      end;
    end.

    Basically, it opens the bank, then all the failsafes go off, like it can't find anything.
    Nvm.. the DTMs are bad again. Do they change every time you log in and out or something??
    Any way that I can fix it?? Because i dont feel like making new DTMs every time I run it....

  16. #41
    Join Date
    Feb 2007
    Location
    EST (US East Coast)
    Posts
    250
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by AJ2VM View Post
    Basically, it opens the bank, then all the failsafes go off, like it can't find anything.
    This could be because you have no waits after your OpenBankFast. I recommend a FFlag(0); and then small wait before checking, since the bank won't necessarily open instantly.

    Quote Originally Posted by AJ2VM View Post
    Nvm.. the DTMs are bad again. Do they change every time you log in and out or something??
    Any way that I can fix it?? Because i dont feel like making new DTMs every time I run it....
    The DTMs don't change nor do the shapes of the items, but the colors do, which is one of the things a DTM is comprised of. You can fix it by adding tolerance (or more tolerance if you already have some) to your DTM. This is done in the DTM creation screen. Select the point and you can edit the tolerance of that point.
    Temporarily inactive.

  17. #42
    Join Date
    Dec 2007
    Location
    Florida... it sucks.
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Arg... well whenever I raise the tolerance... it goes to the iron twice... maybe the two colors I picked are too alike? I tried to pick two totally different colors, I guess ill have to choose other ones, or is there another way to do this??

  18. #43
    Join Date
    Jul 2007
    Location
    St. Louis, Missouri, USA.
    Posts
    575
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    An "if IsUpText('ron') then" will stop you from withdrawing the incorrect item, but as to finding the right item after identifying the wrong would.. It'll be tough. Try using bitmaps instead of DTM's and do a low tolerance for the FindBitmapToleranceIn. Thats all I can think of right now.
    -You can call me Mick-



  19. #44
    Join Date
    Dec 2007
    Location
    Florida... it sucks.
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I tried this:
    SCAR Code:
    begin
        Wait(1000+random(1000))
        Withdraw(5,8,18)
      end;
    Instead of using the Coal DTM and stuff, but it seems as though it doesn't, work... i stuck it in it's own script and it just goes below the bank, sits there, and stops.
    I also tried your idea with the "if IsUpText('ron') then" however, I realized that the command "Mouse(x, y, 3, 3, False);" clicks as well, so i can't put it between putting the mouse at (x, y) and right clicking the coal, which takes away the text up top.

  20. #45
    Join Date
    Feb 2007
    Location
    EST (US East Coast)
    Posts
    250
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by AJ2VM View Post
    I also tried your idea with the "if IsUpText('ron') then" however, I realized that the command "Mouse(x, y, 3, 3, False);" clicks as well, so i can't put it between putting the mouse at (x, y) and right clicking the coal, which takes away the text up top.
    Are you saying you can't check the uptext because the mouse is clicking? If so, use a MMouse instead of Mouse. MMouse is the same as Mouse except it doesn't click. The parameters are also the same except for the end boolean on Mouse which tells you left or right click. You just drop that altogether.

    SCAR Code:
    MMouse(x, y, rx, ry : Integer);

    And I think my Coal DTM in my smelting script works... If you want you can use it. Just download the script, I made DTMs for a bunch of ores and bars (unnecessarily, but I didn't know it at the time :P).
    Temporarily inactive.

  21. #46
    Join Date
    Dec 2007
    Location
    Florida... it sucks.
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Coal := DTMFromString('78DA632C67646078C48002E4E544187E0169A' +
           '00CC37F20606C05B2EE30A00146241248D701593709A8C903B2EE' +
           '13509305643D21A02613C87A45404D0E90F58E809A6220EB35116' +
           'A3E1350534584394D40D65B026A5A80AC6704D4B403590FF0AB01' +
           '003CDE173D');
      if not FindDTM(Coal, x, y, 0, 0, 515, 334) then writeLn('Coal not found')
      begin
        MMouse(x, y, 3, 3);
        Wait(400+random(300))
        if IsUpText('oal') then
        begin
         Mouse(x,y, 3, 3, False);
        end else WriteLn('Coal not found in bank');
        if ChooseOption('draw X') then
        begin
         Wait(600 + Random(1000));
         TypeSend('18');
        end else WriteLn('Withdraw X not found');
      end;
    end.
    Like that? Wow, your DTMs are pretty nice, they work fine with out the "if IsUpText('oal') then" but with it, it just says "Coal not found in bank".

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Just a quick question? Did I say quick?
    By SeanJohn in forum OSR Help
    Replies: 3
    Last Post: 01-28-2009, 12:03 AM
  2. I need some quick help
    By Timothegreat in forum OSR Help
    Replies: 6
    Last Post: 05-30-2007, 09:33 PM
  3. quick ? plz
    By rjbk1989 in forum OSR Help
    Replies: 3
    Last Post: 05-07-2007, 12:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •