Results 1 to 21 of 21

Thread: First script~ ChickenKiller

  1. #1
    Join Date
    Nov 2008
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    First script~ ChickenKiller

    MY FIRST SCRIPT EVER! CHICKEN KILLER BABY!

    Hi I'm UNo, a new dude to these SRL forums, and I made a script that kills chickens, which I know works. The only problems that I have had with it are that it sometimes attacks the farmer on the other side of the barn, but that sometimes resolves itself, as the script starts looking for another chicken by the time it gets to the farmer. I will find a way to resolve this problem and others that you guys have, in future updates. Also at the moment I do not have a proggie, but I promise that I will have that in the next update.

    CREDITS
    d1s3l- Feather pickup procedure
    SRL- many tutorials
    If i forgot you Im deeply sorry

    Future Updates
    Proggie (main idea so far)
    adding forms
    a way to fix farmer bug
    better feather pickup
    inclusion of S.M.A.R.T
    More Antiban/Antirandoms
    fix a bug where script has problems logging into next player
    picking up and cooking raw chicken
    picking up and burying bones
    Anything else that you guys and I can think of

    INSTRUCTIONS

    Make sure your character is at either the chicken farm near the cow pen or near on other side of the river near lumbridge

    it doesn't matter if they are logged in or not when you start the script

    fill in your pass and usernames, and nicknames in the declare players section

    Edit the CONST section to your liking

    DOWNLOAD

    Ive posted a link for now because the manage attachments button isnt working... I dont know why
    Anywho, without further ado, here is the download, please comment ChickenKiller v1

  2. #2
    Join Date
    Oct 2006
    Location
    United States
    Posts
    672
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    haha like your feather procedure just ask me if you need help with that next time:P
    and the main loop haha

  3. #3
    Join Date
    Nov 2008
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Omg I Totally Forgot To Give U Credit! Im Sorry Man

  4. #4
    Join Date
    Oct 2006
    Location
    United States
    Posts
    672
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by UNo View Post
    Omg I Totally Forgot To Give U Credit! Im Sorry Man
    haha no prob and if you need help with it I can:P

  5. #5
    Join Date
    Nov 2008
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks ill keep that in mind. this is like my 5th day with SCAR so im still having a little trouble

  6. #6
    Join Date
    Nov 2008
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol, nice script but it picks up like 1 pile of feathers every 5 chickens

  7. #7
    Join Date
    Oct 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I took a look and it still needs work but good for first script

  8. #8
    Join Date
    Nov 2008
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks, and I'll look into your problem killer. I'm still working on the progress report, its just that I don't get around to scripting that often

  9. #9
    Join Date
    Mar 2008
    Location
    ::1
    Posts
    915
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Here's a way to fix the problem stated at the beginning : IsUpText('Some Text'); checks to see if the "Hover text" of Runescape is something... You could do the following...
    SCAR Code:
    if(IsUpText('hicken')) then // "hicken" instead of "chicken" because you can't use the first letter in UpTexts
      Mouse(x,y,2,2,true);

    Records and Types Save Code (and make you look better)
    Quote Originally Posted by Wizzup? View Post
    Is it possible to make Runescape a 2D game with this?... That would greatly simplify... Just about anything.

  10. #10
    Join Date
    Oct 2008
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    problem fixed.

  11. #11
    Join Date
    Nov 2008
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks for the advice Tniffoc

    Edit: i will post the new update tomorrow, but i got to go to a romeo and juliet play

  12. #12
    Join Date
    Nov 2008
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i will try this script

  13. #13
    Join Date
    Nov 2008
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Every time I run the script I get this error
    "Line 1: [Error] (1:1): Unable to register function function FindGapsTPA(TPA : TPointArray; MinPixels: Integer): T2DPointArray; in script"

    I copyed and pasted it exactly how you had it... What is the problem?

  14. #14
    Join Date
    Sep 2008
    Location
    Aussie mate
    Posts
    411
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by savagekiller View Post
    Every time I run the script I get this error
    "Line 1: [Error] (1:1): Unable to register function function FindGapsTPA(TPA : TPointArray; MinPixels: Integer): T2DPointArray; in script"

    I copyed and pasted it exactly how you had it... What is the problem?


    have you got latest SVN/REV/SRL version? have you installed?
    IM BACK!!!!!!!!!!!!!!!!!

  15. #15
    Join Date
    Jan 2009
    Location
    Manchester, England
    Posts
    58
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Great Script I am now using this with my army!
    Thanks
    Dani Bx

  16. #16
    Join Date
    Jan 2009
    Posts
    114
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Testing once i get to the chicken place...

    Will post proggy

    EDIT: Tried it but it was simply to slow to find chickens o.O it actually picked up the feathers though, so its good enough.

    Ill try it later for a long time and see what i get.

  17. #17
    Join Date
    Jan 2009
    Location
    Manchester, England
    Posts
    58
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Your script is great there is very little wrong with it!

    I have managed to add S.M.A.R.T. to it:

    program ChickenKiller;
    {.include SRL/SRL/Misc/Smart.scar}
    {.include SRL\SRL.scar}
    {.include SRL\SRL\skill\fighting.scar}

    const
    SmartWorld = 11;
    Signed = True;


    const
    ChickenColor1 = 8167863 ;//set white chicken color, to get specific color I suggest you go to runehq and find chicken under monsters
    ChickenColor2 = 2972796 ;//set brown chickens color, and ditto
    KillsPerPlayer = 500 ; //sets kills before switching to next player
    KillTime = 6750 ;// estimate time it takes you to kill a chicken
    var
    x, y, CurrentPlayerKills : integer;

    procedure AntiRandoms;
    begin
    if not LoggedIn then Exit;
    FindNormalRandoms;
    end;

    procedure SetupSmart;
    begin
    SmartSetupEx(Smartworld,false,signed,false); //extra false is for the detail
    ClearDebug;
    WriteLn('Setting up Smart... Please Hold...');
    Wait(10000 + random(5000));
    SetTargetDC(SmartGetDC);
    While not(SmartActive) do Wait(100); //smartactive instead of smartready
    end;


    procedure AntiBan;
    begin
    if not LoggedIn then Exit;
    case (Random(30)) of
    5: HoverSkill('attack', False);
    11: RandomMovement;
    24: PickUpMouse;
    27: begin
    Gametab(1 + Random(12));
    Gametab(4);
    end;
    30: SleepAndMoveMouse(300);
    end;
    end;

    Procedure DeclarePlayers;
    begin
    NumberOfPlayers(8);
    CurrentPlayer := 0;

    Players[0].Name :='chromo 1';
    Players[0].Pass :='****';
    Players[0].Nick :='chro';
    Players[0].Active :=True;


    end;

    procedure AttackChicken1;
    begin
    if not Loggedin then Exit;
    if FindObj(x, y, 'ttack', ChickenColor1,10) then
    begin
    Mouse(x, y, 2, 3, False);
    if ChooseOption('ttack') then
    begin
    wait(KillTime);
    Inc(CurrentPlayerKills);
    Exit;
    end;
    end;
    end;

    procedure AttackChicken2;
    begin
    if not Loggedin then Exit;
    if FindObj(x, y, 'ttack', ChickenColor2,10) then
    begin
    Mouse(x, y, 2, 3, False);
    if ChooseOption('ttack') then
    begin
    wait(KillTime);
    Inc(CurrentPlayerKills);
    Exit;
    end;
    end;
    end;

    procedure FindFeathers;
    begin
    if not LoggedIn then exit;
    if (FindObjCustom(x, y, ['eat', 'ther'], [403205,403717,12632520], 5)) then
    begin
    Mouse(x, y, 2, 2, False)
    if not(ChooseOption('ake')) then
    wait(500);
    Exit;
    end else
    end;

    begin
    SetupSRL;
    SetupSmart;
    DeclarePlayers;
    if LoggedIn then Logout;
    LoginPlayer;
    repeat
    AttackChicken1;
    FindFeathers;
    AttackChicken2;
    FindFeathers;
    AntiRandoms;
    Antiban;
    if CurrentPlayerKills = KillsPerPlayer then
    begin
    NextPlayer(true);
    end;
    if not Loggedin then NextPlayer(False);
    until(false)
    end.


    There ^^^^^ see what you think!?

    Dani B x

  18. #18
    Join Date
    Feb 2007
    Posts
    849
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Dani Bolton View Post
    Your script is great there is very little wrong with it!

    I have managed to add S.M.A.R.T. to it:
    SCAR Code:
    program ChickenKiller;
    {.include SRL/SRL/Misc/Smart.scar}
    {.include SRL\SRL.scar}
    {.include SRL\SRL\skill\fighting.scar}

    const
         SmartWorld      = 11;
         Signed          = True;


    const
         ChickenColor1 = 8167863 ;//set white chicken color, to get specific color I suggest you go to runehq and find chicken under monsters
         ChickenColor2 = 2972796 ;//set brown chickens color, and ditto
         KillsPerPlayer = 500 ; //sets kills before switching to next player
         KillTime = 6750 ;// estimate time it takes you to kill a chicken
    var
    x, y, CurrentPlayerKills : integer;

    procedure AntiRandoms;
    begin
      if not LoggedIn then Exit;
      FindNormalRandoms;
    end;

    procedure SetupSmart;
    begin
      SmartSetupEx(Smartworld,false,signed,false); //extra false is for the detail
      ClearDebug;
      WriteLn('Setting up Smart... Please Hold...');
      Wait(10000 + random(5000));
      SetTargetDC(SmartGetDC);
      While not(SmartActive) do Wait(100); //smartactive instead of smartready
    end;


    procedure AntiBan;
    begin
      if not LoggedIn then Exit;
      case (Random(30)) of
        5: HoverSkill('attack', False);
        11: RandomMovement;
        24: PickUpMouse;
        27: begin
             Gametab(1 + Random(12));
             Gametab(4);
            end;
        30: SleepAndMoveMouse(300);
      end;
    end;

    Procedure DeclarePlayers;
    begin
        NumberOfPlayers(8);
        CurrentPlayer := 0;
       
        Players[0].Name :='chromo 1';
        Players[0].Pass :='****';
        Players[0].Nick :='chro';
        Players[0].Active :=True;
       
       
    end;

    procedure AttackChicken1;
    begin
     if not Loggedin then Exit;
     if FindObj(x, y, 'ttack', ChickenColor1,10) then
     begin
      Mouse(x, y, 2, 3, False);
      if ChooseOption('ttack') then
      begin
        wait(KillTime);
        Inc(CurrentPlayerKills);
        Exit;
      end;
     end;
    end;

    procedure AttackChicken2;
    begin
     if not Loggedin then Exit;
     if FindObj(x, y, 'ttack', ChickenColor2,10) then
     begin
      Mouse(x, y, 2, 3, False);
      if ChooseOption('ttack') then
      begin
        wait(KillTime);
        Inc(CurrentPlayerKills);
        Exit;
      end;
     end;
    end;

    procedure FindFeathers;
    begin
      if not LoggedIn then exit;
      if (FindObjCustom(x, y, ['eat', 'ther'], [403205,403717,12632520], 5)) then
      begin
        Mouse(x, y, 2, 2, False)
        if not(ChooseOption('ake')) then
        wait(500);
        Exit;
      end else
    end;

    begin
      SetupSRL;
      SetupSmart;
      DeclarePlayers;
     if LoggedIn then Logout;
     LoginPlayer;
     repeat
      AttackChicken1;
      FindFeathers;
      AttackChicken2;
      FindFeathers;
      AntiRandoms;
      Antiban;
      if CurrentPlayerKills = KillsPerPlayer then
      begin
       NextPlayer(true);
      end;
      if not Loggedin then NextPlayer(False);
     until(false)
    end.


    There ^^^^^ see what you think!?

    Dani B x


    Fixed. Use [ scar] tags please.
    ________________________________________
    14:19 < cycrosism> I wonder what she would have done without it
    14:19 < cycrosism> without me*
    Cycrosism is now an it.
    Quote Originally Posted by Dervish View Post
    /Facedesk.

  19. #19
    Join Date
    Jan 2009
    Posts
    29
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nice job for a first script
    Prety slow to find a chicken, but the pickup feathers works fine

    Im going to let it run for an hour now and then i'll see what i get.


    Gl making other scripts, ur gonna make it!

  20. #20
    Join Date
    Jan 2009
    Location
    Spamville
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    kool i will use to train my new account

  21. #21
    Join Date
    Jan 2009
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    the script just makes my mouse click and it stays in the same spot and i can't move it. do i have to be logged in first?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. ChickenKiller
    By Fasga in forum First Scripts
    Replies: 15
    Last Post: 02-28-2009, 10:25 AM
  2. I am Making a chickenkiller
    By Wade007 in forum OSR Help
    Replies: 5
    Last Post: 12-23-2007, 04:01 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
  •