Results 1 to 7 of 7

Thread: Help with chicken killer

  1. #1
    Join Date
    Apr 2007
    Posts
    357
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help with chicken killer

    Hey I'm trying to make a chicken killer and got it work , but theres a few problems: it keeps clicking chickens even if its in a fight and the mouse aint accurate it clicks other objects like ground and farmers sometimes, could any1 help me with these?

    heres the script:

    SCAR Code:
    program ChickenTest;

    {.include srl/srl.scar}


    var
     MCX, MCY: Integer;

    const

      TimeToWaitChicken = 2000;
      RdClr = 857971;
      BrwnClr = 2309199;
     
      PlayerName   ='---';
      PassWord     ='---';
      NickName     ='---';

      PlayerName1  ='---';
      PassWord1    ='---';
      NickName1    ='---';
     
    procedure declareplayers;

    begin
    HowManyPlayers  :=2;
    NumberOfPlayers(HowManyPlayers);
    CurrentPlayer:=0;

    Players[0].Name :=(PlayerName);
    Players[0].Pass :=(PassWord);
    Players[0].Nick :=(NickName);
    Players[0].Active:=True;

    Players[1].Name :=(PlayerName1);
    Players[1].Pass :=(PassWord1);
    Players[1].Nick :=(NickName1);
    Players[1].Active:=True;
    end;

     
    Procedure FightChicken;
    begin
    if(FindColorSpiral(MCX,MCY, RdClr, MSX1,MSY1,MSX2,MSY2))or
      (FindColorSpiral(MCX, MCY, BrwnClr, MSX1-10, Msy1+10, MSX2+10, MCY2-10))then
      begin
        MMouse(MCX, MCY, 3, 3);
        Wait(20+random(10));
      end;
      if(IsUpText('cken'))then
      begin
        Wait(5+random(30));
        Mouse(MCX, MCY, 2, 2, true)
        Wait(TimeToWaitChicken+random(100));
      end;
    end;

    begin
      SetupSRL;
      DeclarePlayers;
      Repeat
      FightChicken;
      until(False)
    end.


    end.

  2. #2
    Join Date
    Jun 2006
    Location
    New Zealand
    Posts
    285
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Instead of FindColorSpiral, use something like FindObj:
    function FindObj(var cx, cy: Integer; Text: String; color, tolerance: Integer): Boolean;
    By: Stupid3ooo
    Description:
    Finds Object.
    It will continue to look for an object with the specified color and if the name of the object is the same as the one you specified, it will store the x, y co-ords in the variables you made it to.

    To make it only look for another chicken after killing the first, use InFight :
    function InFight: Boolean;
    By: WT-Fakawi
    Description:
    Returns as True if in fight.
    or you could use OutFight :
    procedure OutFight;
    By: XxKanexX
    Description:
    If in Fight waits until out of a fight.
    Good luck on script
    Huehuehuehuehue

  3. #3
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    repeat
    if(InFight)then
    wait(2000+random(2000));
    until OutFight
    FindObj(what evr u puot in here
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  4. #4
    Join Date
    Apr 2007
    Posts
    357
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I've got a problem with attacking procedure, it gives this error...

    Error] (18134:1): Type mismatch in script

    could any1 help?

    SCAR Code:
    Procedure FightChicken;
    begin
     if FindObj(x, y,'Chicken',RdClr,10) or
        FindObj(x, y, 'Attack', BrwnClr, 10)
       then
      begin
        MMouse(x, y, 3, 3);
        Wait(20+random(10));
        repeat
     if(InFight)
      then
     wait(1500+random(2000));
      until (OutFight)
      end;
      if(IsUpText('cken'))then
      begin
        Wait(5+random(30));
        Mouse(x, y, 2, 2, true)
        Wait(TimeToWaitChicken+random(100));
      end;
    end;

  5. #5
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    idk if u can have this

    SCAR Code:
    Wait(TimeToWaitChicken+random(100));
    i think it needs to be a number
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  6. #6
    Join Date
    Mar 2007
    Posts
    276
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    h):
    Quote Originally Posted by dan cardin View Post
    idk if u can have this

    SCAR Code:
    Wait(TimeToWaitChicken+random(100));
    i think it needs to be a number

    No As long as u have the const As TimeToWaitChicken than u can use it, try adding spaces like this (TimeToWaitChicken + random(100));


    Someone: 'Who the hell is TooManySitUps?'

    Boreas: 'Switch the first and last letter of my name, what do you get?'

    Someone: 'Um, SoreAb?'

    Boreas: 'And how do you get that?'

    Someone: 'From Too Many Sit Ups!! Haha, Boreas you are so clever!'

    Boreas: 'Ya he's like my evil twin that takes over when I'm being really sarcastic, or playing devil's advocate.'

  7. #7
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    ohhhhhhhh...yea...idk what iwas thinking..i think i thought that he was calling a procedure to do while waiting...idk..i was tired
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


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 Electron Man in forum First Scripts
    Replies: 19
    Last Post: 11-19-2007, 12:32 PM
  4. 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
  •