Results 1 to 4 of 4

Thread: I have 2 quick questions

  1. #1
    Join Date
    Mar 2007
    Location
    Mars, I thought all men were from Mars.
    Posts
    513
    Mentioned
    7 Post(s)
    Quoted
    124 Post(s)

    Default I have 2 quick questions

    1. How do I edit a script and restart it w/o having to reload the smart client every time?
    2. On the function Mouse(x,y,Ranx,Rany,true), the ranx and rany, whatdoes the numbers do? What I mean is if I enter 10 for the value, does it do this...

    <--20--15--10--05--00--05--10---15--20-->

    or this...

    <--20--15--10--05--00--05--10---15--20-->?

    I'm new to this whole smart thing. I used to bot with paid bots, but as they are now down, I'm coming back to scripting. Well I made a bunch of scripts I been using with an old stable ver of scar (3.13). Well as I'm sick of not being able to use my script and my computer at the same time. I finally decided to invest some time into learning how to use SMART. I never really used Simba that much b4 because I had problems getting it to work properly. Scripts I made in SCAR that worked, wouldn't work in Simba. I gave up after only a few hours because I had the paid bots then, "why learn something I don't need?" is what I told myself. Well now I need it.

    Here is the first script I'm converting to use with srl and simba. The one below is the working one I been using with SCAR for a month without problems.

    This one don't work. Mostly I think the mouse cords are off. That or the random move number is too high on mouse(111,222,10,10,true)

    Simba Code:
    {/////////////////////Set_Up///////////////////////////


    SoulWars Bank, North, all the way up.
    Fixed screen
    Logs, row 2 slot 10


    //////////////////////////////////////////////////////}


    program new;
    {$DEFINE SMART}
    {$i srl/srl.scar}
    var x,y:integer;
    /////////////////////////////////////////////////////


    Procedure Open_Bank;
    begin

    repeat
      MMouse(259, 137,20,20)
      sleep(200+random(100))
    until(FindColorSpiralTolerance(x,y,14606081, 42, 8, 67, 24, 20))
    or(FindColorSpiralTolerance(x,y,13027588, 42, 8, 67, 24, 20))
    if(FindColorSpiralTolerance(x,y,14606081, 42, 8, 67, 24, 25))
      or(FindColorSpiralTolerance(x,y,13027588, 42, 8, 67, 24, 20))then
      begin
      getmousepos(x,y)
      Mouse(x,y,0,0,true)
      sleep(200+random(500))
        repeat
        sleep(100+random(200))
        until(FindColorSpiralTolerance(x,y,4106994, 193, 27, 226, 36, 20))
      end;
    end;

    procedure Deposit_Stuff;
    begin
    if(FindColorSpiralTolerance(x,y,4106994, 193, 27, 226, 36, 20))then
      begin

      mouse(578, 263,6,6,false)
      sleep(300+random(300))
        begin
        mouse(x, y,5,5,true)
        sleep(500+random(500))
        end;
      end;
    end;

    procedure Withdraw_Stuff;
    begin
    if(FindColorSpiralTolerance(x,y,4106994, 193, 27, 226, 36, 10))then
      begin
    //get Logs, row 2 slot 10; Suppy tab
      mouse(448,151,5,5,false)
      sleep(500+random(200))
      mouse(x,y+76,6,4,true)
      sleep(500+random(200))

    //Close Bank
      mouse(488,35,6,6,true)
      sleep(1000+random(500))
      end;
    end;

    procedure Fletch;
    begin
      mouse(578, 230,5,5,true)
      sleep(300+random(100))
      mouse(578,264,5,5,true)
      sleep(500+random(500))
      mouse(257,442,20,10,true)
      sleep(9000+random(1000))
    end;


    begin
      ClearDebug();
      SetupSRL();

      repeat
        Open_Bank;
        Deposit_Stuff;
        Withdraw_Stuff;
        Fletch;
        sleep(39000+random(1000))
      until(false)
    end.

    This one works with SCAR
    SCAR Code:
    {/////////////////////////Set_Up//////////////////////////////


    SoulWars Bank, North, all the way up.
    Fixed screen
    Logs, row 2 slot 10


    ////////////////////////////////////////////////////////////}





    program New;
    var x,y:integer;

    Procedure Open_Bank;
    begin

    repeat
      MoveMouseSmoothEX(259+10-random(20), 137+10-random(20),1,3,5,20,10)
      wait(200+random(100))
    until(FindColorSpiralTolerance(x,y,14606081, 42, 8, 67, 24, 20))
    or(FindColorSpiralTolerance(x,y,13027588, 42, 8, 67, 24, 20))
    if(FindColorSpiralTolerance(x,y,14606081, 42, 8, 67, 24, 25))
      or(FindColorSpiralTolerance(x,y,13027588, 42, 8, 67, 24, 20))then
      begin
      getmousepos(x,y)
      clickmouse(x,y,true)
      wait(200+random(500))
        repeat
        wait(100+random(200))
        until(FindColorSpiralTolerance(x,y,4106994, 193, 27, 226, 36, 20))
      end;
    end;

    procedure Deposit;
    //var Deposit_All:integer;
    begin
    //Deposit_All:= BitmapFromString(28, 6, 'beNqb07hkTuNSIJrbyI' +
    //       'AKls5tWjyjGlMcDoAagQqAJBxBNc7BYhQaA64SaP5SJL1LUPUCzYe' +
    //       'rhLiToJlY3YmVCzcNYQv1zISHG1XMxOV3iOPxxxF2MwESPVXu');
    if(FindColorSpiralTolerance(x,y,4106994, 193, 27, 226, 36, 20))then
      begin
      //repeat
      movemousesmoothEX(578+3-random(6), 263+3-random(6),1,3,5,20,10)
      wait(200+random(100))
      getmousepos(x,y)
      clickmouse(x,y,false)
      wait(300+random(300))
      //until(FindBitmapToleranceIn(Deposit_All,x,y,470,214,755,499,30))
      //if(FindBitmapToleranceIn(Deposit_All,x,y,470,214,755,499,30))then
        begin
        movemousesmoothEX(x+5-random(10), y+78-random(4),1,3,5,20,10)
        wait(200+random(100))
        getmousepos(x,y)
        clickmouse(x,y,true)
        wait(500+random(500))
        end;
      end;
    end;

    procedure Withdraw;
    begin
    if(FindColorSpiralTolerance(x,y,4106994, 193, 27, 226, 36, 10))then
      begin
    //get Logs, row 2 slot 10; Suppy tab
      movemousesmoothEX(448+5-random(10), 151+5-random(10),1,3,5,20,10)
      wait(200+random(100))
      getmousepos(x,y)
      clickmouse(x,y,false)
      wait(500+random(200))
      movemousesmoothEX(x+8-random(10), y+78-random(4),1,3,5,20,10)
      wait(200+random(100))
      getmousepos(x,y)
      clickmouse(x,y,true)
      wait(500+random(200))
     
    //Close Bank
      movemousesmoothEX(488+3-random(6), 35+3-random(6),1,3,5,20,10)
      wait(200+random(100))
      getmousepos(x,y)
      clickmouse(x,y,true)
      wait(1000+random(500))
      end;
    end;

    procedure Fletch;
    begin
      movemousesmoothEX(578+5-random(10), 230+5-random(10),1,3,5,20,10)
      wait(200+random(100))
      getmousepos(x,y)
      clickmouse(x,y,true)
      wait(500+random(200))
     
      movemousesmoothEX(578+5-random(10), 264+5-random(10),1,3,5,20,10)
      wait(200+random(100))
      getmousepos(x,y)
      clickmouse(x,y,true)
      wait(1000+random(200))
     
      movemousesmoothEX(257+15-random(30), 442+10-random(20),1,3,5,20,10)
      wait(200+random(100))
      getmousepos(x,y)
      clickmouse(x,y,true)
      wait(9000+random(1000))
    end;


    begin
    repeat
    Open_Bank;
    Deposit;
    Withdraw;
    Fletch;
    wait(39000+random(1000))
    until(false)
    end.

  2. #2
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    1)
    If you put
    Simba Code:
    Smart_Server:=35;
    before SetupSRL in your script, you can start/stop scripts without SMART reloading each time. Also, SMART loads the best/lowest ping (I think?) server each time, so whatever number you put doesn't necessarily mean it will load that server.

  3. #3
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    2. If you do Mouse(10, 10, 10, 10, True);, that means the click will be somewhere between 10, 10, and 20, 20 (and a left click, which isn't the point here). So ranx and rany simply add a Random(10), Random(10) (or whatever numbers you choose) to x and y, respectively.

  4. #4
    Join Date
    Mar 2007
    Location
    Mars, I thought all men were from Mars.
    Posts
    513
    Mentioned
    7 Post(s)
    Quoted
    124 Post(s)

    Default

    I c, thank you both for the answers and a timely response.

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
  •