Results 1 to 12 of 12

Thread: help with my first script

  1. #1
    Join Date
    Oct 2007
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default help with my first script

    hey. i am trying to make a script that can walk to lumby, varock, dwarf mines, and flalador. i am following a tutorial, so forgive me if my script is crude and there are easier better ways to do it. here it is so far. it is just the first click on the way to varrock. (unfortunantly i have to start in 1 place barb village. help with that is appreciated also.)

    program New;
    // YOU MUST START THIS SCRIPT IN BARB VILLAGE BY THE ROCKS!!!
    // I WILL TRY TO FIX THIS LATER

    var
    x,y: integer;

    const
    GoToVarrok=True;
    GoToFalador=False;
    GoTOLumby=False;
    GoTODwarfMine=False;

    begin
    If(GoToVarrok=true) then
    begin
    MoveMouseSmooth(704,78)
    Wait(100+random(100));
    end.

    thanks in advance

  2. #2
    Join Date
    Jun 2007
    Posts
    61
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program New;
    {.include srl/srl.scar}
    // YOU MUST START THIS SCRIPT IN BARB VILLAGE BY THE ROCKS!!!
    // I WILL TRY TO FIX THIS LATER

    var
    x,y: integer;

    const
    GoToVarrok=True;
    GoToFalador=False;
    GoTOLumby=False;
    GoTODwarfMine=False;

    begin
    Setupsrl;
    If(GoToVarrok=true) then
    begin
    MoveMouseSmooth(704,78)
    Wait(100+random(100));
    end.


    try that

  3. #3
    Join Date
    Oct 2007
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hmm. that gave me the error

    Failed when compiling
    [Error] (14701:4): Identifier expected

    i added a mouseclick, so here is the updated script.

    p.s. srry im such a noob

    program New;
    {.include srl/srl.scar}
    // YOU MUST START THIS SCRIPT IN BARB VILLAGE BY THE ROCKS!!!
    // I WILL TRY TO FIX THIS LATER

    var
    x,y: integer;

    const
    GoToVarrok=True;
    GoToFalador=False;
    GoTOLumby=False;
    GoTODwarfMine=False;
    begin
    Setupsrl;
    If(GoToVarrok=true) then
    begin
    MoveMouseSmooth(704,78+random(6));
    Wait(100+random(100));
    ClickMouse(704,78+random(6));
    end.

  4. #4
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    SCAR Code:
    program walking;
    {.include srl/srl.scar}
    // YOU MUST START THIS SCRIPT IN BARB VILLAGE BY THE ROCKS!!!
    // I WILL TRY TO FIX THIS LATER

    var
      x,y: integer;

    const
      GoToVarrok = True;
      GoToFalador = False;
      GoTOLumby = False;
      GoTODwarfMine  = False;
    begin
      Setupsrl;
      If GoToVarrok then //you don't need = True here
      begin
        Mouse(704, 78, 0, 6, True); //will move and click
        wait(300);
      end;
    end.

    try reading some more tutorials and learning more about SRL, not only scar.

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  5. #5
    Join Date
    Jun 2007
    Posts
    785
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAH HE REMOVED MOUSE FOR CLICKMOUSE!!!!! NEVER DO THAT!!!!

    clickmouse = BANNED

    [22:20] <[-jesus-]> freddy, go uninstall yourself

  6. #6
    Join Date
    Oct 2007
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks rasta!

    but what about the randomizing the move and the click

    again srry for bein a noob (not that i can really help it)

  7. #7
    Join Date
    Jun 2007
    Posts
    785
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    clickmouse doesn't move humanlike , mouse does it better

    [22:20] <[-jesus-]> freddy, go uninstall yourself

  8. #8
    Join Date
    Jun 2007
    Location
    Hell Stream
    Posts
    584
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  9. #9
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by parkkicks View Post
    thanks rasta!

    but what about the randomizing the move and the click

    again srry for bein a noob (not that i can really help it)
    i like noobs as long as they're trying to learn

    for I am randomizing the click, but i guess your not familiar with mouse then.

    Mouse(x, y, RANDx, RANDy, Leftclick):boolean
    ok so x, y are the coords you want to move to.
    RANDx and RANDy and how much you want it to randomize the x n the y
    left click is a boolean. True for left click, False for right click.
    so:
    Mouse(704, 78, 0, 6, True);
    x: 704
    y: 78
    RANDx: 0
    Randy: 6
    LeffClick: true

    and hellbb88 is right, since this is for walking you're better off using flag (which will wait until the red flag disappears from your minimap), instead of wait(300);

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  10. #10
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program walking;
    {.include SRL/SRL.scar}

    // YOU MUST START THIS SCRIPT IN BARB VILLAGE BY THE ROCKS!!!
    // I WILL TRY TO FIX THIS LATER

    var
      x,y: integer;

    const
      GoToVarrok = True;
      GoToFalador = False;
      GoTOLumby = False;
      GoTODwarfMine  = False;
     

    begin
      SetupSRL;
      If GoToVarrok then
      begin
        Mouse(704, 78, 3, 3, True);
        Flag; //Or FFlag(1); (distance away)
      end;
    end.

    {************************************************* ******************************
    procedure Mouse(mousex, mousey, ranx, rany: Integer; left: Boolean);
    Description: Moves then clicks mouse.
    ************************************************** *****************************}
    Co-ords not very good for walking, look at some other tutorials including the RadialWalk

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  11. #11
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yes, the problem with using coordinates for walking is that every time you log on the angle of the minimap is off by about 5 degrees in some direction. You cant really compensate for this with clicking. Using RadialWalk and RadialRoadWalk will search for colors on the screen and click on those colors. (its very cool i love radialwalk).
    ~ Metagen

  12. #12
    Join Date
    Jun 2007
    Location
    Hell Stream
    Posts
    584
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Most useful waiting procedure will be considering using radial walk with some use of autocolor feature or Bitmap or DTM feature and it will make it almost flawless.

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
  •