Results 1 to 5 of 5

Thread: I need help with my first script

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

    Default I need help with my first script

    SCAR Code:
    program WoodWhacker;
    {.include srl/srl.scar}

    // This is my first script
    // Woodwhacker by Jahuro
    // V1.1

    var
      WoodLoads,i: Integer;
    begin
      for i := 1 to 16 do
      begin
        case I of
          1: CloseWindow;
          2: if FindTalk then
              Result := True;
          3: if FindDead then
              Result := True;
          4: if FindMod then
              Result := True;
          5: if FindMime then
              Result := True;
          6: if FindMaze then
              Result := True;
          7: if FindQuiz then
              Result := True;
          8: if FindDemon then
              Result := True;
          9: if FindScapeRune then
              Result := True;
          10: if FindTalk then // Call it twice
              Result := True;
          11: if FindLamp(LampSkill) then // Maybe we missed it?
              Result := True;
          12: if (FindNewBox) then
            begin
              Result := True;
              if (UseBoxSolver) then
                SolveBox
              else
                GambleNewBox;
            end;
          13: if FindTrade then
              Result := True;
          14:
            begin
              if NoGameTab then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'No GameTab';
                Logout;
                Exit;
              end;
            end;
          15: SaveToChatLog;
          16: if RC then
              Result := True;
        end;
        Wait(1);
      end;
    end;


    Const
    Color = 3162200;
    TreeName = 'Tree';

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

      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Active:=True;
    end;

    procedure Report;
    begin
      Writeln('[]-------------------------------------------[]');
      Writeln('[]------------JAHURO WOOD WHACKER------------[]');
      Writeln('Worked For : ' + ScriptTime2(2))'------------[]');
      Writeln('Cut'+ IntToStr(WoodLoads) + ' Loads --[]');
      Writeln('[]-------------------------------------------[]');
    end;

    procedure Antiran;
    begin
      while(Chopping)do
      begin
        Wait(200);
        FindNormalRandoms;
      end;
    end;

    procedure ClickTree;
        begin
        repeat
        if(FindColor(x,y,color,0,0,400,500))then
        MMouse(x,y,0,0);
        wait(100+random(50));
        if(IsUpText('Chop down '+TreeName))
        then
        Mouse(x,y,0,0,true);
        wait(2000+random(50));
        until(InvFull);
        end;

        procedure Drop;
        begin
        DropAll;
        FindNormalRandoms;
        WoodLoads := WoodLoads + 1;
        end;

    begin
    setupsrl;
    DeclarePlayers;
    repeat
    ClickTree;
    Drop;
    Report;
    until false;
    end.

    The isuptext isnt working
    I like cats.
    Narcle's AK Smelter 1.1.6
    Run Time : 7 Hr 53 Min 5 Sec
    Total Bars : 3371
    Total XP : 58995

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

    Default

    please help
    I like cats.
    Narcle's AK Smelter 1.1.6
    Run Time : 7 Hr 53 Min 5 Sec
    Total Bars : 3371
    Total XP : 58995

  3. #3
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Please dont double post.
    Help will come in time.
    Try making sure you have all of your calitals and lower cases right.

    Also try using isuptextmulti, its more tolerant.

    SCAR Code:
    If IsUpTextMilti('Chop down', 'hop dow', 'hop do') Then

    I think you should take advice from you sig...

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

    Default

    Thanks. Now i need help with antirandoms. i will update the script
    I like cats.
    Narcle's AK Smelter 1.1.6
    Run Time : 7 Hr 53 Min 5 Sec
    Total Bars : 3371
    Total XP : 58995

  5. #5
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    You forgot to name the first Function (FindFastRandoms)
    Hup Holland Hup!

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
  •