Results 1 to 10 of 10

Thread: Video Tutorial

  1. #1
    Join Date
    Dec 2011
    Posts
    484
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Video Tutorial

    I am watching YoHoJo's video here:

    http://www.youtube.com/watch?v=qfumZ...eature=related
    at 7:46

    and he types in findobj and selects FindObject etc. etc.

    When I type in findobj Only DTM's show up.

    Is the video outdated possibly? If so, what do I do?

  2. #2
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Video is not outdated
    What do you mean by only DTMs come up?
    Make sure you have included SRL at the top of the script!
    Type FindObj and then hold down control and tap space you should see a bunch.

  3. #3
    Join Date
    Dec 2011
    Posts
    484
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I put "findobj" in the search bar and a list of things comes up on the left. It goes DTM with an expanded list under it, as well as Script, Other, Math, Window, etc.

    Typing FindObj and holding down control and tapping space gives me "constant FindObj". But the result only pops up if I do that in the coding area.

    I have included SRL in the script, I double checked. Everything is also up to date.

    Edit: I uh, might have mistyped include when including SRL..my bad. *embarassed*
    Last edited by Grihmm; 12-28-2011 at 08:34 AM. Reason: My bad

  4. #4
    Join Date
    Dec 2011
    Posts
    484
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    At 10:17 of your video where you put in Antibans, can I put in different ones, and if so, how? If I go to the left index and click Includes>Antiban there are some procedures, would I put these in somehow?

  5. #5
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Example:
    Simba Code:
    Procedure Antiban;
    Begin
      Case Random(350) Of
        0: HoverSkill('Mining', False);
        1: Begin PickUpMouse; SleepAndMoveMouse(5000 + Random(500)); End;
        2: ExamineInv;
        3: RandomAngle(1);
        4: Begin GameTab(Tab_Stats); Wait(1500 + Random(500)); GameTab(Tab_Inv); End;
        5: HoverSkill('random', False);
      End;
    End;

    To add more, just keep going after the '5'

    Simba Code:
    Procedure Antiban;
    Begin
      Case Random(350) Of
        0: HoverSkill('Mining', False);
        1: Begin PickUpMouse; SleepAndMoveMouse(5000 + Random(500)); End;
        2: ExamineInv;
        3: RandomAngle(1);
        4: Begin GameTab(Tab_Stats); Wait(1500 + Random(500)); GameTab(Tab_Inv); End;
        5: HoverSkill('random', False);
        6: More Antiban
        7: More Antiban
        8: More Antiban
      End;
    End;

    Make sure if the antiban you put is more than just one function, to have a begin and end before/after the code like

    Simba Code:
    Procedure Antiban;
    Begin
      Case Random(350) Of
        0: Begin
              HoverSkill('Mining', False);
              MMouse(Random(MSX2), Random(MSY2), 0, 0);
              WriteLn('weeeeeeeee');
              MakeCompass('E');
           End;
      End;
    End;

    Good luck.

  6. #6
    Join Date
    Dec 2011
    Posts
    484
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    After I click Compile another tab opens in the coding section called "smart". It looks like this:

    {$DEFINE SRL_SMART}
    {$DEFINE SMART}
    {$ifdef Simba}
    {.loadlib libsmart}
    {$endif}

    {$ifdef Simba}
    function IsKeyDown(C:Byte): Boolean;
    begin
    Result := SmartIsKeyDown(C);
    end;
    {$else}
    function IsKeyDown(C:Char): Boolean;
    begin
    Result := SmartIsKeyDown(ord(c));
    end;
    {$endif}

    and it continues on.

    P. S. How do I put the above in a text box like you?
    Last edited by Grihmm; 12-28-2011 at 09:36 AM. Reason: My post looked sloppy.

  7. #7
    Join Date
    Dec 2011
    Posts
    392
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    P. S. How do I put the above in a text box like you?
    Use Simba Tags [ simba] TEXT HERE [ /simba ] No spaces though

  8. #8
    Join Date
    Dec 2011
    Location
    Memphis
    Posts
    46
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Post the whole scirpt around simba tags
    Simba Code:
    like this
    so we can see exactly what is going on. We can't help if we don't have a script to work with.

  9. #9
    Join Date
    Dec 2011
    Posts
    484
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This is my actual script I wrote. (Kinda. I took most of it from other scripts, but I am only trying to learn how at this point. Not releasing anything just yet.)
    Simba Code:
    program PowerChopper
    {$DEFINE SMART}
    {.include SRL\SRL.scar}
    {.Include SRL\SRL\Misc\Debug.SCAR}
    {$i SRL\SRL\Misc\Stats.simba}

    Const;
     BreakEvery = //How long the script will run until stopping.
     BreakFor = //How long until the script starts running again.
     SRLStats_Username = ''; // Your SRL Stats Username
     SRLStats_Password = ''; // Your SRL Stats Password
     NumbOfPlayers= 1;     //How many players are you using
     StartPlayer=   0;     //Player to start auoting with! (0 means first character)






    procedure DeclarePlayers;
    var i:integer;
    begin
      NumberOfPlayers(NumbOfPlayers);
      CurrentPlayer := StartPlayer;
      for i := 0 to NumbOfPlayers-1 do
        Players[i].BoxRewards  := ['XP'];

      with Players[0] do
      begin
        Name        := '';     //Player username.
        Pass        := '';     //Player password.
        Nick        := ''; //Player nickname - 3-4 letters of Player username.
        Active      := True;
        Integers[1] := 4;
        Integers[2] := 4;
      end;

    end;

    Procedure StatsGuise(wat:String);
    Begin
      Status(wat);
      Disguise(wat);
    End;

    Function CheckAndClick(X,Y:Integer):Boolean;
    Begin
      MMouse(x, y, 5, 5);
      {Wait(100 + Random(50));
      If CountUpColor('B', 41, 5, 86, 24, 70, 140) Then}

      If WaitUpTextMulti(['chop','tree'], 150) Then
      Begin
        Result:=True;
        GetMousePos(x, y);
        Mouse(x, y, 0, 0,True);
        Wait(100+Random(50));
        FFlag(0);
      End;
    End;

    Procedure Antiban;
    Begin
      Case Random(350) Of
        0: HoverSkill('Woodcut', False);
        1: Begin PickUpMouse; SleepAndMoveMouse(5000 + Random(500)); End;
        2: ExamineInv;
        3: RandomAngle(1);
        4: Begin GameTab(Tab_Stats); Wait(1500 + Random(500)); GameTab(Tab_Inv); End;
        5: HoverSkill('random', False);
      End;
    End;

    Function ChopDown;

    Var
      x, y:Integer;

    Begin
      If FindObjCustom(x, y, ['chop', 'down', 'tree', 'yew'], [1384993, 791058, 1384222, 1713957], 30) Then
      WriteLn('Look! A tree!');
    end;


    begin
      SetupSRL;
      DeclarePlayers;
      //Repeat
        Chopdown;
      //Until (False);
    end.

    And this is what pops open in another tab.
    Simba Code:
    {$DEFINE SRL_SMART}
    {$DEFINE SMART}
    {$ifdef Simba}
    {.loadlib libsmart}
    {$endif}

    {$ifdef Simba}
    function IsKeyDown(C:Byte): Boolean;
    begin
      Result := SmartIsKeyDown(C);
    end;
    {$else}
    function IsKeyDown(C:Char): Boolean;
    begin
      Result := SmartIsKeyDown(ord(c));
    end;
    {$endif}

    procedure MoveMouse(x, y: Integer);
    begin
      SmartMoveMouse(x, y);
    end;

    {$ifdef Simba}
    procedure HoldMouse(x, y: Integer; button : integer);
    begin
      if button = mouse_left then
        SmartHoldMousePlus(x,y,1)
      else if button = mouse_middle then
        SmartHoldMousePlus(x,y,2)
      else if button = mouse_right then
        SmartHoldMousePlus(x,y,3)
      else
        raiseexception(ercustomerror,'Unknown mouse button in SmartHoldMousePlus');
    end;

    procedure ReleaseMouse(x, y: Integer; button : integer);
    begin
      if button = mouse_left then
        SmartReleaseMousePlus(x,y,1)
      else if button = mouse_middle then
        SmartReleaseMousePlus(x,y,2)
      else if button = mouse_right then
        SmartReleaseMousePlus(x,y,3)
      else
        raiseexception(ercustomerror,'Unknown mouse button in SmartReleaseMousePlus');
    end;
    {$else}
    procedure HoldMouse(x, y: Integer; left: Boolean);
    begin
      SmartHoldMouse(x, y, left);
    end;

    procedure ReleaseMouse(x, y: Integer; left: Boolean);
    begin
      SmartReleaseMouse(x, y, left);
    end;
    {$endif}

    procedure KeyUp(key: Byte);
    begin
      If Key = 13 Then
        Key := 10;
      SmartReleaseKey(key);
    end;

    procedure KeyDown(key: Byte);
    begin
      If Key = 13 Then
        Key := 10;
      SmartHoldKey(key);
    end;

    procedure SendKeys(S: String);
    begin
      SmartSendKeys(S);
    end;

    procedure GetMousePos(var x, y: Integer);
    begin
      SmartGetMousePos(x, y);
    end;

    function GetColor(x, y: Integer): Integer;
    begin
      result:= SmartGetColor(x, y);
    end;

    procedure SmartSetTarget;
    {$ifdef Simba}
    begin
      SetTargetArray(SmartImageArray, 765,503);
    end;
    {$else}
    var
      Smart_Bitmap: Integer;
    begin
      Smart_Bitmap:= BitmapFromString(765,503,'');
      GetBitmapCanvas(Smart_Bitmap).Handle:= SmartGetDC;
      SetTargetBitmap(Smart_Bitmap);
      FreeBitmap(Smart_Bitmap);
    end;
    {$endif}

    function FindWindow(Title: String): Boolean;
    begin
      result:= true;
    end;

    procedure ActivateClient;
    begin
    end;

    function FindWindowBySize(Width, Height: Integer): Boolean;
    begin
      result:= true;
    end;

    {procedure SmartSaveSettings(v: TVariantArray);
    var
      i: Integer;
      ts: TStringArray;
    begin
      ts := ['server', 'members', 'signed', 'sd', 'DC', IncludePath + 'SRL/SRL/misc/smartINI.ini'];
      for i := 0 to 4 do
        WriteINI('SMART', ts[i], v[i], ts[5]);
    end;   }


    procedure SmartSetupEx(Server: integer; members, signed, superdetail: boolean);
    var
      prefix: string;
    begin
      {$IFDEF SIMBA}
      prefix := ReadINI('World' + IntToStr(Server), 'Prefix', IncludePath + 'SRL/SRL/misc/worlds.ini');
      {$ELSE}
      prefix := ReadINI('World' + IntToStr(Server), 'Prefix', {$IFDEF SCAR325_UP} IncludesPath {$ELSE} AppPath + 'Includes\' {$ENDIF} + 'SRL\SRL\misc\worlds.ini');
      {$ENDIF}
      if(prefix = '')then
      begin
        writeln('Invalid world number or corrupted world list. Please review your settings');
        TerminateScript;
      end;
      SmartSetup('http://'+prefix+'.runescape.com/', ',f5', 765, 503, 's');
      //SmartSaveSettings([Server, Members, Signed, SuperDetail, SmartGetDC]);
    end;

    {function SmartLastSettings: TStringArray;
    var
      i: Integer;
      ts: TStringArray;
    begin
      ts := ['server', 'members', 'signed', 'sd', 'DC', IncludePath + 'SRL/SRL/Misc/smartINI.ini'];
      SetLength(Result, 5);
      for i := 0 to 4 do
        Result[i] := ReadINI('SMART', ts[i], ts[5]);
    end; }


    {$ifndef Simba}
    Procedure SaveScreenshot(s : string);
    var
      TempBMP : integer;
      TempS : String;
    begin;
      Temps := s;
      While FileExists(Temps) do
      begin;
        Temps := ExtractFilePath(s) + Copy(ExtractFileName(Temps),1,LastPos('.',ExtractFileName(Temps))-1) + '2' + ExtractFileExt(s);
        Writeln(Temps);
      end;
      TempBMP := BitmapFromString(765,503,'');
      Try
        CopyClientToBitmap(TempBMP,0,0,765,503);
        SaveBitmap(TempBMP, Temps);
      Except
      end;
      FreeBitmap(TempBMP);
    end;
    {$endif}

    The tab is titled "smart"

  10. #10
    Join Date
    Dec 2011
    Posts
    392
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You need to remove
    Simba Code:
    {$DEFINE SMART}
    }

    In fact you probably only need
    {.include SRL\SRL.scar}

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
  •