Poll: Hows the Script?

Results 1 to 18 of 18

Thread: First Script Please Rate!

  1. #1
    Join Date
    Jul 2007
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default First Script Please Rate!

    Hi! This is my first script (well since I came back into the world of SCAR). It's not a RuneScape script, it's for a game called GunSlinger on Mousebreaker.com. Anyway, please rate it and tell me how I can improve on anything (standards, actual script, anything) so I have a better knowledge of where to go from here.

    SCAR Code:
    {Will's Gunslinger Script

    Play the game at [url]www.mousebreaker.com/games/gunslinger/play.php[/url]

    Make sure the screen is scrolled up to the top.

    The High Score name you want is to be put in on line 20
    and how many GunSlinger's you want to be killed is to be put on line 19
    NOTE: You cannot kill more than 66 GunSlinger's, you will lose if you put
    more than 66.

    Thanks!

    }


    program GunSlinger;

    const
      HowManyToKill= 1;//How man GunSlinger's to kill
      HighScoreName= ('Will');//High Score Name, must be 8 characters or less


    var
      HowManyKilled: integer;

    procedure ProgressReport;
    begin
      ClearDebug;
      Writeln('   This script was brought to you by:    ');
      Writeln(' __             __  ___  ___     ___     ');
      Writeln(' \ \     _     / /  | |  | |     | |     ');
      Writeln('  \ \   / \   / /   | |  | |     | |     ');
      Writeln('   \ \_/ _ \_/ /    | |  | |     | |     ');
      Writeln('    \   / \   /     | |  | |___  | |___  ');
      Writeln('     \_/   \_/      |_|  |_____| |_____| ');
      Writeln('                                         ');
      Writeln('[]============================[]');
      Writeln('     ' + 'Killed ' + IntToStr(HowManyKilled) + ' GunSlingers' + '   ');
      Writeln('     ' + 'Out of Pos ' + IntToStr(HowManyToKill) + ' Gunslingers' + '   ');
      Writeln('[]============================[]');
    end;

    procedure HighScore;
    begin
      if (GetColor(248,361)= 52479) then
        wait(100);
        MoveMouseSmoothEx(248,361,1,3,20,1,1);
        wait(200);
        ClickMouse(248,361,true);
        wait(1000);
      if (GetColor(226,214)=16777215) then
        wait(100);
        MoveMouseSmoothEx(226,214,1,3,20,1,1);
        wait(100);
        ClickMouse(226,214,true);
        wait(100);
        SendKeys(HighScoreName);
        wait(100);
        MoveMouseSmoothEx(275,273,1,3,20,1,1);
        wait(100);
        ClickMouse(275,273,true);
        wait(100);
    end;

    procedure Start;
    begin
      HowManyKilled:= 0
      if (GetColor(505,344)=52479) then
      ClickMouse(505,344,true);
    end;


    procedure FindHand;
    begin
      repeat
        wait(1);
        MoveMouse(230,252);
      until (GetColor(230,252)=3757682);
    end;

    procedure shoot;
    begin
      wait(1);
      SendKeys(' ');
      wait(1);
      HowManyKilled:= (HowManyKilled + 1);
      if (HowManyKilled = HowManyToKill) then
      begin
        HighScore;
      end else
      begin
        if(GetColor(517,361)=52479) then
          wait(1000);
          MoveMouseSmoothEx(517,361,1,3,20,1,1);
          wait(500);
          ClickMouse(517,361,true);
      end;
    end;

    begin
      Start;
        repeat
          FindHand;
          Shoot;
          ProgressReport;
        until (HowManyKilled = HowManyToKill);
    end.

    Thanks!

    [EDIT]
    Sorry I forgot to add a poll and I don't know how to do it, so please, ratings are:

    Very Good
    Good
    O.K.
    Poor
    TOTAL N00B at Scar. I once had a script that cut, strung and fletched 10,000 + yew bows, but those days are now gone, and I'm trying to re unite my knowledge of scripting again.

  2. #2
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    After every if then statement, put a begin, and and end, like

    if something then
    begin
    do stuff
    more stuff
    end;

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  3. #3
    Join Date
    Jul 2007
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I can't, otherwise the High Score part won't work, so I have to leave out a few begins and ends for it to work. Still a bit unsure whether my standards are correct though.
    TOTAL N00B at Scar. I once had a script that cut, strung and fletched 10,000 + yew bows, but those days are now gone, and I'm trying to re unite my knowledge of scripting again.

  4. #4
    Join Date
    Mar 2007
    Posts
    102
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It will still work, putting in begin's and end's are part of standards.

  5. #5
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    no if you do this:

    SCAR Code:
    if something then
    this;
    that;
    again;

    instead of this

    SCAR Code:
    if something then
    begin
    this;
    that;
    agian;
    end;

    The first one will only do that IF something is true. Then it will do that and again no matter what else happens.

    The second one will only do all three of them IF something is true, which is what you are trying to do.

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  6. #6
    Join Date
    Aug 2007
    Posts
    282
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    the shooting part works as it is supposed to, nice job on that. not to shabby for a first script

  7. #7
    Join Date
    Jun 2007
    Location
    In my computer room
    Posts
    148
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Very Nice I Like Having My Name In A HighScores In A Game

  8. #8
    Join Date
    Jun 2007
    Location
    England
    Posts
    262
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hey there, didn't test your script but I had a good look through it. Not bad for a first script put here are a few pointers on improving it. You have:
    SCAR Code:
    Wait(100);
    This is very detectable as it always waits the same amount of time. You should try:
    SCAR Code:
    Wait(100 + Random(200));
    Basically all this does is add a random of 200 milliseconds to your wait. For example. It could wait either 129 milliseconds of 265.

    For RS scripts your should include SRL by doing this:
    SCAR Code:
    {.Include SRL\SRL.SCAR}
    And have this at the top of your main loop.
    SCAR Code:
    SetUpSRL;
    This basically allows use to use SRL in our scripts. For RS never use ClickMouse use Mouse(x,y,Coords,Coords,True); this moves the mouse to the specified coordinates and clicks.

    Hope I helped you out a bit!
    - Drive

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

    Default

    Hi there, an excellent start to scripting!

    Here are some suggestions for you, and things for you to note:

    1) What everyone is trying to tell you about the begin and end tags.

    PHP Code:
    If This_Is_True Then
    Begin
      Writeln
    ('Hello');
      
    Writeln('This is true!');
    end
    is very different to:

    PHP Code:
    If This_Is_True Then
      Writeln
    ('Hello');
    Writeln('This is true!'); 
    Although none of them will compile, I'll explain what they do. If you were to run the first one and the variable This_Is_True was true, then it will print out the words Hello and This is true. If you run the second one and the variable This_Is_True is true, it would also print out the words Hello and This is true.

    It differs however, if the variable This_Is_True is not set to true. If you were to run the first one and the variable This_Is_True was false, it would print out nothing. If you are to run the second one and the variable This_Is_True is set to false, it will only print out "This is True"

    This is all to do with the begin and end tags. Play around with them a bit and you'll see what i mean.

    2) Your standards are excellent! The only thing you are doing wrong is increasing the indenting all the time after the If (Someting) then

    If you are not going to use the begin and end tags then it should be:

    PHP Code:
    if (GetColor(226,214)=16777215then
      wait
    (100);
    MoveMouseSmoothEx(226,214,1,3,20,1,1);
    wait(100);
    ClickMouse(226,214,true);
    wait(100);
    SendKeys(HighScoreName);
    wait(100);
    MoveMouseSmoothEx(275,273,1,3,20,1,1);
    wait(100);
    ClickMouse(275,273,true);
    wait(100); 
    If you are going to use the begin and end tags, then it should be:

    PHP Code:
    if (GetColor(226,214)=16777215then
    begin
      wait
    (100);
      
    MoveMouseSmoothEx(226,214,1,3,20,1,1);
      
    wait(100);
      
    ClickMouse(226,214,true);
      
    wait(100);
      
    SendKeys(HighScoreName);
      
    wait(100);
      
    MoveMouseSmoothEx(275,273,1,3,20,1,1);
      
    wait(100);
      
    ClickMouse(275,273,true);
      
    wait(100);
    end
    3) You may want to think about breaking out of infinite loops however, such as the following:

    PHP Code:
    procedure FindHand;
    begin
      repeat
        wait
    (1);
        
    MoveMouse(230,252);
      
    until (GetColor(230,252)=3757682);
    end
    What happens if it never finds the color? It will be moving the mouse forever.

    I would suggest something like:

    PHP Code:
    procedure FindHand;
    Var
      
    CountInteger;
    begin
      repeat
        wait
    (1);
        
    MoveMouse(230,252);
        
    Count := Count 1;
      
    until (GetColor(230,252)=3757682) or (Count >= 10)
    end
    That way it will move the mouse there until it finds the color or "Count" is greater or equal to 10

    Otherwise I can't find much more which is wrong with the script.

    I added your poll for you.

    Great job

    Star
    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!


  10. #10
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Very good, my first scar script was hello world lol

  11. #11
    Join Date
    Nov 2006
    Location
    NSW, Australia
    Posts
    3,487
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by passiondrive View Post
    Hey there, didn't test your script but I had a good look through it. Not bad for a first script put here are a few pointers on improving it. You have:
    SCAR Code:
    Wait(100);
    This is very detectable as it always waits the same amount of time. You should try:
    SCAR Code:
    Wait(100 + Random(200));
    Basically all this does is add a random of 200 milliseconds to your wait. For example. It could wait either 129 milliseconds of 265.

    For RS scripts your should include SRL by doing this:
    SCAR Code:
    {.Include SRL\SRL.SCAR}
    And have this at the top of your main loop.
    SCAR Code:
    SetUpSRL;
    This basically allows use to use SRL in our scripts. For RS never use ClickMouse use Mouse(x,y,Coords,Coords,True); this moves the mouse to the specified coordinates and clicks.

    Hope I helped you out a bit!
    - Drive
    It's not a Runescape script...

    And since when did Starblaster post in these kinds of topics?
    [CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
    [CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]

    [CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]

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

    Default

    lol, am i banned from posting in these kind of topics then?
    Should i delete my post and leave?
    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!


  13. #13
    Join Date
    Mar 2007
    Posts
    3,681
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    yer your right hes really active at SRL nowadays

  14. #14
    Join Date
    Nov 2006
    Location
    NSW, Australia
    Posts
    3,487
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Starblaster100 View Post
    lol, am i banned from posting in these kind of topics then?
    Should i delete my post and leave?
    Ofcourse not, but it's rare seeing you post in a script thread that isn't yours...
    [CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
    [CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]

    [CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]

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

    Default

    This one caught my attention.

    Nicely written, Seems willing to learn. If he puts in the effort, so will I
    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!


  16. #16
    Join Date
    Nov 2006
    Location
    NSW, Australia
    Posts
    3,487
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by n3ss3s View Post
    Very good, my first scar script was hello world lol
    Congratulations

    What was your first script Starblaster?
    [CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
    [CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]

    [CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]

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

    Default

    Going a bit offtopic here lol:

    Was to do with the crafting guild. Mined 27 clay, turned it into soft clay using a bucket and the water from the sink, spun the soft clay into pots and so on, shoved them in the furnace and made them hard, dropped them and the repeated the process

    Very ambitious for a first script but hey, thats me lol
    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!


  18. #18
    Join Date
    Jul 2007
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wow thanks people for all the help and supportive comments, I understand about the 'Begins and Ends' now, thanks for explaining it to me Star. Glad some liked the script, I'm touching it up and I'm gonna start on a new script

    Not sure what to do though
    TOTAL N00B at Scar. I once had a script that cut, strung and fletched 10,000 + yew bows, but those days are now gone, and I'm trying to re unite my knowledge of scripting again.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 11
    Last Post: 01-27-2008, 07:28 AM
  2. RATE THIS SCRIPT please
    By P1nky in forum OSR Help
    Replies: 4
    Last Post: 08-28-2007, 06:09 AM
  3. Rate my first sig
    By Fearlesssss in forum Semi Stupid Pictures
    Replies: 3
    Last Post: 06-11-2007, 12:06 PM
  4. Rate this sig.
    By n3ss3s in forum Semi Stupid Pictures
    Replies: 2
    Last Post: 03-22-2007, 05:03 PM

Posting Permissions

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