Results 1 to 19 of 19

Thread: [First Script] Almost Done, Need Help with a few things please. 07 server

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

    Default [First Script] Almost Done, Need Help with a few things please. 07 server

    Its a Hunting Script, Its for using Falcon to get Spotted Kebbit, Burry there bones and drop there fur.

    So far I'm having trouble getting the bot to click on them, It just hovers on them, but doesn't click.
    Next, I need it to drop the fur and bury the bones. If you can help me with those things, I'll give you credit. I've tried so many times but can do it.

    My Hunting Script atm. Its for 07 server

    Simba Code:
    program Falcon;
    {$DEFINE SMART8}
    {$i srl/srl.simba}
    {$I P07Include.Simba}
    {$I SRL/srl/misc/SmartGraphics.simba}

    const
    SRLStats_Username = '';
    SRLStats_Password = '';
    Version           = '1.0';
    StartPlayer=  0;          
    NumbOfPlayers=  0;          


    procedure DeclarePlayers;
    var i:integer;
    begin
      NumberOfPlayers(1);
      CurrentPlayer := 0;
      for i := 0 to 1-1 do
        Players[i].BoxRewards  := ['ook', 'amp', 'oins'];

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

    end;

    Procedure Antiban;
    Begin
      Case Random(20000) Of

        0:
        Begin
          HoverSkill('Hunting', False);
          GameTab(Tab_Inv);
        End;
        1:
        Begin
          PickUpMouse;
          SleepAndMoveMouse(3000 + Random(500));
          PickUpMouse;
        End;
        2: ExamineInv;
        3:
        Begin
          RandomAngle(SRL_ANGLE_HIGH);
          SetAngle(SRL_ANGLE_HIGH);
        End;
        4:
        Begin
          GameTab(Tab_Stats);
          Wait(3000 + Random(500));
          GameTab(Tab_Inv);
        End;
        5:
        Begin
          HoverSkill('random', False);
          GameTab(Tab_Inv);
        End;

      End;
    End;

    Function SpottedKebbit:Boolean;
    var
      X, Y, PlusOne, SpottedCounter: Integer;
    begin
    FindNormalRandoms;
    PlusOne:= InvCount +2;
    If FindObjCustom(X, Y, ['Spotted', 'kebbit', 'D k'], [2111308, 1583159, 2309202, 1979206], 1) Then
    begin
    Writeln('Found the spotted Kebbit');
    GetMousePos( X, Y);
    Case Random(2) Of
     0: Mouse( X, Y, 5, 5, True);
     1: Begin
          Mouse( X, Y, 5, 5, False);
          WaitOption('Catch', 800);
          End;
        End;

        Repeat
        FindNormalRandoms;
        MarkTime(SpottedCounter);
        Antiban;
        Wait(100);
        If InvCount=Plusone Then
          Writeln('Caught One');
        Until (InvCount=Plusone) Or (TimeFromMark(SpottedCounter) > 5000)

       End;
    end;

    Procedure Dropkebbitfur;
    var
      X, Y, furDTM, I:Integer;
      SlotBox:TBox;
      furPattern:TIntegerArray;

    Begin

       furDTM := DTMFromString('mbQAAAHicY2VgYMhlYmBIAeIKIK6GsnUZGRgsgdgKiNWAWB6IHfSlgaoZ0TAmQFcBVwUAQlgDtQ==');
       furPattern:=[1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,24,28];

       For I:=0 To 27 Do
       Begin
          FindNormalRandoms;
          SlotBox:=InvBox (furPattern[I]);
          If FindDTM(furDTM,x,y,SlotBox.X1,SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
            Begin
           // MouseItem(furPattern[I],False);
              ChooseOption('Dro');
         end;
        end;


    end;

      begin
      SetupSRL;
      SetupP07Include;
      DeclarePlayers;
      ActivateClient;
      Wait(2000);


      Repeat;
        Antiban;
        SpottedKebbit;
        If InvFull Then

        Dropkebbitfur;
        Until(false);


      end.

    I got an error on this part, // MouseItem(furPattern[I],False);
    Last edited by alipotter890; 03-28-2013 at 07:09 PM. Reason: adding stuff

  2. #2
    Join Date
    Oct 2012
    Posts
    758
    Mentioned
    6 Post(s)
    Quoted
    282 Post(s)

    Default

    nice good job but you forget to free DTM which is too bad bro
    but please this is good script keep it up nice start

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

    Default

    Quote Originally Posted by Runehack123 View Post
    nice good job but you forget to free DTM which is too bad bro
    but please this is good script keep it up nice start
    how do i do that?

    Edit: Like this?


    procedure freeDTMs;
    begin
    freeDTM(furDTM);
    end;
    Last edited by alipotter890; 03-28-2013 at 07:07 PM.

  4. #4
    Join Date
    Oct 2012
    Posts
    758
    Mentioned
    6 Post(s)
    Quoted
    282 Post(s)

    Default

    look here themost useful post ever made he is a God legend and you know it
    http://villavu.com/forum/showthread.php?t=78418
    learn it live it love it

    the way things work in programming languages is that you call on memory but it also has to be freed otherwise there memory leaks and that means that memory is just used up and can never be used again.
    Memory leak is partly responsible for PC aging geting slower with age so right now I wouldn't run your script it might break down you are calling on DTM a lot in that repeat loop and never freeing.
    I would change fast but I don't think it will take you long if you read the link

  5. #5
    Join Date
    Nov 2011
    Location
    Sacramento, California
    Posts
    366
    Mentioned
    4 Post(s)
    Quoted
    85 Post(s)

    Default

    Quote Originally Posted by alipotter890 View Post
    how do i do that?

    Edit: Like this?


    procedure freeDTMs;
    begin
    freeDTM(furDTM);
    end;
    Then in your main loop put Addonterminate (freeDTMS);

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

    Default

    Thanks a lot lol, I tryed watching his videos, I figured out some.

  7. #7
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    When using MouseItem, the second parameter doesn't accept a boolean or a variant. Instead, it asks for the Integer type, thus you'd want to use the Mouse_Right constant (which represents an Integer) to get a right click action.

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

    Default

    I'm thinking of quiting, I'm tryed for 3 days..

  9. #9
    Join Date
    Nov 2011
    Location
    Sacramento, California
    Posts
    366
    Mentioned
    4 Post(s)
    Quoted
    85 Post(s)

    Default

    Quote Originally Posted by alipotter890 View Post
    I'm thinking of quiting, I'm tryed for 3 days..
    Don't quit! The more questions you ask, the more answers you'll get, and the more progresss you'll make! Just be patient with the questions

    Also, you're using the Mouse function which (I think) has been advised against. Why don't you try using MMouse, and then ClickMouse2(Mouse_Left) (once again, I think)

  10. #10
    Join Date
    Oct 2012
    Posts
    758
    Mentioned
    6 Post(s)
    Quoted
    282 Post(s)

    Default

    Quote Originally Posted by alipotter890 View Post
    I'm thinking of quiting, I'm tryed for 3 days..
    relax take a short break and then get back to it
    it just takes practice but it gets to natural after a while so don't worry

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

    Default

    All I want is to make it bot for me till level 63. If someone can help write the script for this community then It would be awesome, I might not be able to finish. If someone wants to work on it for me and finish it that would be cool. And he can get all the credit.

  12. #12
    Join Date
    Nov 2011
    Location
    Sacramento, California
    Posts
    366
    Mentioned
    4 Post(s)
    Quoted
    85 Post(s)

    Default

    Quote Originally Posted by alipotter890 View Post
    All I want is to make it bot for me till level 63. If someone can help write the script for this community then It would be awesome, I might not be able to finish. If someone wants to work on it for me and finish it that would be cool. And he can get all the credit.
    You've already made tremendous progress mate. You'll be able to finish it with no problem. I'm not forcing you or anything, but it would be a shame if you stopped right now

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

    Default

    Quote Originally Posted by sahibjs View Post
    You've already made tremendous progress mate. You'll be able to finish it with no problem. I'm not forcing you or anything, but it would be a shame if you stopped right now
    I know mate, Idk how to work some of them.

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

    Default

    Can someone help fix it for me?

  15. #15
    Join Date
    Apr 2012
    Location
    Melbourne, Australia
    Posts
    230
    Mentioned
    0 Post(s)
    Quoted
    59 Post(s)

    Default

    i'll put this in the script directory, you might get more feedback/help that way

  16. #16
    Join Date
    Apr 2013
    Location
    Minnesota
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    16 Post(s)

    Default

    I would love to help you out, but I'm not a member, and I have little experience with members, and scripting... I have been there before man, just go into the tutorials and research. If your patient with the community they will be patient with you also. Hang in there dude!

  17. #17
    Join Date
    Mar 2007
    Posts
    393
    Mentioned
    1 Post(s)
    Quoted
    98 Post(s)

    Default

    Quote Originally Posted by alipotter890 View Post
    I'm thinking of quiting, I'm tryed for 3 days..
    i don't have 07 includes so i can't test it
    Also I don't understand that pattern part maybe someone could explain this to me
    But try this:

    Simba Code:
    program Falcon;
    {$DEFINE SMART8}
    {$i srl/srl.simba}
    {$I P07Include.Simba}
    {$I SRL/srl/misc/SmartGraphics.simba}

    const
    SRLStats_Username = '';
    SRLStats_Password = '';
    Version           = '1.0';
    StartPlayer=  0;
    NumbOfPlayers=  0;


    procedure DeclarePlayers;
    var i:integer;
    begin
      NumberOfPlayers(1);
      CurrentPlayer := 0;
      for i := 0 to 0 do
        Players[i].BoxRewards  := ['ook', 'amp', 'oins'];

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

    end;

    Procedure Antiban;
    Begin
      Case Random(6) Of

        0:
        Begin
          HoverSkill('Hunting', False);
          GameTab(Tab_Inv);
        End;
        1:
        Begin
          PickUpMouse;
          SleepAndMoveMouse(3000 + Random(500));
          PickUpMouse;
        End;
        2: ExamineInv;
        3:
        Begin
          RandomAngle(SRL_ANGLE_HIGH);
          SetAngle(SRL_ANGLE_HIGH);
        End;
        4:
        Begin
          GameTab(Tab_Stats);
          Wait(3000 + Random(500));
          GameTab(Tab_Inv);
        End;
        5:
        Begin
          HoverSkill('random', False);
          GameTab(Tab_Inv);
        End;

      End;
    End;

    Function SpottedKebbit:Boolean;
    var
      X, Y, PlusOne, SpottedCounter: Integer;
    begin
    FindNormalRandoms;
    PlusOne:= InvCount +2;
    If FindObjCustom(X, Y, ['Spotted', 'kebbit', 'D k'], [2111308, 1583159, 2309202, 1979206], 1) Then
    begin
    Writeln('Found the spotted Kebbit');
    Case Random(2) Of
     0: Mouse( X, Y, 5, 5, mouse_left);
     1: Begin
          Mouse( X, Y, 5, 5, mouse_right);
          WaitOption('Catch', 800);
          End;
        End;

        Repeat
        FindNormalRandoms;
        MarkTime(SpottedCounter);
        Antiban;
        Wait(100);
        If InvCount=Plusone Then
          Writeln('Caught One');
        Until (InvCount=Plusone) Or (TimeFromMark(SpottedCounter) > 5000)

       End;
    end;

    Procedure Dropkebbitfur;
    var
      X, Y, furDTM, I:Integer;
      SlotBox:TBox;
      furPattern:TIntegerArray;

    Begin

       furDTM := DTMFromString('mbQAAAHicY2VgYMhlYmBIAeIKIK6GsnUZGRgsgdgKiNWAWB6IHfSlgaoZ0TAmQFcBVwUAQlgDtQ==');
     //  furPattern:=[1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,24,28];

     //  For I:=0 To 27 Do
     //  Begin
          FindNormalRandoms;
          SlotBox:=InvBox (furPattern[I]);
          If FindDTM(furDTM,x,y,SlotBox.X1,SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
            Begin
           // MouseItem(furPattern[I],False);
           mouse(x, y, 3, 3, mouse_right);
              WaitOption('Dro',500);
         end;
      //  end;
       freeDTM(furDTM);

    end;

      begin
      SetupSRL;
      SetupP07Include;
      DeclarePlayers;
      ActivateClient;
      Wait(2000);


      Repeat;
        Antiban;
        SpottedKebbit;
        If InvFull Then

        Dropkebbitfur;
        Until(false);


      end.
    Last edited by t4q; 04-27-2013 at 07:35 AM.

  18. #18
    Join Date
    Aug 2011
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    So far it looks good.

  19. #19
    Join Date
    Mar 2013
    Location
    Narnia
    Posts
    182
    Mentioned
    1 Post(s)
    Quoted
    62 Post(s)

    Default

    Quote Originally Posted by alipotter890 View Post
    Can someone help fix it for me?
    lol didn't realize someone else had a falconry script in the making xD
    ali if you're still active, you can take a look at my falconry script, which would probably answer your questions.
    Last edited by aaron126; 05-22-2013 at 02:45 PM.

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
  •