Results 1 to 15 of 15

Thread: script request to press spacebar

  1. #1
    Join Date
    Mar 2012
    Posts
    44
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default script request to press spacebar

    I need a script that works in smart (so I can use the script on more than one account on the same computer). When you press run I need it to continuously press the "space bar" key and "2" key and click the Left side of the mouse once every 4.1 seconds (doesn't have to be exactly 4.1s but would prefer it).

    That is all that needs to be done.
    Last edited by Harry; 03-25-2012 at 04:11 AM.

  2. #2
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    Simba Code:
    program new;
    {$define SMART}
    {$include srl/srl.simba}
    begin
    setupsrl;
    repeat
      TypeSend(' 2');
      ClickMouse2(mouse_Left);
      wait(4100);
    until false;
    end.

    Paypal markusjanse@gmail.com plzzzzz

    No I don't actually want your money for 25 seconds of work ;-)
    I made a new script, check it out!.

  3. #3
    Join Date
    Nov 2011
    Posts
    1,268
    Mentioned
    17 Post(s)
    Quoted
    217 Post(s)

    Default

    Lol, thats good code

  4. #4
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    Fits the requirements 100%. Works with SMART, presses space and 2 and clicks every 4.1 second ^-^
    I made a new script, check it out!.

  5. #5
    Join Date
    Nov 2011
    Posts
    232
    Mentioned
    1 Post(s)
    Quoted
    5 Post(s)

    Default

    ooo Looks great to me I will definitely use this on my main :x

  6. #6
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    Since when can you pay?
    Everyone always got yelled at for it. o.O

  7. #7
    Join Date
    Jul 2010
    Posts
    1,115
    Mentioned
    1 Post(s)
    Quoted
    10 Post(s)

    Default

    Quote Originally Posted by nkn View Post
    Since when can you pay?
    Everyone always got yelled at for it. o.O
    you cant. if you read the whole post he said hes not taking money for what he posted

  8. #8
    Join Date
    Mar 2012
    Posts
    44
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hey I tried making this myself but it doesn't work for me so I need some help


    WHAT I WANT IT TO DO
    1)login to runescape by smart,
    2)find the colour specified,
    3)moves mouse to that colour,
    4)clicks mouse on that colour,
    5)presses "spacebar" and "2" 6 times
    6)repeats steps 4 & 5 until I stop program or after 28 iterations (full inventory)

    PROBLEMS WITH MY SCRIPT
    Opens up smart but doesn't login (just presses spacebar and 2 keys in username and password),
    I then pause program and login manually, I press run again and it just
    presses spacebar and 2 keys over and over. The red dot is stuck in the top
    left hand corner of smart and doesn't move or click.

    I am using a laptop if that has anything to do with it.

    MY SCRIPT
    Code:
    program mous;
    
    {$i srl/srl/misc/smart.simba}
    {$i SRL/SRL.simba}
    
    var
      x, y : Integer;
    
     begin
    setupsrl;
    
    
    begin
    
    wait(5000);
    
     FindColor(x, y, 2255975,MSX1, MSY1, MSX2, MSY2)
    
        MMouse(x, y, 4, 4)
      repeat
    
     Mouse(x, y, 4, 4,True)
    
      TypeSend(' 2');
      TypeSend(' 2');
      TypeSend(' 2');
      TypeSend(' 2');
      TypeSend(' 2');
      TypeSend(' 2');
    
    until false;
    end;
    
    
    end.

    anything to help me with it would be great or create it yourself if it won't take you that long thankyou

  9. #9
    Join Date
    Feb 2012
    Location
    DON'T PM ME ASKING FOR STUFF
    Posts
    2,170
    Mentioned
    38 Post(s)
    Quoted
    423 Post(s)

    Default

    Quote Originally Posted by f1fanatic View Post
    hey I tried making this myself but it doesn't work for me so I need some help


    WHAT I WANT IT TO DO
    1)login to runescape by smart,
    2)find the colour specified,
    3)moves mouse to that colour,
    4)clicks mouse on that colour,
    5)presses "spacebar" and "2" 6 times
    6)repeats steps 4 & 5 until I stop program or after 28 iterations (full inventory)

    PROBLEMS WITH MY SCRIPT
    Opens up smart but doesn't login (just presses spacebar and 2 keys in username and password),
    I then pause program and login manually, I press run again and it just
    presses spacebar and 2 keys over and over. The red dot is stuck in the top
    left hand corner of smart and doesn't move or click.

    I am using a laptop if that has anything to do with it.

    MY SCRIPT
    Code:
    program mous;
    
    {$i srl/srl/misc/smart.simba}
    {$i SRL/SRL.simba}
    
    var
      x, y : Integer;
    
     begin
    setupsrl;
    
    
    begin
    
    wait(5000);
    *
    repeat
     FindColor(x, y, 2255975,MSX1, MSY1, MSX2, MSY2)
    
        MMouse(x, y, 4, 4)
    
    
     Mouse(x, y, 4, 4,True)
    
      TypeSend(' 2');
      TypeSend(' 2');
      TypeSend(' 2');
      TypeSend(' 2');
      TypeSend(' 2');
      TypeSend(' 2');
    
    until (false);
    end;
    
    
    end.

    anything to help me with it would be great or create it yourself if it won't take you that long thankyou

    Simba Code:
    program mous;

    {$i srl/srl/misc/smart.simba}
    {$i SRL/SRL.simba}

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      with Players[0] do
      begin
        Name   := ''; //Character Name
        Pass   := ''; //Character Pass
        Pin    := ''; //Pin for bank
        Active := true;
      end;
    end;


    var
      x, y : Integer;

     begin
      Cleardebug;
      Smart_Server := 10;
      Smart_Members := false;
      Smart_Signed := false;
      Smart_SuperDetail := false;
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
    begin

    wait(5000);

     FindColor(x, y, 2255975,MSX1, MSY1, MSX2, MSY2)

        MMouse(x, y, 4, 4)
      repeat

     Mouse(x, y, 4, 4,True)

      TypeSend(' 2');
      TypeSend(' 2');
      TypeSend(' 2');
      TypeSend(' 2');
      TypeSend(' 2');
      TypeSend(' 2');

    until false;
    end;


    You didn't add the right procedures

  10. #10
    Join Date
    Mar 2012
    Posts
    44
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Code:
    program mous;
    
    {$i srl/srl/misc/smart.simba}
    {$i SRL/SRL.simba}
    
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      with Players[0] do
      begin
        Name   := ''; //Character Name
        Pass   := ''; //Character Pass
        Pin    := ''; //Pin for bank
        Active := true;
      end;
    end;
    
    
    var
      x, y : Integer;
    
     begin
      Cleardebug;
      Smart_Server := 10;
      Smart_Members := false;
      Smart_Signed := false;
      Smart_SuperDetail := false;
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
    begin
    
    wait(5000);
    
     FindColor(x, y, 2255975,MSX1, MSY1, MSX2, MSY2)
    
        MMouse(x, y, 4, 4)
      repeat
    
     Mouse(x, y, 4, 4,True)
    
      TypeSend(' 2');
      TypeSend(' 2');
      TypeSend(' 2');
      TypeSend(' 2');
      TypeSend(' 2');
      TypeSend(' 2');
    
    until false;
    end;


    thanks it now logs in but the same still happens after that where the red dot goes to the top left hand corner and doesn't click. However is does still press the spacebar and 2 keys over and over. I just need the mouse to move to where I want and click on the colour first.

  11. #11
    Join Date
    Dec 2011
    Location
    Berlin
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by f1fanatic View Post
    hey I tried making this myself but it doesn't work for me so I need some help


    WHAT I WANT IT TO DO
    1)login to runescape by smart,
    2)find the colour specified,
    3)moves mouse to that colour,
    4)clicks mouse on that colour,
    5)presses "spacebar" and "2" 6 times
    6)repeats steps 4 & 5 until I stop program or after 28 iterations (full inventory)

    PROBLEMS WITH MY SCRIPT
    Opens up smart but doesn't login (just presses spacebar and 2 keys in username and password),
    I then pause program and login manually, I press run again and it just
    presses spacebar and 2 keys over and over. The red dot is stuck in the top
    left hand corner of smart and doesn't move or click.

    I am using a laptop if that has anything to do with it.

    MY SCRIPT
    Code:
    program mous;
    
    {$i srl/srl/misc/smart.simba}
    {$i SRL/SRL.simba}
    
    var
      x, y : Integer;
    
     begin
    setupsrl;
    
    
    begin
    
    wait(5000);
    
     FindColor(x, y, 2255975,MSX1, MSY1, MSX2, MSY2)
    
        MMouse(x, y, 4, 4)
      repeat
    
     Mouse(x, y, 4, 4,True)
    
      TypeSend(' 2');
      TypeSend(' 2');
      TypeSend(' 2');
      TypeSend(' 2');
      TypeSend(' 2');
      TypeSend(' 2');
    
    until false;
    end;
    
    
    end.

    anything to help me with it would be great or create it yourself if it won't take you that long thankyou
    It is because you dont have telled the programm you account details. You should add a simple DeclarePlayers option in the beginning and I would make an MainLoop in the end where you can tell the script when it have to do what and how often.

    Simba Code:
    program New;
    {$i srl/srl.simba}

    Procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Active:=True;
    end;

     //<- Here you should describe the other functions and procedures of your script.

    begin
      SetUpSRL;
      ActivateClient;      //<-- Add the name of the functions and procedures here
    end.

    Hope it helped a bit im a beginner on myself and waked up like 5minutes ago.

    I will try to answer all Runescape related questions!

  12. #12
    Join Date
    Dec 2011
    Posts
    47
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I noticed you might be trying to create a script that handles the conversation with a NPC. I would recommend using something like this:

    Simba Code:
    program Talktoperson;

    {$i srl/srl/misc/smart.simba}
    {$i SRL/SRL.simba}

    procedure DeclarePlayers;
    var i:integer;
    begin
      NumberOfPlayers(1);
      CurrentPlayer := 0;

      with Players[0] do
      begin
      Name :=''; // Username
      Pass :=''; // Password
      Active := True;
      Pin := '';      // Leave blank if you have no pin.
      end;
    end;

    procedure talktoperson;
    var
      x, y:integer;
    begin
      if (FindColor(x, y, 2255975,MSX1, MSY1, MSX2, MSY2))  then
      begin
        Mouse(x, y, 2, 2,  mouse_left);
        repeat
          Wait(100+random(100));
        until (ClickContinue(true, true));
        repeat
          Wait(100+random(100));
        until (FindNPCChatText('textofoption', clickleft));
        repeat
          Wait(100+random(100));
        until (FindNPCChatText('textofoption', clickleft));
      end;
    end;

    begin
      Smart_Server := 54;
      Smart_Members := True;
      SetupSRL;
      Declareplayers;
      if not (LoggedIn) then
        LoginPlayer;
      Repeat
        talktoperson;
      Until false;
    end.

    After clicking that color (your npc) it waits a few milliseconds and then it checks if the green [ > ] is present and if it is, it presses space bar and then goes onto the next step.
    You will need to change 'textofoption' to the text of what it says (in your case, a small part of what option 2 says).
    It will then again, of course wait a few milliseconds before checking if that option can be found on the screen and will continue onto the next step after it returns true.

  13. #13
    Join Date
    Mar 2012
    Posts
    44
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks for the help everyone but i'm starting to get really frustrated with the colour picker because when I pick a colour from the login screen (the woman with the purpley fireball in her hand for example) everything works perfectly the mouse moves towards the colour and clicks it, but when I actually log in and pick the colour of the npc and run it nothing bloody happens the red dot just stays in the top left hand corner!!! arrgghghghh

    help plz lol?

  14. #14
    Join Date
    Dec 2011
    Posts
    47
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Could you post the script that you are currently running? or maybe tell me what npc you're trying to talk with?
    Last edited by 68z35h9; 03-25-2012 at 02:02 PM.

  15. #15
    Join Date
    Jun 2007
    Location
    Greenville, SC
    Posts
    1,149
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Add tolerance to the color finding function... Findcolortolerance. Rs clors arent static. 3 tolerance should be good.

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
  •