Results 1 to 7 of 7

Thread: My First Script ~ Need Help ~ Wont Work

  1. #1
    Join Date
    Jan 2007
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    My First Script ~ Need Help ~ Wont Work

    this is my first script...i was trying to make a chicken killer script...i think i really messed up bad... here it is

    program chickkiller;

    var
    chickencolor : integer;
    floorcolor : integer;
    killtimes : integer;
    timeskilled : integer;

    procedure setup;
    begin
    killtimes :=1000;
    chickencolor:=8564671;
    floorcolor :=6053220;
    end;

    procedure chickenfindandkill;
    begin
    if findcolor(x,y,chickencolor,43,157,190,136) then
    MMouse(x,1,y,1)
    If option2('attack chicken') then
    Mouse(x,y,1,1,true)
    wait(2000+random(400))
    end;

    procedure findrandoms;
    begin
    findnormalrandoms;
    end;

    procedure antilost;
    begin
    findrandoms;
    if (not(findmmcolor(x, y, floorcolor))) then begin
    writeln('lost.');
    logout;
    end;
    end;

    begin
    SetUpSRL;
    SetUpPlayers;
    SetUp;
    NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
    LogInPlayer;
    repeat
    repeat
    antilost;
    chickenfindandkill;
    timeskilled:=timeskilled+1
    clearreport;
    addtoreport('killing chicken '+inttostr(timeskilled));
    addtoreport('exp gained '+inttostr(timeskilled*5));
    until (FindChatText('learn from killing a chicken.'))
    writeln('Finished.');
    LogOut;
    NextPlayer(False);
    until ( False );
    end.

    someone please inform me of what i have done wrong thank you

  2. #2
    Join Date
    Jan 2007
    Posts
    117
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You've done three things wrong:
    1) You havnt put SCAR tags round the script
    2) You havnt standardised your script
    3) You havnt been specific about your problems..
    If you can sort these three things out then i shall be more than happy to help you.

    dunno why yr calling this: FindChatText('learn from killing a chicken.') and nextplayer(false) wont do anything but finish yr script- u have no player to switch to and (false) will mark yr current player as inactive.
    No Signature Assigned.

  3. #3
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well, here it is, sort of fixed up, except you need a player array, im not going to do that for you. I STRONGLY suggest you read some tutorials.

    SCAR Code:
    program chickkiller;
    {.include SRL\SRL.scar}
    var
    chickencolor : integer;
    floorcolor : integer;
    killtimes : integer;
    timeskilled, x, y : integer;

    procedure setup;
    begin
    killtimes :=1000;
    chickencolor:=8564671;
    floorcolor :=6053220;
    end;

    procedure chickenfindandkill;
    begin
    if findcolor(x,y,chickencolor,43,157,190,136) then
    MMouse(x,1,y,1)
    If ChooseOption('ttack') then
    Mouse(x,y,1,1,true)
    wait(2000+random(400))
    end;

    procedure findrandoms;
    begin
    findnormalrandoms;
    end;

    procedure antilost;
    begin
    findrandoms;
    if (not(findcolorspiraltolerance(x, y, floorcolor, MMX1, MMY1, MMX2, MMY2, 2))) then begin
    writeln('lost.');
    logout;
    end;
    end;

    begin
    SetUpSRL;
    SetUpPlayers;
    SetUp;
    NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
    LogInPlayer;
    repeat
    repeat
    antilost;
    chickenfindandkill;
    timeskilled:=timeskilled+1
    clearreport;
    addtoreport('killing chicken '+inttostr(timeskilled));
    addtoreport('exp gained '+inttostr(timeskilled*5));
    until (FindChatText('learn from killing a chicken.'))
    writeln('Finished.');
    LogOut;
    NextPlayer(False);
    until ( False );
    end.

  4. #4
    Join Date
    Feb 2007
    Location
    SparklesProd.com
    Posts
    2,406
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by joerobo View Post
    FindChatText('learn from killing a chicken.')
    Ripped from a varrock dummy attacker? That's my guess.

  5. #5
    Join Date
    Dec 2006
    Posts
    2,244
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    me n jad are the only ones hu released a dummy pwner i think lol

    anyway read some standard tuts and standerize it then it iwll be easyier to read thorugh and more ppl will help

    - rudeboialex out to use LAME XD cya ppl

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

    Default

    Quote Originally Posted by itschris917 View Post
    Well, here it is, sort of fixed up, except you need a player array, im not going to do that for you. I STRONGLY suggest you read some tutorials.

    SCAR Code:
    program chickkiller;
    {.include SRL\SRL.scar}
    var
    chickencolor : integer;
    floorcolor : integer;
    killtimes : integer;
    timeskilled, x, y : integer;

    procedure setup;
    begin
    killtimes :=1000;
    chickencolor:=8564671;
    floorcolor :=6053220;
    end;

    procedure chickenfindandkill;
    begin
    if findcolor(x,y,chickencolor,43,157,190,136) then
    MMouse(x,1,y,1)
    If ChooseOption('ttack') then
    Mouse(x,y,1,1,true)
    wait(2000+random(400))
    end;

    procedure findrandoms;
    begin
    findnormalrandoms;
    end;

    procedure antilost;
    begin
    findrandoms;
    if (not(findcolorspiraltolerance(x, y, floorcolor, MMX1, MMY1, MMX2, MMY2, 2))) then begin
    writeln('lost.');
    logout;
    end;
    end;

    begin
    SetUpSRL;
    SetUpPlayers;
    SetUp;
    NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
    LogInPlayer;
    repeat
    repeat
    antilost;
    chickenfindandkill;
    timeskilled:=timeskilled+1
    clearreport;
    addtoreport('killing chicken '+inttostr(timeskilled));
    addtoreport('exp gained '+inttostr(timeskilled*5));
    until (FindChatText('learn from killing a chicken.'))
    writeln('Finished.');
    LogOut;
    NextPlayer(False);
    until ( False );
    end.
    okay thank you very much i appreciate this so very much, im trying to learn about how to write scripts. i appreciate you helping me along the way.

    (Same Goes with everyone who posted replying to my thread thanks again.

  7. #7
    Join Date
    Aug 2007
    Location
    England
    Posts
    734
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Just as a litte tip

    SCAR Code:
    var
    chickencolor : integer;
    floorcolor : integer;
    killtimes : integer;
    timeskilled, x, y : integer;
     
    procedure setup;
    begin
    killtimes :=1000;
    chickencolor:=8564671;
    floorcolor :=6053220;
    end;
    can be changed to

    SCAR Code:
    const
     killtimes :=1000;
     chickencolor:=8564671;
     floorcolor :=6053220;
    var
     timeskilled, x, y : integer;
    The truth finally came out...


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Script wont work-Need HELP!
    By IVISolnxIVI in forum OSR Help
    Replies: 3
    Last Post: 05-09-2008, 08:26 PM
  2. Scar wont work with any script
    By soul_hacker2 in forum OSR Help
    Replies: 7
    Last Post: 09-01-2007, 12:16 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
  •