Page 1 of 2 12 LastLast
Results 1 to 25 of 29

Thread: Help with 1st script

  1. #1
    Join Date
    Apr 2012
    Location
    Portugal
    Posts
    144
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help with 1st script

    I need help to my first script... it will be an Al-Kharid Tanner. i've done this, but get some errors... can anyone teach me ?


    program ArrowShafter;
    //{$DEFINE SMART}
    {$i srl/srl.simba}

    {$IFDEF SMART}
    {$i srl/srl/misc/paintsmart.simba}
    {$ENDIF}

    procedure DeclarePlayers;
    begin
    HowManyPlayers := 1;
    NumberOfPlayers(HowManyPlayers);
    CurrentPlayer := 0;

    with Players[0] do
    begin
    Name := ''; // Username
    Pass := ''; // Password
    Active := True; // Set to true if you want to use Player 0
    end;
    end;

    procedure Antiban;
    begin
    if(not(LoggedIn))then Exit;
    begin
    case Random(100) of
    10: RandomRClick;
    30: PickUpMouse;
    50: RandomMovement;
    70: BoredHuman;
    89: ExamineInv;
    end;
    end;
    end;

    procedure Withraw ;
    var
    DTM, x, y : Integer;
    TP : TPoint;
    begin
    DTM := DTMFromString('78DA63E46566608863644006B5311E601A2 60' +
    'A001F210193');
    if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
    begin
    Mouse(x, y, 5, 5, mouse_Left);
    Wait(RandomRange(750, 900));
    if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
    Wait(RandomRange(750, 900));
    if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
    begin
    while(InvCount > 1)do
    begin
    AntiBan;
    Wait(RandomRange(250, 500));
    end;
    end;
    end;
    FreeDTM(DTM);
    end;
    procedure takeall ;
    var
    DTM, x, y : Integer;
    TP : TPoint;
    begin
    DTM := DTMFromString('78DA633464666078CAC8800C562D5A04A66 1A' +
    '200403C030B');
    if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
    begin
    Mouse(x, y, 5, 5, mouse_Left);
    Wait(RandomRange(750, 900));
    if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
    Wait(RandomRange(750, 900));
    if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
    begin
    while(InvCount > 1)do
    begin
    AntiBan;
    Wait(RandomRange(250, 500));
    end;
    end;
    end;
    FreeDTM(DTM);
    end;
    procedure Walk ;
    var
    DTM, x, y : Integer;
    TP : TPoint;
    begin
    DTM := DTMFromString('78DA63CC646160C861644006FD09F6601A2 60' +
    'A002E67020B');
    if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
    begin
    Mouse(x, y, 5, 5, mouse_Left);
    Wait(RandomRange(750, 900));
    if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
    Wait(RandomRange(750, 900));
    if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
    begin
    while(InvCount > 1)do
    begin
    AntiBan;
    Wait(RandomRange(250, 500));
    end;
    end;
    end;
    FreeDTM(DTM);
    end;
    procedure Findtannery ;
    var
    DTM, x, y : Integer;
    TP : TPoint;
    begin
    DTM := DTMFromString('78DA63CC656160B064644006CB2B43C0344 C1' +
    '4002CE30222');
    if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
    begin
    Mouse(x, y, 5, 5, mouse_Left);
    Wait(RandomRange(750, 900));
    if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
    Wait(RandomRange(750, 900));
    if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
    begin
    while(InvCount > 1)do
    begin
    AntiBan;
    Wait(RandomRange(250, 500));
    end;
    end;
    end;
    FreeDTM(DTM);
    end.

    if (findobjcustom(x,y,['Ellis'],[5593203] then

    procedure Trade ;
    var
    DTM, x, y : Integer;
    TP : TPoint;
    begin
    DTM := DTMFromString('78DA63646666602866644006A55161601A2 60' +
    'A00207401A2');
    if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
    begin
    Mouse(x, y, 5, 5, mouse_Left);
    Wait(RandomRange(750, 900));
    if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
    Wait(RandomRange(750, 900));
    if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
    begin
    while(InvCount > 1)do
    begin
    AntiBan;
    Wait(RandomRange(250, 500));
    end;
    end;
    end;
    FreeDTM(DTM);
    end.
    procedure Tan-Hides ;
    var
    DTM, x, y : Integer;
    TP : TPoint;
    begin
    DTM := DTMFromString('78DA63DCC8C4C030879101191C3BB1054CC 34' +
    '4014DB90395');
    if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
    begin
    Mouse(x, y, 5, 5, mouse_Left);
    Wait(RandomRange(750, 900));
    if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
    Wait(RandomRange(750, 900));
    if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
    begin
    while(InvCount > 1)do
    begin
    AntiBan;
    Wait(RandomRange(250, 500));
    end;
    end;
    end;
    FreeDTM(DTM);
    end.

    procedure Takeall ;
    var
    DTM, x, y : Integer;
    TP : TPoint;
    begin
    DTM := DTMFromString('78DA63D46462604860644006EFEFDC02D33 05' +
    '10039AD0334');
    if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
    begin
    Mouse(x, y, 5, 5, mouse_Left);
    Wait(RandomRange(750, 900));
    if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
    Wait(RandomRange(750, 900));
    if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
    begin
    while(InvCount > 1)do
    begin
    AntiBan;
    Wait(RandomRange(250, 500));
    end;
    end;
    end;
    FreeDTM(DTM);
    end.
    procedure backtobank ;
    var
    DTM, x, y : Integer;
    TP : TPoint;
    begin
    DTM := DTMFromString('78DA63FCC2CCC0E0CDC8800CD6CE2A04D33 05' +
    '100454902FE');
    if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
    begin
    Mouse(x, y, 5, 5, mouse_Left);
    Wait(RandomRange(750, 900));
    if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
    Wait(RandomRange(750, 900));
    if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
    begin
    while(InvCount > 1)do
    begin
    AntiBan;
    Wait(RandomRange(250, 500));
    end;
    end;
    end;
    FreeDTM(DTM);
    end.
    procedure backtobank ;
    var
    DTM, x, y : Integer;
    TP : TPoint;
    begin
    DTM := DTMFromString('78DA639464616050676440065B16BB82699 82' +
    '80021AD01E4');
    if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
    begin
    Mouse(x, y, 5, 5, mouse_Left);
    Wait(RandomRange(750, 900));
    if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
    Wait(RandomRange(750, 900));
    if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
    begin
    while(InvCount > 1)do
    begin
    AntiBan;
    Wait(RandomRange(250, 500));
    end;
    end;
    end;
    FreeDTM(DTM);
    end.
    rocedure takeall ;
    var
    DTM, x, y : Integer;
    TP : TPoint;
    begin
    DTM := DTMFromString('78DA633464666078CAC8800C562D5A04A66 1A' +
    '200403C030B');
    if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
    begin
    Mouse(x, y, 5, 5, mouse_Left);
    Wait(RandomRange(750, 900));
    if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
    Wait(RandomRange(750, 900));
    if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
    begin
    while(InvCount > 1)do
    begin
    AntiBan;
    Wait(RandomRange(250, 500));
    end;
    end;
    end;
    FreeDTM(DTM);
    end;

    repeat

    until(not logged in) Then(exit)





    procedure MainLoop;
    begin
    end;

    begin
    {$IFDEF SMART}
    Smart_Server := 0;
    Smart_Members := True;
    Smart_Signed := True;
    Smart_SuperDetail := False;
    {$ENDIF}
    SetupSRL();
    ClearDebug();
    DeclarePlayers();
    LoginPlayer();
    MainLoop();
    end.

  2. #2
    Join Date
    Mar 2012
    Location
    Canada
    Posts
    870
    Mentioned
    1 Post(s)
    Quoted
    5 Post(s)

    Default

    Use simba tag
    Simba Code:
    [*simba][*/simba]

    (remove *)

    No way I'm reading this in its current form. My eye are starting to bleed.
    My scripts:
    Advanced Barb Agility Course(outdated), MonkeyThieverV0.11, MahoganyTableV0.4(outdated)
    Questions? I bet that for 98% of those, you'll find answer HERE

  3. #3
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    u should NEVER end a procedure with a "." (full-stop). "." is only reserved for the mainloop (at the very end of ur script). So replace all "end." with "end;" in procedures should fix most errors.

    Also why some of ur codes just appear out of nowhere?
    eg: line 134.

    And i would advise that you read up on standards, its better to start using good standards right from start than to fix all of them later on.

  4. #4
    Join Date
    Jan 2012
    Posts
    296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Put simba tag please, or nobody going to read your script
    Sorry for my bad english, i'm french

  5. #5
    Join Date
    Apr 2012
    Location
    Portugal
    Posts
    144
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Simba Code:
    program ArrowShafter;
    //{$DEFINE SMART}
    {$i srl/srl.simba}

    {$IFDEF SMART}
        {$i srl/srl/misc/paintsmart.simba}
    {$ENDIF}

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      with Players[0] do
      begin
        Name := ''; // Username
        Pass := ''; // Password
        Active := True; // Set to true if you want to use Player 0
      end;
    end;

    procedure Antiban;
    begin
      if(not(LoggedIn))then Exit;
      begin
        case Random(100) of
          10: RandomRClick;
          30: PickUpMouse;
          50: RandomMovement;
          70: BoredHuman;
          89: ExamineInv;
        end;
      end;
    end;

    procedure Withraw ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
      DTM := DTMFromString('78DA63E46566608863644006B5311E601A260' +
        'A001F210193');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;
    procedure takeall ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
        DTM := DTMFromString('78DA633464666078CAC8800C562D5A04A661A' +
        '200403C030B');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;
    procedure Walk ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
          DTM := DTMFromString('78DA63CC646160C861644006FD09F6601A260' +
        'A002E67020B');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;
    procedure Findtannery ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
            DTM := DTMFromString('78DA63CC656160B064644006CB2B43C0344C1' +
        '4002CE30222');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
      end.

    if (findobjcustom(x,y,['Ellis'],[5593203] then

    procedure Trade ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
            DTM := DTMFromString('78DA63646666602866644006A55161601A260' +
        'A00207401A2');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
      end.
      procedure Tan-Hides ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
           DTM := DTMFromString('78DA63DCC8C4C030879101191C3BB1054CC34' +
        '4014DB90395');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
      end.

        procedure Takeall ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
             DTM := DTMFromString('78DA63D46462604860644006EFEFDC02D3305' +
        '10039AD0334');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
      end.
       procedure backtobank ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
        DTM := DTMFromString('78DA63FCC2CCC0E0CDC8800CD6CE2A04D3305' +
        '100454902FE');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
      end.
       procedure backtobank ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
          DTM := DTMFromString('78DA639464616050676440065B16BB8269982' +
        '80021AD01E4');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
      end.
      rocedure takeall ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
        DTM := DTMFromString('78DA633464666078CAC8800C562D5A04A661A' +
        '200403C030B');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;

    repeat

    until(not logged in)  Then(exit)





    procedure MainLoop;
    begin
    end;

    begin
      {$IFDEF SMART}
        Smart_Server := 0;
        Smart_Members := True;
        Smart_Signed := True;
        Smart_SuperDetail := False;
      {$ENDIF}
      SetupSRL();
      ClearDebug();
      DeclarePlayers();
      LoginPlayer();
      MainLoop();
    end.

  6. #6
    Join Date
    Apr 2012
    Location
    Portugal
    Posts
    144
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by riwu View Post
    u should NEVER end a procedure with a "." (full-stop). "." is only reserved for the mainloop (at the very end of ur script). So replace all "end." with "end;" in procedures should fix most errors.

    Also why some of ur codes just appear out of nowhere?
    eg: line 134.

    And i would advise that you read up on standards, its better to start using good standards right from start than to fix all of them later on.
    at line 134 i done that to find a moving NPC, but i'm starting scripting... that's why my fails :P

  7. #7
    Join Date
    Feb 2012
    Location
    SRL Jail
    Posts
    1,319
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This looks like a copy and paste from Kyle Undefind's Tutorial on "how make your first simple script"... if it is, put in creds

  8. #8
    Join Date
    Apr 2012
    Location
    Portugal
    Posts
    144
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by JOEbot View Post
    This looks like a copy and paste from Kyle Undefind's Tutorial on "how make your first simple script"... if it is, put in creds
    Yes, some parts are....

  9. #9
    Join Date
    Dec 2011
    Location
    Nj
    Posts
    2,341
    Mentioned
    1 Post(s)
    Quoted
    18 Post(s)

    Default

    Mother of god... Can't even figure out what you want!

    Compile it, if there are errors, post. Il look at it then!

    Joey Out!

    For the basics of the basics of pascal, try my TuT. ||Photoshop Editing ||MapleResourceDung Script || Book a flight! BuySellTrip

  10. #10
    Join Date
    Apr 2012
    Location
    Portugal
    Posts
    144
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by joeygupta View Post
    Mother of god... Can't even figure out what you want!

    Compile it, if there are errors, post. Il look at it then!

    Joey Out!
    Simba Code:
    [Hint] C:\Simba\Includes\SRL/SRL/core/mapwalk.simba(1353:3): Variable 'BOX' never used at line 1352
    [Error] (135:19): Unknown identifier 'x' at line 134

  11. #11
    Join Date
    Feb 2012
    Posts
    168
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm guessing part of the error has to do with:

    if (findobjcustom(x,y,['Ellis'],[5593203] then
    It's missing an end bracket, and it has no begin/end/thing to do if it is true?

  12. #12
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Man I hate not being a mod. Wrong section.

    Anyways this should compile:
    Simba Code:
    program ArrowShafter;
    //{$DEFINE SMART}
    {$i srl/srl.simba}

    {$IFDEF SMART}
        {$i srl/srl/misc/paintsmart.simba}
    {$ENDIF}

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      with Players[0] do
      begin
        Name := ''; // Username
        Pass := ''; // Password
        Active := True; // Set to true if you want to use Player 0
      end;
    end;

    procedure Antiban;
    begin
      if(not(LoggedIn))then Exit;
      begin
        case Random(100) of
          10: RandomRClick;
          30: PickUpMouse;
          50: RandomMovement;
          70: BoredHuman;
          89: ExamineInv;
        end;
      end;
    end;

    procedure Withraw ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
      DTM := DTMFromString('78DA63E46566608863644006B5311E601A260' +
        'A001F210193');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;
    procedure takeallOne;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
        DTM := DTMFromString('78DA633464666078CAC8800C562D5A04A661A' +
        '200403C030B');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;
    procedure Walk ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
          DTM := DTMFromString('78DA63CC646160C861644006FD09F6601A260' +
        'A002E67020B');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;
    procedure Findtannery ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
            DTM := DTMFromString('78DA63CC656160B064644006CB2B43C0344C1' +
        '4002CE30222');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;

    procedure Trade ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
            DTM := DTMFromString('78DA63646666602866644006A55161601A260' +
        'A00207401A2');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;

    procedure TanHides;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
           DTM := DTMFromString('78DA63DCC8C4C030879101191C3BB1054CC34' +
        '4014DB90395');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;

    procedure TakeallTwo;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
             DTM := DTMFromString('78DA63D46462604860644006EFEFDC02D3305' +
        '10039AD0334');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
      end;

    procedure backtobank ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
        DTM := DTMFromString('78DA63FCC2CCC0E0CDC8800CD6CE2A04D3305' +
        '100454902FE');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;

    procedure backtobanktwo;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
          DTM := DTMFromString('78DA639464616050676440065B16BB8269982' +
        '80021AD01E4');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;

    procedure takeall ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
        DTM := DTMFromString('78DA633464666078CAC8800C562D5A04A661A' +
        '200403C030B');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;


    procedure MainLoop;
    begin
    end;

    begin
      {$IFDEF SMART}
        Smart_Server := 0;
        Smart_Members := True;
        Smart_Signed := True;
        Smart_SuperDetail := False;
      {$ENDIF}
      SetupSRL();
      ClearDebug();
      DeclarePlayers();
      LoginPlayer();
      MainLoop();
    end.

    Mistakes you were making:
    - Naming two procedures exactly the same
    - Leaving a space before putting a semicolon.
    - Putting full stops after your ends, the only full stop you use is one the final end of the entire script
    - Random lines of code between procedures

  13. #13
    Join Date
    Apr 2012
    Location
    Portugal
    Posts
    144
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by abu_jwka View Post
    Man I hate not being a mod. Wrong section.

    Anyways this should compile:
    Simba Code:
    program ArrowShafter;
    //{$DEFINE SMART}
    {$i srl/srl.simba}

    {$IFDEF SMART}
        {$i srl/srl/misc/paintsmart.simba}
    {$ENDIF}

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      with Players[0] do
      begin
        Name := ''; // Username
        Pass := ''; // Password
        Active := True; // Set to true if you want to use Player 0
      end;
    end;

    procedure Antiban;
    begin
      if(not(LoggedIn))then Exit;
      begin
        case Random(100) of
          10: RandomRClick;
          30: PickUpMouse;
          50: RandomMovement;
          70: BoredHuman;
          89: ExamineInv;
        end;
      end;
    end;

    procedure Withraw ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
      DTM := DTMFromString('78DA63E46566608863644006B5311E601A260' +
        'A001F210193');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;
    procedure takeallOne;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
        DTM := DTMFromString('78DA633464666078CAC8800C562D5A04A661A' +
        '200403C030B');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;
    procedure Walk ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
          DTM := DTMFromString('78DA63CC646160C861644006FD09F6601A260' +
        'A002E67020B');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;
    procedure Findtannery ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
            DTM := DTMFromString('78DA63CC656160B064644006CB2B43C0344C1' +
        '4002CE30222');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;

    procedure Trade ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
            DTM := DTMFromString('78DA63646666602866644006A55161601A260' +
        'A00207401A2');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;

    procedure TanHides;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
           DTM := DTMFromString('78DA63DCC8C4C030879101191C3BB1054CC34' +
        '4014DB90395');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;

    procedure TakeallTwo;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
             DTM := DTMFromString('78DA63D46462604860644006EFEFDC02D3305' +
        '10039AD0334');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
      end;

    procedure backtobank ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
        DTM := DTMFromString('78DA63FCC2CCC0E0CDC8800CD6CE2A04D3305' +
        '100454902FE');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;

    procedure backtobanktwo;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
          DTM := DTMFromString('78DA639464616050676440065B16BB8269982' +
        '80021AD01E4');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;

    procedure takeall ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
        DTM := DTMFromString('78DA633464666078CAC8800C562D5A04A661A' +
        '200403C030B');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;


    procedure MainLoop;
    begin
    end;

    begin
      {$IFDEF SMART}
        Smart_Server := 0;
        Smart_Members := True;
        Smart_Signed := True;
        Smart_SuperDetail := False;
      {$ENDIF}
      SetupSRL();
      ClearDebug();
      DeclarePlayers();
      LoginPlayer();
      MainLoop();
    end.

    Mistakes you were making:
    - Naming two procedures exactly the same
    - Leaving a space before putting a semicolon.
    - Putting full stops after your ends, the only full stop you use is one the final end of the entire script
    - Random lines of code between procedures
    Thank you so much ! now to finish the script to can use, what i need to do now ?

  14. #14
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    Quote Originally Posted by abu_jwka View Post
    Man I hate not being a mod. Wrong section.

    Anyways this should compile:
    Simba Code:
    program ArrowShafter;
    //{$DEFINE SMART}
    {$i srl/srl.simba}

    {$IFDEF SMART}
        {$i srl/srl/misc/paintsmart.simba}
    {$ENDIF}

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      with Players[0] do
      begin
        Name := ''; // Username
        Pass := ''; // Password
        Active := True; // Set to true if you want to use Player 0
      end;
    end;

    procedure Antiban;
    begin
      if(not(LoggedIn))then Exit;
      begin
        case Random(100) of
          10: RandomRClick;
          30: PickUpMouse;
          50: RandomMovement;
          70: BoredHuman;
          89: ExamineInv;
        end;
      end;
    end;

    procedure Withraw ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
      DTM := DTMFromString('78DA63E46566608863644006B5311E601A260' +
        'A001F210193');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;
    procedure takeallOne;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
        DTM := DTMFromString('78DA633464666078CAC8800C562D5A04A661A' +
        '200403C030B');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;
    procedure Walk ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
          DTM := DTMFromString('78DA63CC646160C861644006FD09F6601A260' +
        'A002E67020B');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;
    procedure Findtannery ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
            DTM := DTMFromString('78DA63CC656160B064644006CB2B43C0344C1' +
        '4002CE30222');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;

    procedure Trade ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
            DTM := DTMFromString('78DA63646666602866644006A55161601A260' +
        'A00207401A2');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;

    procedure TanHides;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
           DTM := DTMFromString('78DA63DCC8C4C030879101191C3BB1054CC34' +
        '4014DB90395');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;

    procedure TakeallTwo;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
             DTM := DTMFromString('78DA63D46462604860644006EFEFDC02D3305' +
        '10039AD0334');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
      end;

    procedure backtobank ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
        DTM := DTMFromString('78DA63FCC2CCC0E0CDC8800CD6CE2A04D3305' +
        '100454902FE');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;

    procedure backtobanktwo;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
          DTM := DTMFromString('78DA639464616050676440065B16BB8269982' +
        '80021AD01E4');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;

    procedure takeall ;
    var
      DTM, x, y : Integer;
      TP : TPoint;
    begin
        DTM := DTMFromString('78DA633464666078CAC8800C562D5A04A661A' +
        '200403C030B');
      if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
      begin
        Mouse(x, y, 5, 5, mouse_Left);
        Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'nife', StatChars, ClickLeft))then
          Wait(RandomRange(750, 900));
        if(FindTextTPAEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, TP.X, TP.Y, 'et of', StatChars, ClickLeft))then
        begin
          while(InvCount > 1)do
          begin
            AntiBan;
            Wait(RandomRange(250, 500));
          end;
        end;
      end;
      FreeDTM(DTM);
    end;


    procedure MainLoop;
    begin
    end;

    begin
      {$IFDEF SMART}
        Smart_Server := 0;
        Smart_Members := True;
        Smart_Signed := True;
        Smart_SuperDetail := False;
      {$ENDIF}
      SetupSRL();
      ClearDebug();
      DeclarePlayers();
      LoginPlayer();
      MainLoop();
    end.

    Mistakes you were making:
    - Naming two procedures exactly the same
    - Leaving a space before putting a semicolon.
    - Putting full stops after your ends, the only full stop you use is one the final end of the entire script
    - Random lines of code between procedures
    You shouldn't feed him like that, now he will just expect people to finish the script for him. Tell him the mistakes, and let him fix it himself.

    Quote Originally Posted by catanado15 View Post
    Thank you so much ! now to finish the script to can use, what i need to do now ?
    I suggest u dont try to jump into making a script when u have not even learn the basics.
    Read through basic tutorials such as http://villavu.com/forum/showthread.php?t=58935, then maybe start making some basic flash game scripts, and slowly learn to script for rs and use advance functions.

    Its like learning a new maths topic, understand the basic concepts first before
    jumping into doing a question!

  15. #15
    Join Date
    Feb 2012
    Location
    SRL Jail
    Posts
    1,319
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by catanado15 View Post
    Yes, some parts are....
    SNIPE Well you should put in credits, or at least ask him for permission.

  16. #16
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Quote Originally Posted by riwu View Post
    You shouldn't feed him like that, now he will just expect people to finish the script for him. Tell him the mistakes, and let him fix it himself.
    Meh, I was bored

    Also, if he expects people to finish off his scripts then he isn't going to get very far...

  17. #17
    Join Date
    Oct 2011
    Location
    Chicago
    Posts
    3,352
    Mentioned
    21 Post(s)
    Quoted
    437 Post(s)

    Default

    Quote Originally Posted by abu_jwka View Post
    Meh, I was bored

    Also, if he expects people to finish off his scripts then he isn't going to get very far...
    I was going to do the same thing, so don't worry.
    Yeah it is true, people only help to a certain degree (And this was fine).




    Anti-Leech Movement Prevent Leeching Spread the word
    Insanity 60 Days (Killer workout)
    XoL Blog (Workouts/RS/Misc)

  18. #18
    Join Date
    Apr 2012
    Location
    Portugal
    Posts
    144
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by abu_jwka View Post
    Meh, I was bored

    Also, if he expects people to finish off his scripts then he isn't going to get very far...
    No, i don't want ppl to finish my scripts.... I've read all tutorials, but the only eg. that they give are powermine or powerchop.... Nothing like banking, finding NPC's....

  19. #19
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Quote Originally Posted by catanado15 View Post
    No, i don't want ppl to finish my scripts.... I've read all tutorials, but the only eg. that they give are powermine or powerchop.... Nothing like banking, finding NPC's....
    You should try taking advantage of the SRL Include....

    On Simba, there's a functions list. Type in part of a function you want to look for, for example 'bank' and you will be shown all the different functions that help you bank. Such as OpenBankFast.

    You'll be surprised how much time the SRL include could save you...

  20. #20
    Join Date
    Apr 2012
    Location
    Portugal
    Posts
    144
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by abu_jwka View Post
    You should try taking advantage of the SRL Include....

    On Simba, there's a functions list. Type in part of a function you want to look for, for example 'bank' and you will be shown all the different functions that help you bank. Such as OpenBankFast.

    You'll be surprised how much time the SRL include could save you...
    Finally a good answer ;D thank you again :P I'm reading the site that is on the post

  21. #21
    Join Date
    Feb 2012
    Location
    SRL Jail
    Posts
    1,319
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by abu_jwka View Post
    Meh, I was bored

    Also, if he expects people to finish off his scripts then he isn't going to get very far...
    I started my scripting from somebodys script, then compared... a finished script with proper standards WILL get you farther than doing it wrong yourself

  22. #22
    Join Date
    Apr 2012
    Location
    Portugal
    Posts
    144
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Can anyone tell me how to walk ? walk using DTM's ?

  23. #23
    Join Date
    Feb 2012
    Location
    SRL Jail
    Posts
    1,319
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by catanado15 View Post
    Can anyone tell me how to walk ? walk using DTM's ?
    You mean DDTMs

  24. #24
    Join Date
    Mar 2012
    Location
    Over there
    Posts
    840
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    DTM Walking(chapter 4)

    ObjDTMs

    Use whichever you want depending on where you are walking.

  25. #25
    Join Date
    Apr 2012
    Location
    Portugal
    Posts
    144
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Simba Code:
    program new;
    {$DEFINE SMART}
    {$i SRL\SRL.simba}
    {$i sps\sps.simba}

    procedure DeclarePlayers;
    begin
      HowManyPlayers:= 1;
      CurrentPlayer:= 0;

      Players[0].Name:= '';
      Players[0].Pass:= '';
      Players[0].Active:= True;
      end;


     var
      MyPath:TpointArray;

     begin
     SPS_SETUP(RUNESCAPE_SURFACE,['12_9']);
     myPath := [Point(113, 396), Point(144, 359), Point(165, 320), Point(136, 296)];
     SPS_WalkPath(mypath);
     end;
    begin
      Smart_Server:= 35;
      Smart_Members:= False;
      Smart_Signed:= True;
      Smart_SuperDetail:= False;

      ClearDebug;
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
    end.

    I've done this, but it gives me some errors...

    Simba Code:
    [Hint] C:\Simba\Includes\SRL/SRL/core/mapwalk.simba(1353:3): Variable 'BOX' never used at line 1352
    [Error] (25:5): period ('.') expected at line 24
    Compiling failed.

    Any1 can help me plz ? i want to start scripting :x

Page 1 of 2 12 LastLast

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
  •