Results 1 to 3 of 3

Thread: Any Suggestions for script?

  1. #1
    Join Date
    Jan 2008
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Any Suggestions for script?

    this is my first script (technically) its the same idea as the one i was trying to do before, but now im trying to use srl functions, rather than scar.
    its used in al-kharid to smelt ores. its really basic because im new at this. i still have to figure out how the login players and the repeating thing.
    but heres wut i have so far, any suggestion?

    SCAR Code:
    program smith;
    {.include srl/srl.scar}

    const
         GroundColor=7320771;
         SmeltColor=3881791;
         NumOfCopperOres=6;
         NumOfTinOres=6;

    var
    x, y : Integer;

    procedure GetCopper;
    begin
    Withdraw(3,3,NumOfCopperOres);
    end;

    procedure GetTin;
    begin
    Withdraw(3,4,NumOfTinOres);
    end;

    procedure WalkToSmelt;
    begin
    if(FindColorSpiralTolerance(x,y,GroundColor,680,115,696,129,40)) then
    begin
    Mouse(x,y,1,1,true);
    end else
    end;

    procedure FindSmelt;
    begin
    if(FindObj(x,y,'melt',SmeltColor,10)) then
    begin
    Mouse(x,y,1,1,true);
    end else
    end;

    procedure PickBarType;
    begin
    if(FindColorTolerance(x,y,2770780,20,376,338,436,20)) then
    begin
    Mouse(x,y,1,1,false);
    y := y+70;
    Mouse(x,y,2,2,true);
    Wait(2000+random(100));
    TypeSend('6');
    end else
    end;

    procedure BankWalk;
    begin
    If(FindColorSpiralTolerance(x,y,GroundColor,548,75,559,85,40)) then
    begin
    Mouse(x,y,1,1,true);
    end else
    end;

    procedure OpenUp;
    begin
    OpenBankQuiet('akb');
    end;

    procedure DepositBars;
    begin
    DepositAll;
    end;

    begin
         SetupSRL;
         GetCopper;
         Wait(100+random(50));
         GetTin;
         Wait(500+random(100));
         WalkToSmelt;
         Wait(13000+random(100));
         FindSmelt;
         Wait(9000+random(115));
         PickBarType;
         Wait(10000+random(100));
         BankWalk;
         Wait(16000+random(100));
         OpenUp;
         Wait(3000+random(100));
         DepositBars;
    end.

    oh, and im having trouble with the ground color. it changes alot w/ every login. is there any way i can have the ground color chosen and plugged in for "groundcolor" before the script starts
    thanks

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

    Default

    well, your script seems way too simple as a good scripter you must try to insert bunch of antiban or antirandom inside and also with the declare player. Try learn some of the basic 1st

    http://www.srl-forums.com/forum/tuto...ners-f176.html

  3. #3
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    To do repeats just do,

    [scar]
    Repeat

    Blabla;

    Until(Whatever);

    And for multiplayer(login) just add this procedure to the top of your script

    SCAR Code:
    Procedure DeclarePlayers;
    Begin

      HowManyPlayers:= 1;
      CurrentPlayer:= 0;
      NumberOfPlayers(HowManyPlayers);

      Players[0].Name        := '';   // Enter Username here.
      Players[0].Pass        := '';   // Enter password here.
      Players[0].Nick        := '';   // Enter nickname here. Must be 3-4 letters of name. NO CAPITALS!
      Players[0].Active      := True; // Is this player active?

    End;

    Then to make It login just put this in the main loop

    SCAR Code:
    Begin
    SetupSRL;
    DeclarePlayers;
    LoginPlayer;
    AllYourStuff...
    End.

    Thanks,

    ~Kyle~

    Rep++ me if that helped you (The blue checkmark on the top right of one of my posts)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help With Script and in need of Suggestions
    By !bezo! in forum OSR Help
    Replies: 2
    Last Post: 08-23-2007, 12:43 PM
  2. Need Help And Suggestions For First Script
    By Buzzy in forum OSR Help
    Replies: 8
    Last Post: 07-26-2007, 07:16 PM
  3. Script help/suggestions
    By uber jesus in forum OSR Help
    Replies: 2
    Last Post: 02-11-2007, 02:11 AM

Posting Permissions

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