option chooser

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

option chooser
  1. Unread #1 - Dec 30, 2007 at 1:54 AM
  2. Nightmare0
    Joined:
    Mar 31, 2007
    Posts:
    104
    Referrals:
    0
    Sythe Gold:
    0

    Nightmare0 Active Member

    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
     
  3. Unread #2 - Dec 30, 2007 at 4:17 AM
  4. StarScreamer
    Referrals:
    0

    StarScreamer Guest

    option chooser

    cause its a private server...most dont like scar..
     
  5. Unread #3 - Dec 30, 2007 at 1:17 PM
  6. Town
    Joined:
    Jan 21, 2007
    Posts:
    3,776
    Referrals:
    3
    Sythe Gold:
    5

    Town Grand Master
    Scar Programmers

    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.
     
  7. Unread #4 - Jan 1, 2008 at 11:57 AM
  8. Nightmare0
    Joined:
    Mar 31, 2007
    Posts:
    104
    Referrals:
    0
    Sythe Gold:
    0

    Nightmare0 Active Member

    option chooser

    ok ty :)
     
  9. Unread #5 - Jan 10, 2008 at 12:14 AM
  10. ProphesyOfWolf
    Joined:
    Dec 6, 2007
    Posts:
    85
    Referrals:
    0
    Sythe Gold:
    0

    ProphesyOfWolf Member

    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) >

Users viewing this thread
1 guest


 
 
Adblock breaks this site