my first script =)

Discussion in 'Outdated RS Scripts' started by Da Grim Raper, Dec 23, 2007.

my first script =)
  1. Unread #1 - Dec 23, 2007 at 9:19 PM
  2. Da Grim Raper
    Referrals:
    0

    Da Grim Raper Guest

    my first script =)

    this is my first talking script. i dont how to make it work on runescape. can anyone help me with it?

    Code:
    program New;
    
    const
     message1='this is my first script';
     message2='i got this awesome TUT at';
     message3='http://www.srl-forums.com/forum/all-one-beginner-t13513p7.html';
    
    procedure lol;
    begin
     wait(500)
     Writeln(message1)
     wait(500)
     Writeln(message2)
     wait(1000)
     Writeln(message3)
    end;
    
    begin
     repeat
      lol;
     until(false)
    end.
     
  3. Unread #2 - Dec 24, 2007 at 2:23 AM
  4. The Devils Son
    Joined:
    Jul 2, 2007
    Posts:
    333
    Referrals:
    0
    Sythe Gold:
    0

    The Devils Son Forum Addict
    Banned

    my first script =)

    There is one question I may ask, why do people always make auto-talkers as there first scripts? What made you want to start by making a talker?

    Anyway, its very basic and mostly just followed the Tutuorial. Myabe you could try and play around with what you can do with what learnt and learn some more by yourself.

    To write it into RS, instead of Writeln put SendKeys (note: this is the ost basic function to send letters into a program or game, find some more for better results ;))

    5/10 keep working it and make it your best wiht the knowledge you have before moving onto another type of script to get the full extent of the tutorial :)
     
  5. Unread #3 - Dec 24, 2007 at 5:36 AM
  6. Da Grim Raper
    Referrals:
    0

    Da Grim Raper Guest

    my first script =)

    ok man thnks for the help. and the reason why i think most people use talkers is because its the easiest to understand. all that other x,y stuff is complicated.
     
  7. Unread #4 - Dec 24, 2007 at 6:46 PM
  8. The Devils Son
    Joined:
    Jul 2, 2007
    Posts:
    333
    Referrals:
    0
    Sythe Gold:
    0

    The Devils Son Forum Addict
    Banned

    my first script =)

    Well x, y should be the first thing people learn for SCAR. You will use them a lot and they are quite simple to know.

    Here's a small basic run-down of what they are/can do:

    X and Y are just algebraic numerals and stand for the "x" and "y" axis of the pixels on your computer screen (according to SCAR language). Say you had a grid on your computer screen that represents every single pixel. In most cases for average computer screens the grid would have 1024 "x" pixels (so along the top of your screen, from left to right, there is 1024 pixels, in one line) and 768 "y" pixels (From the top left corner of the screen to the bottom left of the screen, in one line).

    So for calculation there is 786432 pixels on the screen in total (this is made by 1024x768 = 786432).

    Here is a quick script to show how the mouse moves and how to tell it to move where:

    Code:
    program MoveMouse;
    {.include SRL/SRL.scar} //This will include all the functions from the SRL folders.
    begin
    wait(1000+random(1000)); //This waits 1 sec plus and extra between 0 and 1 secs.
    MoveMouseSmooth(1023, 0);//This makes the mouse move, to the top right of the screen.
    wait(3000+random(1000)); //This waits 3 secs plus and extra between 0 secs and 1 secs.
    MoveMouseSmooth(0, 767); //This makes the mouse move to the bottom left of the screen.
    end.
    To tell what "coordinates" your mouse is at, look at the bottom left of yoru screen window, notice every time you move your mouse that the numbers change, try and experiment of different places on the screen by putting your mosue somewhere then remember the numbers and changing the script to what they are.

    For example:

    Say I put my mouse somewhere to my middle left of my screen it would say something near 187, 346. This means my mouse is at 187 "x" down from the top of the screen and 346 "y" across the screen.

    Now when you change the script, to change the numbers and make them go to the place you want, the line of code is based likr this:

    Code:
    MoveMouseSmooth(x, y);
    
    The letter x represents the "x" on the screen and the "y" represents the "y" on the screen. So if you changed the letter "x" to 300 and the "y" to 0 then the script would move the mouse somewhere at the top of the screen and that place is 300, 0 (300x and 0y).

    The line of code looks like this:

    Code:
    MoveMouseSmooth(300, 0);
    
    --

    Hope this helped :)
     
  9. Unread #5 - Dec 24, 2007 at 10:09 PM
  10. Da Grim Raper
    Referrals:
    0

    Da Grim Raper Guest

    my first script =)

    wow man.. thnks. that did help a lot. and hope it helped other newbie scripters =)
     
  11. Unread #6 - Dec 25, 2007 at 5:57 PM
  12. The Devils Son
    Joined:
    Jul 2, 2007
    Posts:
    333
    Referrals:
    0
    Sythe Gold:
    0

    The Devils Son Forum Addict
    Banned

    my first script =)

    No problem, add me on MSN and I will show you a better side of SCAR that would be most helpful :)

    We always need another cheater in the scene.

    MSN: [email protected]
     
  13. Unread #7 - Jan 9, 2008 at 7:07 PM
  14. GMK
    Joined:
    Aug 2, 2007
    Posts:
    395
    Referrals:
    0
    Sythe Gold:
    0

    GMK Forum Addict

    my first script =)

    Yo x is the horizontal axis and y is the vertical axis. you can find coods of your mouse by looking at bottom left of scar window.

    You will get better, try to learn clickmouse.
    for clickmouse you put clickmouse(x,y,True or false, true for left click false for right)
    then move on to findcolor,
    Then after you have made a basic macro go on to SRL functions.

    Well thats how i started anyway
     
  15. Unread #8 - Jan 9, 2008 at 7:08 PM
  16. GMK
    Joined:
    Aug 2, 2007
    Posts:
    395
    Referrals:
    0
    Sythe Gold:
    0

    GMK Forum Addict

    my first script =)

     
  17. Unread #9 - Jan 9, 2008 at 11:54 PM
  18. ProphesyOfWolf
    Joined:
    Dec 6, 2007
    Posts:
    85
    Referrals:
    0
    Sythe Gold:
    0

    ProphesyOfWolf Member

    my first script =)

    I wouldn't personally reccomend using SendKeys, rather TypeSend for it's humanlike keysending. Much smoother, to be honest. Also, rather than ClickMouse, or MoveMouseSmooth, use Mouse, and MMouse.

    Mouse works as follows:

    Code:
    Mouse(x, y, ranx, rany, left);
    As you know, x and y are variables that store the coordinates, well, x and y. You can assign these coordinates using many different functions.. I will give you an example later..

    Ranx and rany are random factors, so the mouse doesn't always move/click on the same coordinates. For instance..

    Let's say your x is 753 and your y is 524. If ranx and rany are both 5, it will move a random number between 0 and 5 pixels away from the original coordinates. Pretty simple.

    Left is a boolean (true or false). If true, it will left click where it moves to. If false, it will right click.

    Right clicking is useful for things like picking up drop items. It can be used in collaboration with many different amazing functions.

    Code:
    MMouse(x, y, ranx, rany);
    Very similar to Mouse, except it doesn't click when it moves to it's spot. Very useful for checking for inventory item uptexts, or just moving your mouse around. Take your pick.. ^^

    Okay, as for the example I promised you, of Mouse.

    I'll make a very simple chicken killer, mmk?

    Code:
    program ChickerKiller;
    
    {.include SRl/SRL.scar}
    
    const
      KillChickens = True;
      HowManyToKill = 20;
      ChickenColor1 = 3456456; //These 3 colors are just ones I made up. I'm sure they won't kill chickens if you use them..
      ChickenColor2 = 2456545;
      ChickenColor3 = 5673456;
    var
      x, y, l, WaitingTime: Integer;
    
    procedure KillThoseChickens;
      begin
        If(FindObjCustom(x, y, ['ttack', 'hicke', 'cken'], [ChickenColor1, ChickenColor2, ChickenColor3], 5)) then
      begin
        If(IsUpTextMulti('hic', 'ick', 'cken')) then
          begin
            Mouse(x, y, 2, 3, false);
            ChooseOption('ttack')
            Wait(5000 +random(2000));
            l:= l + 1;
            Exit;
          end;
      end;
    If(not(FindObjCustom(x, y, ['ttack', 'hicke', 'cken'], [ChickenColor1, ChickenColor2, ChickenColor3], 5))) then
      begin
        WriteLN('Cant find any chickens! Waiting for them to respawn...');
        MarkTime(WaitingTime);
        repeat
          Wait(50);
          If(WaitingTime > 60000) then
            begin
              LogOut;
              WriteLN('No chickens respawned.. Logged out player.');
              TerminateScript;
            end;
        until(FindObjCustom(x, y, ['ttack', 'hicke', 'cken'], [ChickenColor1, ChickenColor2, ChickenColor3], 5));
        Mouse(x, y, 3, 2, false);
        ChooseOption('Attack');
        l:= l + 1;
      end;
    end;
    
    begin
      SetupSRL;
      repeat
        KillThoseChickens;
        Wait(250 +random(250));
       until(l = HowManyToKill)
       WriteLN('Task completed!');
       LogOut;
    end.
    You know.. I may write a tutorial for this stuff.. It's simple, but also complex in some manners.. Yeah.. Keep an eye out for that, hmm?
     
  19. Unread #10 - Jan 22, 2008 at 4:21 PM
  20. elborio
    Referrals:
    0

    elborio Guest

    my first script =)

    i was clean from autoers , .but im starting go get addicted for getting back at scar
    made an auto dart fletch in vb2005:p but it has no anti random:p
     
< Sp0rk-eh's Mage Arena Enchanter (M.A.E.) | JAD Willow - edgevil willow cutter + banker. >

Users viewing this thread
1 guest


 
 
Adblock breaks this site