Results 1 to 6 of 6

Thread: I am Making a chickenkiller

  1. #1
    Join Date
    Nov 2007
    Location
    UK
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default I am Making a chickenkiller

    Ok, so i made this in half an hour
    SCAR Code:
    program ChickenKiller;

    {.include srl/srl.scar}


    var x,y:integer;

    Const

    ChickenColor = '1337';
    TimeToPlay = '600000';//IN MILISECONDS//

    Procedure CheckIfLoggedIn;
     begin
     Writeln('You are running ChickenKiller by wade007')
     wait(1000)
     If(Not(loggedin)) then
     begin
     Writeln('Please login before running script')
     end;
    end;

    Procedure AttackChicken;
     begin

      If (FindColor(x,y, ChickenColor , 495, 166 , 991, 478)) then
       begin
       If IsUptextMulti('cken','hicken','chic')
       then
        begin
        Mouse(x,y, true)
        end;
       end;
    end;

    procedure Debug;
    begin
    writeln(' Thank you for using my ChickenKiller')
    wait(400)
    Writeln(' It is still in beta, so don''t be too harsh')
    end;

    begin
    SetupSrl;
    ActivateClient;
    MakeCompass('N')
     CheckIfLoggedIn
      repeat
      AttackChicken
      Until(TimeToPlay = TimeToPlay)
    end.
    and i am getting an error "Type mismatch in script"
    I don't know what to do.... can you guys help?h): h):
    thanks in advance!

  2. #2
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Ok, do you see line 10?
    SCAR Code:
    ChickenColor = '1337';
    There should be no ' before and after the numbers because it is not a string. An integer is a number, a string are words in between the ' ' and a boolean is true or false. And Line 11 is the same thing.

    Also look at line 29:
    SCAR Code:
    Mouse(x,y,true);
    The Mouse function requires 2 other digits in it such as 2,2. That is how wonky the mouse will be when is moves. For example, if it was like Mouse(x,y,0,0,true); then it would move the mouse in an exact straight line, unlike how a human moves the mouse we cannot do it in an exact straight line from the point it started. So i recommend it would be:
    SCAR Code:
    Mouse(x,y,3,4,true);
    .

    Hope that helps.
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  3. #3
    Join Date
    Nov 2007
    Location
    UK
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks! I really appreciate the fast reply!

  4. #4
    Join Date
    Aug 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    And btw 1 more thing..

    You never really have anything timing it.
    It will only repeat once because you have:
    SCAR Code:
    repeat
        AttackChicken
      Until(TimeToPlay = TimeToPlay)
    and since TimeToPlay will always equal the same number it will only do it once

    So instead make it:
    SCAR Code:
    repeat
        AttackChicken
      Until(TimeRunning >= TimeToPlay)
    That way it will end after it runs for longer than specified time

  5. #5
    Join Date
    Jul 2007
    Location
    St. Louis, Missouri, USA.
    Posts
    575
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Derek- View Post
    And btw 1 more thing..

    You never really have anything timing it.
    It will only repeat once because you have:
    SCAR Code:
    repeat
        AttackChicken
      Until(TimeToPlay = TimeToPlay)
    and since TimeToPlay will always equal the same number it will only do it once

    So instead make it:
    SCAR Code:
    repeat
        AttackChicken
      Until(TimeRunning >= TimeToPlay)
    That way it will end after it runs for longer than specified time
    Wouldn't it have to be:
    SCAR Code:
    repeat
        AttackChicken
      Until(GetTimeRunning >= TimeToPlay)

    If I'm not mistaken, TimeRunning is a string so you can just do WriteLn(TimeRunning);

    I could be confused.
    -You can call me Mick-



  6. #6
    Join Date
    Aug 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by mickaliscious View Post
    Wouldn't it have to be:
    SCAR Code:
    repeat
        AttackChicken
      Until(GetTimeRunning >= TimeToPlay)

    If I'm not mistaken, TimeRunning is a string so you can just do WriteLn(TimeRunning);

    I could be confused.
    Op yep you're right, my bad didn't catch that =]]

    it's 'GetTimeRunning' not 'TimeRunning'

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: 4
    Last Post: 01-03-2008, 02:33 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
  •