Results 1 to 6 of 6

Thread: Script messing up..

  1. #1
    Join Date
    Mar 2007
    Posts
    1,223
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default Script messing up..

    hey guys,
    I am using smart, and it keeps closing down with scar everytime i try to run the follwoing script, please help.


    SCAR Code:
    program Cooker;
    {.include SRL/SRL/misc/SMART.scar}
    {.include SRL/SRL.scar}

    const

      //Smart Setup//
      SmartWorld      = 87;   //  what world do you want to login to??
      Signed          = True;  // leave alone..

    procedure DeclarePlayers;
      begin
      HowManyPlayers :=1;  // how many players do you want
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer:=0
      Players[0].Name        := ;      //Character Name
      Players[0].Pass        := ;    //Character Pass
      Players[0].Nick        := ;     //Nickname 3 - 4 Letter's of char name
      Players[0].Active      := True;   //true if you want this player to be ran in the script false if you dont want it to run
    end;

    procedure SetupSmart;
    begin
      SmartSetupEx(SmartWorld, false, Signed);
      ClearDebug;
      WriteLn('Setting up Smart... Please Hold...');
      Wait(10000 + random(5000));
      SetTargetDC(SmartGetDC);
      While not(SmartReady) do Wait(100);
    end;

    function Energy20: Boolean;
    var
      Colour: string;
      Level: Integer;
    begin
      Level := GetMMLevels('energy', Colour);
      Result := Level > 20;
    end;

    procedure WalkToRange;
    begin
      SetAngle(true);
      MakeCompass('N');
      if Energy20 then
      SetRun(True);
      if RadialRoadWalk(FindVarrockRoadColor,220,140,60,-2,0)then
      begin
      writeln('worked');
      end;
    end;

    begin
    SetupSmart;
    SetupSRL;
    DeclarePlayers;
    LoginPlayer;
    WalktoRange;
    end.

  2. #2
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Does SMART normally work for you? or is it just this script? because the script looks fine to me.

    - and sign on msn, ive been waiting for u all day

    EDIT: id try and compile ur script, but im busy softening clay with ur clay softener
    ~ Metagen

  3. #3
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    This happend with me, The While loops sometimes don't work, Try replacing it with something like this:

    SCAR Code:
    {-------------------------------}
    {      Sets Up S.M.A.R.T!       }
    {-------------------------------}

    Procedure SetUpSMART;
    Begin

     Begin
       WriteLn('Making S.M.A.R.T Ready');
       SmartSetupEx(108, false, true);

         Repeat
           wait(100);
         Until(SmartReady);

        If (SmartReady) then
         wait(1000+Random(2000));
         WriteLn('Loaded S.M.A.R.T');
         SetTargetDC(SmartGetDC);
         Exit;
      end;
    end;
    ^ That should Help ^

    Hope I Helped

  4. #4
    Join Date
    Jun 2007
    Location
    Drugs are bad mkay?
    Posts
    111
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    omg nauman ty so much SMART works again
    Current Scripts:
    OakZZ!||Done!!!!
    WillowZZ!||Done!!!!
    ChickenZZ!||Done!!!!
    KaramjaFisher||Done!!!!
    Firemaking||Busy!!!!
    http://www.fenjer.com/adnan/SRLStats/4708.png

  5. #5
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh do while loops work usually? or just not with smart? becausein my air crafter i was so fed up with the dam loops that i changed them all to
    SCAR Code:
    repeat
      if blah then i := X
      else
        blahblah
    until i >= X
    ~ Metagen

  6. #6
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    There is nothing wrong in While -loops, my guess would be that you have an outdated worlds.ini?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Jagex messing with me
    By alberttai in forum News and General
    Replies: 14
    Last Post: 06-12-2008, 01:41 PM
  2. Messing up =[
    By siroober in forum News and General
    Replies: 12
    Last Post: 02-16-2008, 08:06 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
  •