need help with maple mashers script

Discussion in 'Scar/Simba Help' started by BuGGey, Oct 23, 2007.

need help with maple mashers script
  1. Unread #1 - Oct 23, 2007 at 2:49 AM
  2. BuGGey
    Referrals:
    0

    BuGGey Guest

    need help with maple mashers script

    i got the maple masher script from this link http://www.sythe.org/archive/index.php/t-303248.html
    and i c/p into notebook then saved it into the scar 3.12 folder etc

    this is what my script looks like in scar can someone tell me what ive done wrong i get an error saying

    [Runtime Error] : Out Of Range in line 23 in script C:\Program Files\SCAR 3.12\Scripts\maple masher.txt
    i have my user name typed in on line 23 between the ' ' and it says something is wrong with it also if u could tell me anything else ive done wrong would be nice :D thanks


    program ZetasMapleMasher;
    {.include SRL\SRL.scar}
    {.include SRL\SRL\Skill\Woodcutting.SCAR}

    const
    Maple = 19058; //the colors of the maples
    Maple2 = 16760;
    Maple3 = 9548;
    Tol = 10; //tolerance to find the maple
    AntiBanAmount= 75; //Set this for the chance of Antiban to do something.
    //75 is default, lower for more antiban, higher for less.

    var
    Loads:integer;


    procedure DeclarePlayers;
    begin
    HowManyPlayers := 0; //How many players there are
    NumberOfPlayers(HowManyPlayers); //Leave this alone
    CurrentPlayer := 0; //The player to start with

    Players[0].Name := '******'; //Player's username
    Players[0].Pass := '********'; //Player's password
    Players[0].Nick := '******'; //3-4 characters of player's username, no capitals or spaces
    Players[0].Booleans[1] := True; //Is the axe wielded?
    Players[0].Pin := 0000; //Your pin if you have one, if not just don't touch it.
    Players[0].Active := True; //Do you want to use this player?
    Players[0].Integers[0] := 3; //Loads for player to do


    Players[1].Name := '';
    Players[1].Pass := '';
    Players[1].Nick := '';
    Players[1].Booleans[1] := True;
    Players[1].Pin := 0000;
    Players[1].Active := True;
    Players[1].Integers[0] := 2;

    Players[2].Name := '';
    Players[2].Pass := '';
    Players[2].Nick := '';
    Players[2].Booleans[1] := True;
    Players[2].Pin := 0000;
    Players[2].Active := False;
    Players[2].Integers[0] := 2;
    NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
    Writeln ('There are ' + Inttostr(HowManyPlayers)+ ' Players');
    end;


    function RadialToleranceWalk(TheColor: Integer; StartRadial, EndRadial: Integer;
    Radius: Integer; Xmod, Ymod, Tol: Integer): Boolean; // By Wizzup? and WT-Fakawi.
    var
    i, X1, Y1, x, y: Integer;
    begin
    if (RoadColorChecker) then
    if (DebugRadialRoad) then
    WriteLn(' THROUGH RADIALROADWALK= ---> ' + IntToStr(RoadColor));
    if (StartRadial = EndRadial) then
    begin
    WriteLn('Using LinearRoadWalk, equal values.')
    if LinearRoadWalk(TheColor, StartRadial, Radius, Xmod, Ymod) then
    Result := True;
    end
    else if (StartRadial < EndRadial) then
    begin
    repeat
    for i := StartRadial to EndRadial do
    begin
    x1 := Round(Radius * Sine(i)) + 646;
    y1 := Round(-Radius * Cose(i)) + 84;
    if Not LoggedIn then Exit;
    if (FindColorTolerance(x, y, TheColor, X1, Y1, X1 + 1, Y1 + 1, Tol)) then
    begin
    MouseFindNoFlag(X,Y,Xmod,Ymod);
    Result := True;
    CountFlag(10);
    Exit;
    end;
    end;
    Radius := Radius - 4;
    until (Radius <= 1);
    end else
    if (StartRadial > EndRadial) then
    begin
    repeat
    for i := StartRadial downto EndRadial do
    begin
    x1 := Round(Radius * Sine(i)) + 646;
    y1 := Round(-Radius * Cose(i)) + 84;
    if Not LoggedIn then Exit;
    if (FindColorTolerance(x, y, TheColor, X1, Y1, X1 + 1, Y1 + 1, Tol)) then
    begin
    MouseFindNoFlag(X,Y,Xmod,Ymod);
    Result := True;
    CountFlag(10);
    Exit;
    end;
    end;
    Radius := Radius - 4;
    until (Radius <= 1);
    end
    end;



    function MyOpenBank: Boolean;
    var
    x, y, fs, tries, fs2: Integer;
    begin
    if not BankScreen then
    repeat
    if FindObjCustom(x, y, ['ank booth'], [980573, 3691619], 4) then
    Mouse(x, y, 4, 4, False)
    else if (FindObj(x, y, 'Use Bank', 2842230, 5)) then
    Mouse(x, y, 4, 4, False)
    else if (FindObj(x, y, 'Use Bank', 12611, 5)) then
    Tries:=Tries+1;
    Mouse(x, y, 4, 4, False);
    Wait(250+random(100));
    if (ClickOption('quickly', 1)) then
    begin
    FFlag(0);
    repeat
    Wait(100);
    Inc(fs);
    until (BankScreen) or (fs >= 50) or (Tries = 8);
    begin
    if (Tries = 8) then
    Writeln('Tried to find the bank booth 8 times, something went wrong, next player.');
    Logout;
    Exit;
    end;
    end;
    Inc(fs2);
    until (BankScreen) or (fs2 > 5);
    Result := BankScreen;
    end;



    procedure SetupClient;
    begin
    if (not(LoggedIn)) then Exit;;
    Writeln('Setting chats and run');
    SetChat('on', 1);
    Wait(400+random(500));
    SetChat('off', 2);
    Wait(400+random(500));
    SetChat('off', 3);
    Wait(400+random(500));
    SetChat('off', 4);
    Wait(400+random(500));
    Setrun(true);
    end;

    Function FindFastRandoms: Boolean; // By WT-Fakawi.
    Var
    i: Integer;
    Begin
    if not LoggedIn then Exit;
    For I := 1 To 10 Do
    Begin
    Case I Of
    1: If FindDead Then
    Result := True;
    2: If FindMime Then
    Result := True;
    3: If FindMaze Then
    Result := True;
    4: If FindQuiz Then
    Result := True;
    5: If FindDemon Then
    Result := True;
    6: Begin
    If NoGameTab Then
    Begin
    Result := True;
    Players[CurrentPlayer].loc := 'No GameTab';
    Players[CurrentPlayer].Active := False;
    Logout;
    Exit;
    End;
    End;
    7 : If RC Then
    Result:=True;
    8 : If FindFight Then
    Result := True;
    9 : If FindTalk Then
    Result := True;
    10: If FindCerter Then
    Result := True;
    End;
    Wait(1);
    End;
    End;


    procedure AntiRandoms;
    begin
    if not LoggedIn then Exit;
    FindTalk;
    FindNormalRandoms;
    FindFastRandoms;;
    FindLamp('Woodcutting');
    SolvePinball;
    if (FindFight) then
    begin
    MakeCompass('N');
    RunTo('W', True);
    Wait(6000 +Random(6423));
    RunBack;
    end;
    end;



    Procedure AntiBan1;
    begin
    if not LoggedIn then Exit;

    case Random(AntiBanAmount) of
    0: MMouse(300, 300, 500, 500);
    1: begin
    HoverSkill('Woodcutting',false);
    wait(2364+Random(413));
    GameTab(4);
    end;
    2: PickUpMouse;
    3: begin
    MakeCompass('N');
    wait(10+random(5));
    MakeCompass('S');
    wait(10+random(5));
    MakeCompass('N');
    end;

    9: begin
    HoverSkill('Random',false);
    wait(2364+Random(413));
    GameTab(4);
    end;

    4: MMouse(300, 300, 500, 500);
    5: begin
    LowestAngle;
    wait(10+random(74));
    HighestAngle;
    end;

    6: SleepAndMoveMouse(5000+random(3000));
    7: MMouse(300, 300, 600, 600);
    8: begin
    GameTab(1 + Random(12));
    wait(800+random(1100));
    end;

    end;
    end;


    procedure WalkToMaples;
    var
    x, y: integer;
    begin
    if(not LoggedIn) then Exit;
    SymbolAccuracy := 0.2;
    MakeCompass('N');
    HighestAngle;
    AntiRandoms;
    Writeln('Trying to walk to maples..');
    if(RadialToleranceWalk(98061, 330, 384, 65, 10, 12, 20)) then
    begin
    Antirandoms;
    Flag;
    end else
    Writeln('Could not radial walk for some reason, trying to find tree symbol.');
    begin
    if (not(FindSymbol(x, y, 'tree'))) then
    begin
    Writeln('Did not find tree symbol either, next player.');
    Logout;
    Exit;
    end;
    Mouse(x, y, 10, 10, true);
    AntiRandoms;
    Flag;
    Writeln('Found the symbol, :D');
    end;
    Writeln('Correctly walked to maples.');
    end;


    procedure ChopMaples;
    var
    x, y, ChopMark: Integer;
    begin
    if not LoggedIn then Exit;
    repeat
    if FindObjCustom(x, y, ['aple tree'], [Maple, Maple2, Maple3], Tol) then
    begin
    Writeln('Found a maple... chopping');
    if not(FindEnt(x,y,true)) then
    Mouse(x, y, 0, 0, True);
    AntiRandoms;
    MarkTime(ChopMark);
    repeat
    Wait(500 + Random(250));
    AntiRandoms;
    Antiban1;
    until(TimeFromMark(ChopMark) >= (8000 + Random(2000))) or (InvFull) or (not (LoggedIn));
    end;
    until (InvFull);
    end;

    procedure WalkToBank;
    var
    x,y: integer;
    begin
    if not LoggedIn then Exit;
    SymbolAccuracy:= 0.1;
    Makecompass('N');
    HighestAngle;
    begin
    if (FindSymbol(x, y, 'bank')) then
    begin
    Writeln('Found bank symbol... walking to bank');
    Mouse(x, y, 50, 50, true);
    AntiRandoms;
    Flag;
    end else
    Writeln('Could not find the bank symbol, trying to radial walk');
    if (not(RadialToleranceWalk(7368572 , 210, 141, 52, 0, 0, 5))) then
    begin
    Writeln('Couldnt radial walk either.. next player.');
    Logout;
    Exit;
    end;
    AntiRandoms;
    Flag;
    Writeln('Yes! Radial walk was successful');
    end;
    Writeln('Correctly walked to bank');
    end;

    procedure Bank;

    begin
    if not LoggedIn then Exit;
    Writeln('Trying to find bankbooth');
    MyOpenBank;
    if(PinScreen) then
    begin
    InPin(IntToStr(Players[CurrentPlayer].Pin))
    end;
    if (BankScreen) then
    Writeln('Found bankbooth... banking');
    FixBank;
    begin
    if (Players[CurrentPlayer].Booleans[1] = True) then
    begin
    Deposit(1,28,2);
    Writeln('Correctly deposited');
    Closebank;
    Writeln('Correctly closed bank');
    MakeCompass('N');
    Writeln('Made compass north');
    Loads:=Loads+1;
    end;
    end;

    begin
    if (Players[CurrentPlayer].Booleans[1] = False) then
    begin
    Deposit(2, 28, 2);
    Writeln('Correctly deposited');
    CloseBank;
    Writeln('Correctly closed bank');
    MakeCompass('N');
    Writeln('Made compass north');
    Loads:=Loads+1;
    end;
    end;
    Writeln('Correctly banked.');
    end;


    procedure Proggy;
    begin
    Writeln('~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!' );
    Writeln('~!~Zetas Maple Masher Proggy Report~!~!~');
    Writeln('~!~Script has run for ' + (TimeRunning) + '~!~');
    Writeln('~!~Did ' + IntToStr(Loads)+ ' loads.~!~!~!~!~!');
    Writeln('~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!' );
    end;


    procedure MainLoop;
    label
    Chopping;
    begin
    ActivateClient;
    SetUpSRL;
    DeclarePlayers;
    LoginPlayer;
    SetupClient;
    Chopping:
    repeat
    if not LoggedIn then Break;
    WalkToMaples;
    ChopMaples;
    WalkToBank;
    Bank;
    until(Loads >= Players[CurrentPlayer].Integers[0]) or (not(LoggedIn));
    Proggy;
    if (Loads >= Players[CurrentPlayer].Integers[0]) then
    NextPlayer(True);
    if (not(LoggedIn)) then
    NextPlayer(False);
    if ((CurrentPlayer + 1) >= HowManyPlayers) then TerminateScript
    begin
    goto Chopping;
    end;
    end;

    begin
    MainLoop;
    end.
     
  3. Unread #2 - Oct 23, 2007 at 3:29 AM
  4. BuGGey
    Referrals:
    0

    BuGGey Guest

    need help with maple mashers script

    bump.....can i get a reply now lol
     
  5. Unread #3 - Oct 23, 2007 at 4:17 AM
  6. BuGGey
    Referrals:
    0

    BuGGey Guest

    need help with maple mashers script

    bump .........................
     
  7. Unread #4 - Oct 23, 2007 at 2:31 PM
  8. Town
    Joined:
    Jan 21, 2007
    Posts:
    3,776
    Referrals:
    3
    Sythe Gold:
    5

    Town Grand Master
    Scar Programmers

    need help with maple mashers script

    HowManyPlayers should be 1 because that's how many players you are using. Delete all of the players you don't use.
     
< auto dropper script help | help me please with Scar >

Users viewing this thread
1 guest


 
 
Adblock breaks this site