Adblock breaks this site

option chooser

Discussion in 'Scar/Simba Help' started by Nightmare0, Dec 30, 2007.

  1. Nightmare0

    Nightmare0 Active Member

    Joined:
    Mar 31, 2007
    Posts:
    104
    Referrals:
    0
    Sythe Gold:
    0
    option chooser

    when i run this script:

    Code:
    program ColorAndTextClick;
    {.include SRL/SRL.scar}
    Procedure Clickity;
    var
    x,y:integer;
    begin
      FindObj(x,y,'the uptext',555{<- the color},3{<-the tolerance})
      GetMousePos(x,y);//gets the current x,y co-ords
      Mouse(x,y,3,3,false);//clicks the mouse at x,y right click
      ChooseOption('option');//option you wanted eg 'Take iron'
    end;
    
    begin
    SetupSRL;
    Clickity;
    end.
    it compiles and runs, but doesn't do anything. my colors are correct, and even when i switched and replaced stuff to make this:

    Code:
    program ColorAndTextClick;
    {.include SRL/SRL.scar}
    
    var
    x,y: integer;
    
    const
    dragon=5123099;
    
    Procedure Clickity;
    begin
      if(FindColor(x,y,dragon,0,0,600,600)) then
      begin
       MoveMouseSmooth(x,y);
       ClickMouse(x,y,false);
       ChooseOption('attack');//option you wanted eg 'Take iron'
      end;
    end;
    
    begin
    SetupSRL;
    repeat
    Clickity;
    Wait(4000);
    until(IsFKeyDown(8));
    end.
    it goes and right click on the object, but doesn't choose attack, just hovers there until the repeat.

    im just messing around with a private server to learn more about scripting so the commands don't have to be completely anti-ban stuff, just basics.

    if you can help me pls respond
     
  2. StarScreamer

    StarScreamer Guest

    Referrals:
    0
    option chooser

    cause its a private server...most dont like scar..
     
  3. Town

    Town Grand Master
    Scar Programmers

    Joined:
    Jan 21, 2007
    Posts:
    3,776
    Referrals:
    3
    Sythe Gold:
    5
    option chooser

    Yeah, the private server probably isn't the same. You may also want to add a wait between the click and the ChooseOption.
     
  4. Nightmare0

    Nightmare0 Active Member

    Joined:
    Mar 31, 2007
    Posts:
    104
    Referrals:
    0
    Sythe Gold:
    0
    option chooser

    ok ty :)
     
  5. ProphesyOfWolf

    ProphesyOfWolf Member

    Joined:
    Dec 6, 2007
    Posts:
    85
    Referrals:
    0
    Sythe Gold:
    0
    option chooser

    Also, instead of MoveMouseSmoothe and ClickMouse, use Mouse. It works as follows:

    Code:
    Mouse(x, y, ranx, rany, left);
    X and y, as you know, store coordinates. Ranx and rany are a number that you set that makes the procedure move the mouse a random amount of pixels away from the location specified by x and y. Left is a boolean, if true, it left clicks, if false, right clicks. Saves you time and space..
     
< Error Running Any Script.. | Need help (Do it for lulz) >


 
 
Adblock breaks this site