• Log in or sign up for an account here: https://www.sythe.org/login

need help with this scirpt

  • Thread starter Thread starter restodude
  • Start date Start date
R

restodude

Guest
okey ty for watching it.
need help with an script.
here it is.
they say there is something wrong with line 38 plz look at it.
Code:
Program RuneKillersWillowSmasher;
{.include SRL/SRL.Scar}
{.include SRL/SRL/Core/Users.Scar}
{.include SRL/SRL/Skill/Woodcutting.Scar}

Const
  YourSRLId = '';
  YourSRLPassword = '';
  AutoRespond = True; //May lag the script a little
  WillowColor = 2773056; //Color of the willow your cutting
  WillowColorB = 4026472; //Different color of the willow
  WillowColorC = 3301456; //Another color of the willow

Var x, y, H, M, S, WillowLog, Willow, TotalWillows, Banked,
  EntsAvioded : Integer;

Procedure DeclarePlayers;
begin
  HowManyPlayers:= 6;
  NumberOfPlayers(HowManyPlayers);
  CurrentPlayer:= 0;

  Players[0].Name        := 'Username'; //UserName
  Players[0].Pass        := 'Password'; //Password
  Players[0].Nick        := 'Nick'; //2-4 letters of username
  Players[0].Integers[1] := 10; //Number of loads before switching
  Players[0].Booleans[1] := True; //Is the axe wielded?
  Players[0].Active      := True; //Active

  Players[1].Name        := 'Username'; //UserName
  Players[1].Pass        := 'Password'; //Password
  Players[1].Nick        := 'Nick'; //2-4 letters of username
  Players[1].Integers[1] := 10; //Number of loads before switching
  Players[1].Booleans[1] := True; //Is the axe wielded?
  Players[1].Active      := True;

  Players[2].Name        := 'Username'; //UserName
  Players[2].Pass        := 'Password'; //Password
  Players[2].Nick        := 'Nick'; //2-4 letters of username
  Players[2].Integers[1] := 10; //Number of loads before switching
  Players[2].Booleans[1] := True; //Is the axe wielded?
  Players[2].Active      := True; //Active

  Players[3].Name        := 'Username'; //UserName
  Players[3].Pass        := 'Password'; //Password
  Players[3].Nick        := 'Nick'; //2-4 letters of username
  Players[3].Integers[1] := 10; //Number of loads before switching
  Players[3].Booleans[1] := True; //Is the axe wielded?
  Players[3].Active      := True; //Active

  Players[4].Name        := 'Username'; //UserName
  Players[4].Pass        := 'Password'; //Password
  Players[4].Nick        := 'Nick'; //2-4 letters of username
  Players[4].Integers[1] := 10; //Number of loads before switching
  Players[4].Booleans[1] := True; //Is the axe wielded?
  Players[4].Active      := True; //Active

  Players[5].Name        := 'Username'; //UserName
  Players[5].Pass        := 'Password'; //Password
  Players[5].Nick        := 'Nick'; //2-4 letters of username
  Players[5].Integers[1] := 10; //Number of loads before switching
  Players[5].Booleans[1] := True; //Is the axe wielded?
  Players[5].Active      := True; //Active

  Writeln('Using '+IntToStr(HowManyPlayers)+' Players');
  NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
end;

procedure LoadDTMs;
begin
  WillowLog := DTMFromString('78DA639CCEC4C0F0940105B83B48308800694' +
       '620FE0F048C3D40357719D000231209A41700D5DC22A0663150CD' +
       '1B026AFA816A3E1050D38EE966743500A9740DA6');
end;

function CountItemDTM(DTM: Integer): Integer;
var
  i, x, y: Integer;
  TB: Tbox;
begin
  if not LoggedIn then
  Exit;
  GameTab(4);
  for i := 1 to 28 do
  begin
    TB := InvBox(i);
    if ExistsItem(i) then
      if (FindDTM(DTM, x, y, TB.x1, TB.y1, TB.x2, TB.y2)) then
      begin
        Inc(Result);
      end;
  end;
end;

procedure Login;
begin
 if (not(LoggedIn)) then
 LoginPlayer;
end;

procedure DoChats;
begin
  if (not(LoggedIn)) then
  Exit;
  SetChat('on', 1);
  SetChat('friends', 2);
  SetChat('on', 3);
  SetChat('on', 4);
end;

function FindFastRandoms: Boolean;
var
  i: Integer;
begin
  for i:=1 to 10 do
  begin
    case I of
     1:  If FindDead then
           Result := True;
     2:  If FindMod then
           Result := True;
     3:  If FindMime then
           Result := True;
     4:  If FindMaze then
           Result := True;
     5:  If FindQuiz then
           Result := True;
     6:  If FindDemon then
           Result := True;
     7: begin
           if NoGameTab then
           begin
             Result := True;
             Players[CurrentPlayer].loc := 'No GameTab';
             Logout;
             Exit;
           end;
         end;
     8: begin
           if InBlack then
           begin
             Result := True;
             Players[CurrentPlayer].loc := 'InBlack';
             Logout;
             Exit;
           end;
         end;
       9: RC;
       10: Respond;
    end;
    wait(1);
  end;
end;

procedure FindRandoms;
begin
  FindTalk;
  FindFastRandoms;
  FindNormalRandoms;
  FindLamp('Woodcutting');
  SolvePinball;
  FindEnt(x, y, true);
  if (FindFight) then
  begin
    MakeCompass('N');
    RunTo('N', True);
    Wait(7000 +Random(3000));
    RunBack;
  end;
end;

procedure AntiBan;
begin
  if (not(LoggedIn)) then
  Exit;
  case Random(8) of

    0: RandomRClick;
    1: HoverSkill('Woodcutting', False);
    2: RandomMovement;
    3: BoredHuman;
    4: PickUpMouse;
    5: AlmostLogout;
    6: DoEmote(1 +Random(20));
    7: begin
         GameTab(1 +Random(12));
         wait(2000 +Random(1000));
         GameTab(4);
       end;
    end;
end;

procedure EntFinder; // Thanks to YoHoJo. Modded by Bobbohobbo
var
  EX, EY: integer;
  FX, FY: integer;
  SafeEntWait: LongInt;
begin
  if (not (LoggedIn)) then
  Exit;
  begin
    Status('Checking For Ent')
      if
      (FindObjCustom(EX, EY, ['Willow'], [4690821], 5)) then
    begin
      MMouse(EX, EY, 0, 0)
        if FindColorTolerance(FX, FY, 55769, 85, 15, 115, 15, 20) then
      begin
        Status('Ent Found');
        MouseFindFlag(645, 83, 2, 2);
        MarkTime(SafeEntWait)
          repeat
          FTWait(5)
            FindNormalRandoms;
          if not (LoggedIn) then
            NextPlayer(False);
        until TimeFromMark(SafeEntWait) > 29000 + Random(10000)
      end;
    end;
  end;
end;

function FindTheAxe : Boolean;
var
  InvAxe, WieldAxe, Ix, Iy, i: Integer;
  dtmAxes: array[0..6] of Integer;
begin
  if LoggedIn then
  begin
    GameTab(4);
    DTMAxes[1]:= DTMFromString('78DA63F4606260B8CD8002ECED63197418191' +
       '88088E13F1030FA00D5DC4355932EC2C160C4005103028C8E4035' +
       'D719D000231209A42D816ADE1250630D54F381801A3BA09A3BF8D' +
       '500005D910CA6');
    GameTab(5);
    for WieldAxe := 1 to 2 do
    begin
      if(WieldAxe = 2)then
        Break;
      if(FindDtm(dtmAxes[WieldAxe], Ix, Iy, MIX1, MIY1, MIX2, MIY2))then
        Break;
    end;
    GameTab(4);
    for InvAxe := 1 to 2 do
    begin
      if(InvAxe = 2)then
        Break;
      if(FindDtm(dtmAxes[InvAxe], Ix, Iy, MIX1, MIY1, MIX2, MIY2))then
       Break;
    end;

    if(InvAxe = 2)and(WieldAxe = 2)then
    begin
      Result := False;
      Writeln('No axe was found.');
      FreeDtm(dtmAxes[0]);
      Exit;
    end;
    if((InvAxe - WieldAxe) < 0)then
      EquipAxe := False
    else
      EquipAxe := True;
      Result := True;
      //FreeDtm(dtmAxes[0]);
      Writeln('Found axe');
  end;
end;

procedure CheckAxe;
begin
  if (not(LoggedIn)) then
  Exit;
  begin
    if (FindTheAxe = True) then
    Exit;
    if (FindTheAxe = false) then
    begin
      SymbolAccuracy:= 0.4;
      Makecompass('N');
      HighestAngle;
      FindSymbol(x, y, 'bank');
      OpenBankQuiet('db');
      Flag;
      Wait(500 + random(500));
      Withdraw(1, 1, 1);
      CloseBank;
      Players[CurrentPlayer].Booleans[1] := False;
      Writeln('Got a axe from the bank now back to chopping!');
      if (FindTheAxe = true)then
      Exit;
    end;
    if (FindTheAxe = false) then
    Writeln('No axe. Logging out');
    NextPlayer(False);
  end;
end;

procedure Counting;
begin
  if not LoggedIn then
  Exit;
  Willow:= CountItemDTM(WillowLog);
  Writeln('Count: ' +IntToStr(Willow));
end;

function InChatLine(myString: string): Boolean;
begin
Result := ( pos(myString, TheLine) <> 0 );
end;

procedure AutoResponder;
begin
  if (not(LoggedIn)) then
  Exit;
  if (AutoRespond = True) then
  begin

    if ( OldLine = TheLine ) or ( pos(Players[CurrentPlayer].Nick, TheName) <> 0 ) then
      Exit;

    if InChatLine(Players[CurrentPlayer].Nick) then
    begin
      Wait(1000 + Random(500));
      case Random(7) of
        0: TypeSend('hello');
        1: TypeSend('hi');
        2: TypeSend('hey');
        3: TypeSend('hey you');
        4: TypeSend('yo');
        5: TypeSend('sup?');
        6: TypeSend('alright');
      end;

      Exit;
    end;

    if ( InChatLine('wc') or InChatLine('woodcut') or InChatLine('cut') ) and
       ( InChatLine('lv') or InChatLine('leve') ) then
    begin
      Wait(1000 + Random(500));
      case Random(3) of
        0: TypeSend( IntToStr( Players[CurrentPlayer].Level[20] ) );
        1: TypeSend( IntToStr( Players[CurrentPlayer].Level[20] ) + ', you?');
        2: TypeSend( IntToStr( Players[CurrentPlayer].Level[20] ) + ' here');
      end;

      Exit;
    end;

    if InChatLine('hi ') or InChatLine('ello') or InChatLine('sup') or
       InChatLine('whats up') then
    begin
      Wait(1000 + Random(500));
      case Random(4) of
        0: TypeSend('hello');
        1: TypeSend('hey');
        2: TypeSend('hey you');
        3: TypeSend('hi');
      end;

      Exit;
    end;

    if InChatLine('lol') or InChatLine('hehe') or InChatLine('hihi') or
       InChatLine('haha') then
    begin
      Wait(1000 + Random(500));
      case Random(4) of
        0: TypeSend('lol');
        1: TypeSend('hehe');
        2: TypeSend('hihi');
        3: TypeSend('whaha');
      end;

      Exit;
    end;

    if InChatLine('hi ') or InChatLine('ello') or InChatLine('sup') or
       InChatLine('whats up') then
    begin
      Wait(1000 + Random(500));
      case Random(4) of
        0: TypeSend('hello');
        1: TypeSend('hey');
        2: TypeSend('hey you');
        3: TypeSend('hi');
      end;

      Exit;
    end;

    if InChatLine('noob') or InChatLine('n00b') or InChatLine('loser') or
       InChatLine('newb') then
    begin
      Wait(1000 + Random(500));
      case Random(5) of
        0: TypeSend('watch your mouth.');
        1: TypeSend('whos the noob ?');
        2: TypeSend('im no noob, period.');
        3: TypeSend('lol, thats funny.');
        4: TypeSend('?');
      end;

      Exit;
    end;
  end;
end;

procedure Chop;
var CuttingTime : integer;
begin
  MarkTime(CuttingTime);
  repeat
    if (not(LoggedIn)) then
    Exit;
    MakeCompass('N');
    HighestAngle;
    if (FindObj(x, y, 'illow', WillowColor, 5)) or
    (FindObj(x, y, 'illow', WillowColorB, 5)) or
    (FindObj(x, y, 'illow', WillowColorC, 5)) then
    begin
      MMouse(x, y, 2, 2);
      EntFinder;
      FindEnt(x, y, True);
      if (IsUpText('illow')) then
      begin
        GetMousePos(x, y);
        Mouse(x, y, 1, 1, true);
        Wait(4000 +Random(3000));
        FindRandoms;
        AutoResponder;
      end;
    end;
  until (InvFull) or (TimeFromMark(CuttingTime) > 600000+random(60000));
  Writeln('Chopped a full load of willows, now heading for the bank');
end;

procedure WillowsWalk;
var WaterColor : integer;
begin
  if (not(LoggedIn)) then
  Exit;
  MakeCompass('N');
  HighestAngle;
  WaterColor := FindWaterColor;
  RadialWalk(WaterColor, 225, 351, 64, 2, 2);
  Flag;
  Writeln('We are at the willows');
end;

procedure BankWalk;
begin
  if (not(LoggedIn)) then
    Exit;
    SymbolAccuracy:= 0.4;
    Makecompass('N');
    HighestAngle;
    if (not(FindSymbol(x, y, 'bank'))) then
    begin
      NextPlayer(False);
    end;
  begin
    if (FindSymbol(x, y, 'bank')) then
    begin
      Mouse(x, y, 2, 2, true);
      Flag;
      Writeln('We made it to the bank');
    end;
  end;
end;

procedure BankIt;
var Tries : Integer;
begin
  if (not(LoggedIn)) then
  Exit;
  repeat
    MakeCompass('N');
    HighestAngle;
    OpenBankQuiet('db');
    Flag;
    Wait(500 + random(500));
    FixBank;
    Tries := Tries + 1;
    if (Tries = 25) then
    begin
      NextPlayer(False);
      Exit;
    end;
  until (BankScreen)
  begin
    if (BankScreen) then
    begin
      Counting;
      if (Players[CurrentPlayer].Booleans[1] = True) then
      begin
          DepositAll;
          CloseBank;
          MakeCompass('N');
        end;
      begin
        if (Players[CurrentPlayer].Booleans[1] = False) then
        begin
            Deposit(2, 28, 2);
            CloseBank;
            MakeCompass('N');
          end;
        end;
      begin
        TotalWillows:= TotalWillows + Willow;
        Banked := Banked + 1
        Writeln('Deposited a full load of willows, now going to chop more');
      end;
    end;
  end;
end;

procedure Report;
begin
  ClearDebug;
  Writeln('[=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-]');
  Writeln('| ~ Rune Killers Willow Smasher & Banker ~ |');
  Writeln('|=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-|');
  ConvertTime(GetTimeRunning, H, M, S);
  Writeln('|You are using V2.2');
  Writeln('|Time Run: ' + IntToStr(H) + ':' + IntToStr(M) + ':' + IntToStr(S));
  Writeln('|Chopped: ' + IntToStr(TotalWillows) + ' Logs');
  Writeln('|Banked: ' + IntToStr(Banked) + ' Loads Of Willows');
  Writeln('|Avioded: ' +IntToStr(EntsAvioded) + ' Number Of Ents');
  Writeln('--------------------------------------------')
end;

procedure ScriptReport;
begin
  ReportVars[0] := ReportVars[0] + 28;
  ReportVars[1] := ReportVars[1] + 1;
end;

Begin
  SetupSRL;
  SetupWoodcutting;
  ScriptID := '279';
  SRLId := YourSRLID;
  SRLPassword := YourSRLPassword;
  ActivateClient;
  DeclarePlayers;
  LoadDTMs;
  if (not(LoggedIn)) then Login;
  HighestAngle;
  DoChats;
  CheckAxe;
  repeat
    WillowsWalk;
    repeat
      Chop;
      until (InvFull) or (not LoggedIn)
      CheckAxe;
      AntiBan;
      BankWalk;
      BankIt;
      SRLRandomsReport;
      ScriptReport;
      Report;
      TotalWillows:= 0;
    until Players[CurrentPlayer].Integers[1] = Banked
    NextPlayer(True);
end.

end.
 
.. What does it say is wrong with line 38?
 
Runescape Gamblingrunescape gambling
Back
Top