Results 1 to 20 of 20

Thread: Chicken Killer

  1. #1
    Join Date
    Nov 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Chicken Killer

    Hello everyone, this is my first script, a simple chicken killer. It does not work as well as I want it to and I cannot figure out how to make it pick up feathers well but I hope to learn these things in time. Please post your feedback on it, thanks.

    SCAR Code:
    ////////////////////////////////////////////////////////////////////////////////
    //                           Electron Man Presents                            //
    //                                                                            //
    // Name: Chicken Killer                                                       //
    // Description: Finds and kills chickens. This program allows the user to     //
    //              choose which skills he/she would like to train, or they can   //
    //              have the program choose the lowest skill.                     //
    // Date: 11/12/07                                                             //
    //                                                                            //
    // Directions:                                                                //
    //    1) Target the Runescape Client with the cross hairs.                    //
    //    2) Fill out player info in lines 39 - 71.                               //
    //    3) Change lines 26 and 27 if you want to change the settings.           //
    //    4) Make sure all players are by some chickens.                          //
    //    5) Press play.                                                          //
    ////////////////////////////////////////////////////////////////////////////////

    program ChickenKiller;
         {.include SRL\SRL.scar}
         {.include SRL\SRL\Skill\Fighting.scar}
    var
         intKilled, SkillXP : integer;
         CurSkill : string;
    const
         Chick = 1121677; // Color of the red on the chickens.
         WaitTime = 14; // Time in seconds to wait to kill chicken.
         NumToKill = 200; // Number to kill per account.

    ////////////////////////////////////////////////////////////////////////////////
    // Procedure: DeclarePlayers;                                                 //
    // Author: Wizzup?                                                            //
    // Description: Declare the players that will be running the script.          //
    //                                                                            //
    // Note: When setting a Nick, make sure it has no capital letters or spaces.  //
    //       ex: If your username is 'Damon B4ird' make your nick '4ird'          //
    ////////////////////////////////////////////////////////////////////////////////
    procedure DeclarePlayers;
    begin
         HowManyPlayers := 5;
         NumberOfPlayers(HowManyPlayers);
         CurrentPlayer := 0;

         Players[0].Name :='USERNAME1';
         Players[0].Pass :='PASSWORD1';
         Players[0].Nick :='';
         Players[0].Strings[0]:='auto'; // Set attack, defence, strength, or auto.
         Players[0].Active:=True;

         Players[1].Name :='USERNAME2';
         Players[1].Pass :='PASSWORD2';
         Players[1].Nick :='';
         Players[1].Strings[0]:='auto'; // Set attack, defence, strength, or auto.
         Players[1].Active:=True;

         Players[2].Name :='USERNAME3';
         Players[2].Pass :='PASSWORD3';
         Players[2].Nick :='';
         Players[2].Strings[0]:='auto'; // Set attack, defence, strength, or auto.
         Players[2].Active:=True;

         Players[3].Name :='USERNAME4';
         Players[3].Pass :='PASSWORD4';
         Players[3].Nick :='';
         Players[3].Strings[0]:='auto'; // Set attack, defence, strength, or auto.
         Players[3].Active:=True;

         Players[4].Name :='USERNAME5';
         Players[4].Pass :='PASSWORD5';
         Players[4].Nick :='';
         Players[4].Strings[0]:='auto'; // Set attack, defence, strength, or auto.
         Players[4].Active:=True;
    end;

    ////////////////////////////////////////////////////////////////////////////////
    // Procedure: ProgressReport;                                                 //
    // Author: Electron Man                                                       //
    // Description: Prints out a progress report.                                 //
    ////////////////////////////////////////////////////////////////////////////////
    procedure ProgressReport;
    begin
         Writeln('<=================================================>');
         Writeln('                 Chicken Killer v1                 ');
         Writeln('                                                   ');
         Writeln('Worked for ' + TimeRunning                          );
         Writeln('Killed ' + IntToStr(intKilled) + ' Chickens'        );
         Writeln('<=================================================>');
    end;

    ////////////////////////////////////////////////////////////////////////////////
    // Function: FindChicken;                                                     //
    // Author: Electron Man                                                       //
    // Description: Return true if it finds a chicken on the screen.              //
    ////////////////////////////////////////////////////////////////////////////////
    function FindChicken: Boolean;
    var
         x, y : integer;
         found : boolean;
    begin
         found := FindColorSpiralTolerance(x, y, Chick, MSX1, MSY1, MSX2, MSY2, 25);
         if found then
         begin
              MMouse(x, y, 0, 0);
              if IsUpText('hicken') then
              begin
                   Mouse(x, y, 0, 0, true);
                   Result := true;
              end else
                   Result := false;
         end;
    end;

    ////////////////////////////////////////////////////////////////////////////////
    // Procedure: SetFightStyle;                                                  //
    // Author: Electron Man (Inspired by MasterKill)                              //
    // Description: Sets the fight style to whatever 'style' is.                  //
    ////////////////////////////////////////////////////////////////////////////////
    procedure SetFightStyle(style : string);
    var
         Three : boolean;
         x, y : integer;
    begin
         GameTab(1);
         Wait(200 + Random(50));
         if FindColorTolerance (x, y, 2070783, 651, 302, 718, 348, 10) then
              Three := false
         else
              Three := true;

         if Three then
         begin
              case style of
                   'attack': SetFightMode(1);
                   'strength': SetFightMode(2);
                   'defense': SetFightMode(3);
              end;
         end else
         begin
              case style of
                   'attack': SetFightMode(1);
                   'strength': SetFightMode(2);
                   'defense': SetFightMode(4);
              end;
         end;
    end;

    ////////////////////////////////////////////////////////////////////////////////
    // Function: GetLowestSkill;                                                  //
    // Author: Electron Man                                                       //
    // Description: Returns the fight skill with the lowest level.                //
    ////////////////////////////////////////////////////////////////////////////////
    function GetLowestSkill: String;
    var
         LowestSkill : string;
    begin
         LowestSkill := 'attack';
         
         if GetSkillLevel('strength') < GetSkillLevel(LowestSkill) then
              LowestSkill := 'strength';
         if GetSkillLevel('defence') < GetSkillLevel(LowestSkill) then
              LowestSkill := 'defence';

         CurSkill := LowestSkill;
         Result := LowestSkill;
    end;

    ////////////////////////////////////////////////////////////////////////////////
    // Procedure: ChooseFightStyle;                                               //
    // Author: Electron Man                                                       //
    // Description: Chooses the correct fight style.                              //
    ////////////////////////////////////////////////////////////////////////////////
    procedure ChooseFightStyle;
    begin
         case LowerCase(Players[currentplayer].strings[0]) of
              'auto'    : SetFightStyle(GetLowestSkill);
              'attack'  : SetFightStyle('attack');
              'defence' : SetFightStyle('defence');
              'strength': SetFightStyle('strength');
         end;
    end;

    ////////////////////////////////////////////////////////////////////////////////
    // Function: CheckIfFought;                                                   //
    // Author: Electron Man                                                       //
    // Description: Returns true if player has killed a chicken.                  //
    ////////////////////////////////////////////////////////////////////////////////
    function CheckIfFought: Boolean;
    var
         AfterXP : integer;
    begin
         Wait(WaitTime * 1000 + Random(1000));
         AfterXP := GetXP(CurSkill);
         if SkillXP < AfterXP then
         begin
              SkillXP := AfterXP;
              Result := true;
         end else
              Result := false;
    end;

    ////////////////////////////////////////////////////////////////////////////////
    // Procedure: StartUp;                                                        //
    // Author: Electron Man                                                       //
    // Description: Prepares for the slaughtering of chicken.                     //
    ////////////////////////////////////////////////////////////////////////////////
    procedure StartUp;
    begin
         if LoggedIn then
         begin
              ChooseFightStyle;
              SetRun(true);
              SkillXP := GetXP(CurSkill);
              PerfectNorth;
              HighestAngle;
         end else
             Writeln('Not logged in, but why was this called?');
    end;

    begin
         SetUpSRL;
         DeclarePlayers;
         Disguise('Norton Anti-Virus 2007');
         ClearDebug;
         ActivateClient;
         LoginPlayer;
         repeat
              StartUp;
              while(intKilled < NumToKill) do
              begin
                   if FindChicken then
                   begin
                        if CheckIfFought then
                        begin
                             intKilled := intKilled + 1;
                             ProgressReport;
                             FindNormalRandoms;
                        end;
                   end;
              end;
              NextPlayer(true);
         until(false);
    end.

  2. #2
    Join Date
    Nov 2007
    Posts
    184
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    will try later

    just downloaded it

  3. #3
    Join Date
    Nov 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thank you very much.

  4. #4
    Join Date
    Oct 2007
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It is alright, but why does it need to check the XP after every chicken fought just to get the number of chickens killed? Also, you should make it right click and click attack as it often misses a moving chicken.

  5. #5
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Checking to see if you killed a chicken by exp isnt a very good idea. Its non human like. You could check for health bar for you or the chicken.

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  6. #6
    Join Date
    Nov 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Actually checking xp after every kill is pretty human like XD. The problem with checking for the xp bar is there could be other XP bars and thats even assuming you can reach the chicken or the chicken isn't already in a fight. I just did it by XP because it is pretty accurate although it doesn't seem to be working correctly, do you see anything wrong?

  7. #7
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Do you understand the concept of Human Like?.

    Honestly answer this question... when fighting chickens (yourself humanly). Do you move your mouse over the exp and see if it has increased to see if you have killed the chicken?. No.

    You click on it and wait for it to die and then move onto next.

    It isnt human like at all to check xp.

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  8. #8
    Join Date
    Nov 2007
    Posts
    28
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yea guy uptop is right

  9. #9
    Join Date
    Oct 2007
    Location
    grafton wi
    Posts
    53
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I agree
    You need to set it so it is more humanlike by making it check the health bar1
    http://www.stats.srl-forums.com/sigs/3228.png



    If I see you autoing with a lvl 20 or under with or without obvious clothes I WILL report you. Put this in your sig if you agree.

  10. #10
    Join Date
    Nov 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hmm when I play I frequently check xp because I am terribly bored and want to see how close I am. So when you're playing RS and people go only 100k xp I guess they are just making a rough estimate huh?

  11. #11
    Join Date
    Nov 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh btw, I'm changing it to check the health bar lol

  12. #12
    Join Date
    Nov 2007
    Posts
    64
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Good dissistion, only if THE SCRIPT could check it on a timly basses lets say every like 5 min, But if not if you check you xp Every 30 sec. it will look very unhuman like try adding some human like mouse movments.

  13. #13
    Join Date
    Nov 2007
    Posts
    64
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by rwj4real View Post
    I agree
    You need to set it so it is more humanlike by making it check the health bar1
    EHH, whats with the Don't Eat it thing IT bothers me?

  14. #14
    Join Date
    Nov 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm playing RS right now and I am frequently checking xp and flipping through the game tabs so I'm thinking it is fine either way

  15. #15
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well its your script, suggestions are given if you choose to ignore them thats up to you. :P

    Plus theres a flaw in your system. Lets say you attack the chicken it grabs the exp to be 10, u hit once, it goes to 15. Script detects you have "fought". Script moves onto next chicken, but it hasn't finished killing the first yet.

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  16. #16
    Join Date
    Nov 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I actually thought of that before I started coding this, but I figured all the other scripts I used did it so it didn't matter. Plus, it's a chicken killer, how long could that take

  17. #17
    Join Date
    Nov 2007
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    nice but its very hard to lvl from chikens

  18. #18
    Join Date
    Nov 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yea fer real, I made this script just to learn the basics though so I wouldn't recommend using it

  19. #19
    Join Date
    Nov 2007
    Location
    Lumbridge
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    does it pic feathers?

  20. #20
    Join Date
    Nov 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    No it doesn't, sorry. I'm going to rewrite this when I get back from vacation so I will add feather and bone picking.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help with chicken killer
    By D1zl3 in forum OSR Help
    Replies: 2
    Last Post: 10-04-2008, 10:11 PM
  2. Chicken Killer (yet another one)
    By dontpanic in forum RS3 Outdated / Broken Scripts
    Replies: 122
    Last Post: 04-20-2008, 05:12 PM
  3. Chicken killer
    By me_ntal in forum RS3 Outdated / Broken Scripts
    Replies: 5
    Last Post: 04-17-2007, 04:56 AM

Posting Permissions

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