Results 1 to 8 of 8

Thread: Here is my first script.....

  1. #1
    Join Date
    Mar 2007
    Location
    Under a rock
    Posts
    813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Here is my first script.....

    This is my first script, but there are some things that I need to fix I think. Can some pleople please run it or look at so you can tell me what to change/improve about it? Also, please tell me what you think of it.

    SCAR Code:
    //------------------------------------------------------------------------\\
    //                          Here is a Bone Burier lol                     \\
    //------------------------------------------------------------------------\\
    // Setup Lines : 23-26                                                    \\
    //               32-49                                                    \\
    //------------------------------------------------------------------------\\
    //                                                                        \\
    //------------------------------------------------------------------------\\
    //                             Instructions                               \\
    //------------------------------------------------------------------------\\
    // 1. Set Runescape on low detail and on Very Bright.                     \\
    // 2. Join a world where people dont pick up thier bones.                 \\
    // 3. Start logged in or out where lots of bones are laying around.       \\
    // 4. Click on play and hope it works since its my first script lol.      \\
    //------------------------------------------------------------------------\\
    program BoneBurier;
    {.include SRL\SRL.scar}

    Var
    Loads: Integer;

    const
    bonecolor = 15724528; //color of bone you are picking up
    RunDirection = 'N'; //direction you run away from random events(N,E,S,W)
    Skillforlamp = 'Prayer'; //what to use a genie lamp on
    numberloads = 5 ; //number of bones you want buried per player

    //-------------------------------Players----------------------------------\\

    procedure DeclarePlayers;
    begin
     HowManyPlayers:=3;
     NumberOfPlayers(HowManyPlayers);
     CurrentPlayer:=0;

     Players[0].Name :='skilllzzzzz'; //Username goes here.
     Players[0].Pass :='skills'; //Password goes here.
     Players[0].Nick :='llzz'; //Type 3-4 letters of your runescape username.
     Players[0].Active :=true; //Is this player active?

     Players[1].Name :='Username';
     Players[1].Pass :='Password';
     Players[1].Nick :='sern';
     Players[1].Active :=false;

     Players[2].Name :='Username';
     Players[2].Pass :='Password';
     Players[2].Nick :='sern';
     Players[2].Active :=false;

    end;

    //-----------------------------Progress Report----------------------------\\

    Procedure Progressreport;
      begin
      Writeln('');
      Writeln('//-----------Progress On Bone Burying-----------\\');
      Writeln('//----Ran for '+ ScriptTime2(1) +' ----\\');
      Writeln('//----Buried '+IntToStr(loads)+' loads----\\');
      Writeln('//----Buried '+IntToStr((loads)*28)+' bones----\\');
      WriteLn('//Gained about '+IntToStr((loads)*140)+' xp----\\')
    end;

    //------------------------------Anti Randoms------------------------------\\

    Procedure AntiRandoms;
    Begin
      FindNormalRandoms;
      FindLamp(Skillforlamp);
      FindTalk;
      FindScapeRune;
      if (findfight) then begin
       RunAwayDirection(RunDirection);
       SleepAndMoveMouse(10000+Random(2000));
       RunBack;
    end;
    end;

    //-----------------------------Pick up bones------------------------------\\

    Procedure Pickup;
      Begin
       Repeat
       Findcolor(x,y,bonecolor,5,5,515,340)
       Wait(300+random(100))
       Mouse(x, y, 2, 2, False);
       Wait(350+random(150))
       ChooseOption(x, y, 'ke B');
       Flag;
       Wait(600+random(200))
       Until(InvFull)
       AntiRandoms;
    end;

    //------------------------------Bury bones--------------------------------\\

    Procedure Bury;
    begin
     if(InvFull)then
      begin
      loads:=loads+1;
      repeat
      clickitemcolortol(bonecolor,4,true);
      wait(300+random(25))
      AntiRandoms;
      Progressreport;
      until(InvEmpty)
     end;
    end;

    //------------------------------------------------------------------------\\

    Procedure loadnumbers;
    begin
    repeat
    Bury;
    until(loads=numberloads)
    AntiRandoms;
    Progressreport;
    SRLrandomsReport;
    NextPlayer(True);
    end;

    //------------------------------------------------------------------------\\

    Begin
    SetupSRL;
    DisguiseScar('iTunes');
    DeclarePlayers;
    LoginPlayer;
    SetChat('on', 1);
    SetChat('friends', 2);
    SetChat('off', 3);
    Setrun(true);
    HighestAngle;
    PerfectNorth;
    Progressreport;
    AntiRandoms;
    Pickup;
    Bury;
    end.
    end.

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

    Default

    You used Progressreport in your anti randoms procedure, yet you declare Progressreport below the anti randoms procedure, therefore it doesn't know what it is at that stage, and so doesn't compile for me :P

    It seems to progress report a little too much :P

    Tested it when i fixed it and it picked up bones well and buried them straight after. Its a nice script which does its job perfectly. Good job.

  3. #3
    Join Date
    Mar 2007
    Location
    Under a rock
    Posts
    813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok, ill change that, ty

    Also, i dont want it to bury the bones until the inventory is full, so can someone please tell me why it buries the bones before the inventory is full?

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

    Default

    It's very good for a first script

  5. #5
    Join Date
    Mar 2007
    Location
    Under a rock
    Posts
    813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  6. #6
    Join Date
    Mar 2007
    Location
    Under a rock
    Posts
    813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ide still love some feedback on what to add to make it work better. I know there is still a lot more to do on it so ide love some suggestions.

  7. #7
    Join Date
    Feb 2007
    Posts
    215
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Where you have inventoryfull in the burying procedure try InvFull or invcount = 28

    there may be an error in the inventoryfull function.
    A common mistake people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.
    -Douglas Adams

  8. #8
    Join Date
    Mar 2007
    Location
    Under a rock
    Posts
    813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks a load for posting that, but can you give me an example of what it should look like cause i cant get it to work right for some reason.

    Also, im still trying to find a more accurate bone color though and a way to pick up the bone better (it still soemtimes click "Examine Bones" instead of "Take Bones"

Thread Information

Users Browsing this Thread

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

Posting Permissions

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