Results 1 to 7 of 7

Thread: Brand new to scripting need help

  1. #1
    Join Date
    Nov 2007
    Posts
    127
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Brand new to scripting need help

    hey guys i was wondering if u could help me?

    im currently trying to make a humidify script and i just want to get the banking to work

    so far all its doing is saying its compiled but it doesnt even move the mouse

    did i do something wrong?

    heres the script

    Code:
    Program HUMIDIFY;
    
    {.include srl/srl/misc/Smart.scar}
    {.include SRL/SRL.scar}
    
    var x, y: integer;
    
    const
    Vialofwater = 12096398 ;
    
    
    procedure Bankall;
    begin
     MakeCompass('N')
     Wait (500 + random(200));
     OpenBankQuiet('vwb')
    
           If(FindColorTolerance(x, y, Vialofwater, MSX1, MSY1, MSX2, MSY2, 7))then
      begin
        Writeln('Found vials');
      end;
      If(not(FindColorTolerance(x, y, Vialofwater, MSX1, MSY1, MSX2, MSY2, 7)))then
      begin
        Writeln('Can not find vials :(');
        Terminatescript;
        end;
         begin
         Mouse(x, y, 4, 3, false);
         ChooseOption('All');
         end;
         CloseBank;
         Wait(150 + random (278));
         end;
    
    
       begin
       SetupSrl
       Bankall;
    
       end.
    thank you

  2. #2
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you need to add..

    SmartSetupEx(World, Members, Signed, Super Detail);
    SetTargetDC(SmartGetDC);

    before SetupSRL;


  3. #3
    Join Date
    Nov 2007
    Posts
    127
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

  4. #4
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    mhmm.

    I'd just comment out the {.include srl/srl/misc/smart.scar} for testing.. it's a lot easier to do it with firefox (testing) then to keep reloading smart

  5. #5
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Quote Originally Posted by 99_ View Post
    mhmm.

    I'd just comment out the {.include srl/srl/misc/smart.scar} for testing.. it's a lot easier to do it with firefox (testing) then to keep reloading smart
    You don't have to close SMART when you stop a script. You can keep it open in between runs, so it doesn't have to load up each time.

  6. #6
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default

    Code:
    If(not(FindColorTolerance(x, y, Vialofwater, MSX1, MSY1, MSX2, MSY2, 7)))then
      begin
        Writeln('Can not find vials :(');
        Terminatescript;
        end;
         begin
         Mouse(x, y, 4, 3, false);
         ChooseOption('All');
         end;
         CloseBank;
         Wait(150 + random (278));
         end;
    
    
       begin
       SetupSrl; //is the semicolon needed?  u left it out.
       Bankall;
    
       end.

    there is no need for this begin/end.

    also, i would add in a TPA to find the colorstolerance. since there can be many items in the bank that have similar colors to the vail, you could use this TPA + isuptext(); to find the correct item.
    Last edited by x[Warrior]x3500; 04-21-2009 at 11:43 AM.

  7. #7
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    semicolon isn't NEEDED.. but it should be there

    and senrath.. D:

    stop knowing everything :'(

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
  •