Results 1 to 4 of 4

Thread: Check My Script?

  1. #1
    Join Date
    Jul 2008
    Location
    US
    Posts
    104
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Check My Script?

    ok this is my first major script with alot of stuff in it. i havent even started on actually doin the actual script, but i have tried to just start out a basic outline of how its going to go threw the motions and stuff. so i dought i set this up right. i have constants just like sitting on the top of the script. those are just some ideas i had, so i put those to help me remember them. i think i put in smart form. i didnt mean to, i think i just did it on accident

    heres wot i got so far:

    //phassy smelter
    //starts in bank...full inventory of iron ore(if using, start out with ring of forging equiped...
    //credits:
    //uses smart in ru5ture
    //in the future, mabye reflection
    //
    //
    //
    //
    //
    //

    {.include srl/srl.scar}
    {.include srl/srl/misc/Users.scar}


    Var Loads

    Const
    //loging setup
    LogoutEvery = 4;// loads to log out after

    //smart setup
    WorldNumber =44;//i preffer u not to use quickchat worlds, like 160

    //ring setup
    UseRing =true,//use ring of forgings (recomended; extra costi about 7gp per ore)well worth it and easy to buy

    procedure DeclarePlayers;
    begin
    HowManyPlayers := 1;//Change this accordinly
    NumberOfPlayers(HowManyPlayers);
    CurrentPlayer := 0;

    Players[0].Name :='';//Character Name
    Players[0].Pass := ''; //Character Pass
    Players[0].Nick := ''; //Nickname 3 - 4 Letter's of char name
    Players[0].Active := True; //Use player in script?

    {------------------------------------------------------------------------------}
    {========================Don't touch Below this!===============================}
    {------------------------------------------------------------------------------}
    end;

    procedure SetupScript
    Begin
    DeclarePlayers;
    LoginPlayer;
    InitPlayer;
    scriptOrder;
    end;

    procedure ScriptOrder;
    begin
    CheckRing;
    WalkToSmelter;
    SmeltBars;
    WalkToBank;
    BankBars;
    AntiRandoms;
    end,


    Procedure InitPlayer; // credits go to wizup for this, because i was sorta to lazy to make my own

    Var
    I: Integer;
    Begin
    For I := 1 To 5 Do
    If Not Players[CurrentPlayer].Booleans[I] Then
    Begin
    Case I Of
    1: SetGraphics(4, '', '' ,'', '', '', '', '', '');
    2: Retaliate(False);
    3: SetAudio(0, 0, 0, Mono);
    End;
    Players[CurrentPlayer].Booleans[I] := True;
    End;

    SetChat('on',1);
    SetChat('friends',2);
    SetChat('on',3);
    SetAngle(True);
    End;

    procedure WalkToSmelter;
    procedure SmeltBars;
    procedure WalkToBank;
    procedure Bank;


    function BankScreen: Boolean;
    begin
    Result := FindTextTPA(4106994, 20, 20, 22, 400, 45, 'Bank', upchars, Nothing);
    end;

    procedure DepositAll;
    begin
    if (BankScreen) then
    Deposit(1, 28, True);
    end;

    procedure AntiRandoms; // thank you for the example mickaliscious
    begin
    if not LoggedIn then Exit;
    FindNormalRandoms; // find random events
    if FindFight then RunTo('N',True); // if a fight is found, run to the north and run far (will

    procedure AntiBan;
    begin
    case random(100) of //do a random number so it won't always perform the antiban

    0: BoredHuman;
    1. HoverSkill('smithing', False);
    2: RandomSpam; //made up procedure to say random stuff
    3: AlmostLogout;
    end;
    end;

  2. #2
    Join Date
    Mar 2008
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Put it in SCAR tags like [SCAR ] [/SCAR ] without the spaces

  3. #3
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    here,

    SCAR Code:
    //phassy smelter
    //starts in bank...full inventory of iron ore(if using, start out with ring of forging equiped...
    //credits:
    //uses smart in ru5ture
    //in the future, mabye reflection
    //
    //
    //
    //
    //
    //

    {.include srl/srl.scar}
    {.include srl/srl/misc/Users.scar}


    Var Loads

    Const
    //loging setup
    LogoutEvery = 4;// loads to log out after

    //smart setup
    WorldNumber =44;//i preffer u not to use quickchat worlds, like 160

    //ring setup
    UseRing =true,//use ring of forgings (recomended; extra costi about 7gp per ore)well worth it and easy to buy

    procedure DeclarePlayers;
    begin
    HowManyPlayers := 1;//Change this accordinly
    NumberOfPlayers(HowManyPlayers);
    CurrentPlayer := 0;

    Players[0].Name :='';//Character Name
    Players[0].Pass := ''; //Character Pass
    Players[0].Nick := ''; //Nickname 3 - 4 Letter's of char name
    Players[0].Active := True; //Use player in script?

    {------------------------------------------------------------------------------}
    {========================Don't touch Below this!===============================}
    {------------------------------------------------------------------------------}
    end;

    procedure SetupScript
    Begin
    DeclarePlayers;
    LoginPlayer;
    InitPlayer;
    scriptOrder;
    end;

    procedure ScriptOrder;
    begin
    CheckRing;
    WalkToSmelter;
    SmeltBars;
    WalkToBank;
    BankBars;
    AntiRandoms;
    end,


    Procedure InitPlayer; // credits go to wizup for this, because i was sorta to lazy to make my own

    Var
    I: Integer;
    Begin
    For I := 1 To 5 Do
    If Not Players[CurrentPlayer].Booleans[i] Then
    Begin
    Case I Of
    1: SetGraphics(4, '', '' ,'', '', '', '', '', '');
    2: Retaliate(False);
    3: SetAudio(0, 0, 0, Mono);
    End;
    Players[CurrentPlayer].Booleans[i] := True;
    End;

    SetChat('on',1);
    SetChat('friends',2);
    SetChat('on',3);
    SetAngle(True);
    End;

    procedure WalkToSmelter;
    procedure SmeltBars;
    procedure WalkToBank;
    procedure Bank;


    function BankScreen: Boolean;
    begin
    Result := FindTextTPA(4106994, 20, 20, 22, 400, 45, 'Bank', upchars, Nothing);
    end;

    procedure DepositAll;
    begin
    if (BankScreen) then
    Deposit(1, 28, True);
    end;

    procedure AntiRandoms; // thank you for the example mickaliscious
    begin
    if not LoggedIn then Exit;
    FindNormalRandoms; // find random events
    if FindFight then RunTo('N',True); // if a fight is found, run to the north and run far (will

    procedure AntiBan;
    begin
    case random(100) of //do a random number so it won't always perform the antiban

    0: BoredHuman;
    1. HoverSkill('smithing', False);
    2: RandomSpam; //made up procedure to say random stuff
    3: AlmostLogout;
    end;
    end;

    and you need to put the procedure SetUpScript at the bottom, keep it the bottom most procedure, then the main loop or you will get compiling errors

    so heres a good an bad example:

    SCAR Code:
    program New;

    procedure blahblah;
    begin
      mmouse(100, 100);
    end;

    procedure CheckSomething;
    begin
      (SCAR procedure/funtion here);
    end;

    procedure DoSomething;
    begin
      blahblah;
      wait(5000);
    end;
    procedure setupscript;
    begin
      Declareplayer;
      DoSomething;
      terminatescript;
    end;

    begin
    setupscript;
    end.

    bad:
    SCAR Code:
    program New;


    procedure setupscript;
    begin
      Declareplayer;
      DoSomething;
      CheckSomething;
      terminatescript;
    end;

    procedure blahblah;
    begin
      mmouse(100, 100);
    end;

    procedure CheckSomething;
    begin
      writeln('checking something');
    end;

    procedure DoSomething;
    begin
      blahblah;
      wait(5000);
    end;


    begin
    setupscript;
    end.

  4. #4
    Join Date
    Oct 2007
    Location
    If (Online) then Loc := ('On comp') else Loc := ('Somewhere else!');
    Posts
    2,020
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    good start but wow realy bad standards but keep it up

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. my 1st firemaking script very general check it out
    By shaheerpak in forum First Scripts
    Replies: 14
    Last Post: 08-09-2008, 05:24 PM

Posting Permissions

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