Results 1 to 5 of 5

Thread: Is this any good?

  1. #1
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Is this any good?

    Considering I want some scripts and there none I'll have to code some. Before I begin my project : can someone verify that this script skeleton is okay?
    Simba Code:
    program bot;
    {$DEFINE SMART}
    {$i srl\srl.scar}
    {$i reflection\reflection.simba}
    {$i srl/srl/misc/PaintSmart.scar}

    const
      WORLD = 32;
      MEMBERS = false;
      SIGNED = true;

    var
      Break: Integer;
      MyStatus: String;

    //Proggy Vars
    var
      Item: Integer;
      ExpGain: Integer;

    procedure DeclarePlayers;
    begin

      HowManyPlayers := 2; //How many players in the script.
      CurrentPlayer := 0; //Current player in the Players array.
      NumberOfPlayers(HowManyPlayers); //Don't change.

      with Players[0] do
      begin
        Name := ''; {Username}
        Pass := ''; {Password}
        Active := True; {Use This Player?}

        Integers[0] := 0; //How long until you sleep in minutes?
        Strings[0] := ''; //What skill do you want it to check?
        Booleans[0] := False; //Using -?
      end;

      with Players[1] do
      begin
        Name := ''; {Username}
        Pass := ''; {Password}
        Active := False; {Use This Player?}

        Integers[0] := 0;
        Strings[0] := '';
        Booleans[0] := False;
      end;
    end;

    Procedure AntiBan;
    var
      c: Integer;
    begin
      MyStatus := 'Antiban';
      c := random(500);
      if (c = 100) or (c = 500) then
      case random(3) of
        0:
          RandomMovement;
        1:
          PickUpMouse;
        2:
          HoverSkill(Players, False);
      end;
    end;

    Procedure Randoms;
    begin
      r_FindRandoms;
      Writeln('Scanned for randoms.');
    end;

    procedure ClearSmart;
    var
      drawing : TBitmap;
    begin
      drawing := TBitmap.Create;
      drawing.canvas.handle := SmartGetDebugDC;

      ClearRSCanvas(drawing.canvas);

      try
        FreeBitmap(drawing);
      except end;
    end;

    Procedure ScriptSetup;
    begin
      Writeln('Setting script up!');
    end;

    procedure SMARTProggy;
    begin
      ClearSmart;
      SMART_DrawText(95, 460, 'FriendChars', 'Our Script', clRed);
      SMART_DrawText(400, 305, 'CharsNPC', MyStatus, clGreen);
    end;

    Procedure Proggy;
    var
      Time: Integer;
    begin
      Writeln('Our Script.');
      Writeln('We get ' + ToStr((GetTimeRunning/3600000) * ExpGain) + ' xp per hour');
    end;

    Procedure TakeBreak;
    var
      c: Integer;
    begin
      MyStatus := 'Sleeping';
      SMARTProggy;
      Writeln('Sleeping...');
      case random(2) of
        0:
          LogOut;
        1:
          ExitToLobby;
      end;
      c := RandomRange(60000, 7200000); //1 minute to 120 minutes
      Writeln('Sleeping for ' + IntToStr(c/60000) + ' minutes.');
      Wait(c);
      Writeln('Sleep over! Logging in.');
      MyStatus := 'Logging in';
      SMARTProggy;
      LogInPlayer;
    end;

    begin
      AddOnTerminate('Proggy');
      Smart_Members := MEMBERS;
      Smart_Server := WORLD;
      Smart_Signed := SIGNED;

      SetupSRL;
      SetupReflectionEx(true);
      DeclarePlayers;
      LoginPlayer;
      ScriptSetup;
      MarkTime(Break);
      ClearDebug;
      SMARTProggy;
      repeat
        if (not(LoggedIn)) then
          NextPlayer(False);
        if TimeFromMark(Break) > (Players[CurrentPlayer].Integers[0]+random(20) * 60000) then
          TakeBreak;
      until(AllPlayersInActive);
    end.
    It supports multiplayer, SMART & debug proggies, reflection, randoms/antiban, and breaks.

  2. #2
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Well it doesn't really show the important stuff, like how you're gonna manage.. anything that's not graphical. Which is pretty important.

  3. #3
    Join Date
    Oct 2008
    Posts
    500
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Nothing wrong that I see with that, but you don't technically have anything started.

    Definitely something to start with though.

  4. #4
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Well until I start work on the scripts I can't do much. I was just wondering if i was doing the bare basics correctly. Would be horrible to mess up in the beginning.

  5. #5
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Its basic so im guessing so far its fine. The script is the real challenge.
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

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
  •