Results 1 to 10 of 10

Thread: omgzzz script errorzzzz

  1. #1
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default omgzzz script errorzzzz

    SCAR Code:
    Program Hermpie;
    {.Include SRl/SRl.Scar}
    {.include SRL/SRL/Misc/Users.scar}

    Var
      X, Y, Loads : Integer;// Normal Variables
      Bone, BigBone, OpenFWBank : Integer;// DTM Variables
    {==========================]
      Loads The DTMs In Memory
    [==========================}

    Procedure LoadDTMs;
    Begin
      Bone := DTMFromString('78DA637462626078C200068C108AE1CCD1230' +
            'C9250FE7F2060B400AA79C080061851F4303A00D5DC26A0C606A8' +
            'E6150135BE40354F09A87104AA794D408D3B50CD3DFC6A0003390' +
            'E90');
      BigBone := DTMFromString('78DA63B467626078C400068C108AE1D9E3C70' +
               'C9250FE7F20603407AA79CA80061851F430FA00D5BC2642CD0302' +
               '6A1C806A9E1350E30254F392801A3BA09ADB4498739F801A5B22D' +
               'CE30E54F30CBF1A009C351275');
      OpenFWBank := DTMFromString('78DA635465646038CF00068C108AA13AC58D4' +
                  '112CAFF0F048C2035BB51D504DAABC1D580C5AD802C25461435ED' +
                  'CEF6A86ADA802C055435C78FEF4355130464ED40B52BD4490355C' +
                  'D2F20B10FBF7B00443410E9');
    End;

    Function WaitUntil(Secs, UntilProc : Integer):Boolean;
    Var
      Time : Integer;
    Begin
      Time:= 0;
      MarkTime(Time)
      Repeat
        Wait(50 + Random(25));
      Until Time > Secs or UntilProc;
      if Time > Secs or UntilProc = False then Result:=False else Result:=True
    End;
    {==========================]
      Performs Anti-Ban
    [==========================}

    Procedure AntiBan;
    Begin
      If Not (LoggedIn) Then Exit;


    End;

    {==========================]
      Take's Bones From Bank
    [==========================}

    Procedure Bank;
    Begin
      If Not (LoggedIn) Then Exit;
      If DTMRotated(OpenFWBank, X, Y, MSX1, MSY1, MSX2, MSY2) Then
      Begin
        Mouse(X,Y,3,3,False);
        Wait(50 + Random (25));
        If ChooseOption('Quickly') Then if WaitUntil(5000,BankScreen) then
        begin
          If Players[CurrentPlayer].Boolean[2] Then
          Begin
            If FindDTM(BigBone, X, Y, MSX1, MSY1, MSX2, MSY2) then
            Begin
              WaitUntil(5000,ChooseOption('ll'));
              CloseBank;
              GameTab(4);
            End Else
              If FindDTM(Bone, X, Y, MSX1, MSY1, MSX2, MSY2) Then
              WaitUntil(5000,ChooseOption('ll'));
              CloseBank;
              GameTab(4);
          End Else
            If FindDTM(Bone, X, Y, MSX1, MSY1, MSX2, MSY2) then
            WaitUntil(5000,ChooseOption('ll'));
            CloseBank;
            GameTab(4);
        End Else
          Begin
            CloseBank;
            logout;
          End;
      End Else
      OpenBankQuiet('FWB');
    End;

    {==========================]
      Bury's The Bones
    [==========================}

    Procedure Bury;
    Begin
      If Not (LoggedIn) Then Exit;


    End;

    {==========================]
      Writes an ProgressReport
    [==========================}

    Procedure ProgressReport;
    Begin


    End;

    {==========================]
      Multi-Player Procedure
    [==========================}

    Procedure LoginNewPlayer;
    Begin
      If LoggedIn Then Exit;
      If Not(LoggedIn) Then If Players[CurrentPlayer].Integers[0] > Loads then Nextplayer(True) else Nextplayer(False);
      Wait(1000 + Random(500));
      SetAngle(True);
      MakeCompass('N');
    End;

    {==========================]
      Main Loop
    [==========================}

    Begin
      SetupSrl;
      SRLPlayerForm(True, ['Bank(True), Pick-Up(False)','Use BigBones'], ['How Many Loads'], [''], ['']);
      LoginPlayer;
      Repeat
        LoginNewPlayer;
        Bank;
     
     
      Until (False);
     
    End.

    run it and see the error and fix for me!! :P xD

    Thanks Hermpie
    ~Hermen

  2. #2
    Join Date
    Jul 2007
    Posts
    1,431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Program Hermpie;
    {.Include SRl/SRl.Scar}
    {.include SRL/SRL/Misc/Users.scar}

    Var
      X, Y, Loads : Integer;// Normal Variables
      Bone, BigBone, OpenFWBank : Integer;// DTM Variables
    {==========================]
      Loads The DTMs In Memory
    [==========================}

    Procedure LoadDTMs;
    Begin
      Bone := DTMFromString('78DA637462626078C200068C108AE1CCD1230' +
            'C9250FE7F2060B400AA79C080061851F4303A00D5DC26A0C606A8' +
            'E6150135BE40354F09A87104AA794D408D3B50CD3DFC6A0003390' +
            'E90');
      BigBone := DTMFromString('78DA63B467626078C400068C108AE1D9E3C70' +
               'C9250FE7F20603407AA79CA80061851F430FA00D5BC2642CD0302' +
               '6A1C806A9E1350E30254F392801A3BA09ADB4498739F801A5B22D' +
               'CE30E54F30CBF1A009C351275');
      OpenFWBank := DTMFromString('78DA635465646038CF00068C108AA13AC58D4' +
                  '112CAFF0F048C2035BB51D504DAABC1D580C5AD802C25461435ED' +
                  'CEF6A86ADA802C055435C78FEF4355130464ED40B52BD4490355C' +
                  'D2F20B10FBF7B00443410E9');
    End;

    Function WaitUntil(Secs : integer; UntilProc : boolean):Boolean;
    Var
      Time : Integer;
    Begin
      MarkTime(Time)
      Repeat
        Wait(50 + Random(25));
      Until (Time > Secs) or (UntilProc);
      if untilproc then Result:=true;
      if Time > Secs then Result:=false;
    End;
    {==========================]
      Performs Anti-Ban
    [==========================}

    Procedure AntiBan;
    Begin
      If Not (LoggedIn) Then Exit;


    End;

    {==========================]
      Take's Bones From Bank
    [==========================}

    Procedure Bank;
    Begin
      If Not (LoggedIn) Then Exit;
      If DTMRotated(OpenFWBank, X, Y, MSX1, MSY1, MSX2, MSY2) Then
      Begin
        Mouse(X,Y,3,3,False);
        Wait(50 + Random (25));
        If ChooseOption('Quickly') Then if WaitUntil(5000,bankscreen) then
        begin
          If Players[CurrentPlayer].Booleans[2] Then
          Begin
            If FindDTM(BigBone, X, Y, MSX1, MSY1, MSX2, MSY2) then
            Begin
              WaitUntil(5000,ChooseOption('ll'));
              CloseBank;
              GameTab(4);
            End Else
              If FindDTM(Bone, X, Y, MSX1, MSY1, MSX2, MSY2) Then
              WaitUntil(5000,ChooseOption('ll'));
              CloseBank;
              GameTab(4);
          End Else
            If FindDTM(Bone, X, Y, MSX1, MSY1, MSX2, MSY2) then
            WaitUntil(5000,ChooseOption('ll'));
            CloseBank;
            GameTab(4);
        End Else
          Begin
            CloseBank;
            logout;
          End;
      End Else
      OpenBankQuiet('FWB');
    End;

    {==========================]
      Bury's The Bones
    [==========================}

    Procedure Bury;
    Begin
      If Not (LoggedIn) Then Exit;


    End;

    {==========================]
      Writes an ProgressReport
    [==========================}

    Procedure ProgressReport;
    Begin


    End;

    {==========================]
      Multi-Player Procedure
    [==========================}

    Procedure LoginNewPlayer;
    Begin
      If LoggedIn Then Exit;
      If Not(LoggedIn) Then If Players[CurrentPlayer].Integers[0] > Loads then Nextplayer(True) else Nextplayer(False);
      Wait(1000 + Random(500));
      SetAngle(True);
      MakeCompass('N');
    End;

    {==========================]
      Main Loop
    [==========================}

    Begin
      SetupSrl;
      SRLPlayerForm(True, ['Bank(True), Pick-Up(False)','Use BigBones'], ['How Many Loads'], [''], ['']);
      LoginPlayer;
      Repeat
        LoginNewPlayer;
        Bank;


      Until (False);

    End.
    [CENTER][SIZE="4"]Inactive[/SIZE]I forgot my password[/CENTER]

  3. #3
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    what ive done wrong?
    ~Hermen

  4. #4
    Join Date
    Sep 2007
    Posts
    415
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    here's what i see different between the two
    SCAR Code:
    Program Hermpie;
    {.Include SRl/SRl.Scar}
    {.include SRL/SRL/Misc/Users.scar}

    Var
      X, Y, Loads : Integer;// Normal Variables
      Bone, BigBone, OpenFWBank : Integer;// DTM Variables
    {==========================]
      Loads The DTMs In Memory
    [==========================}

    Procedure LoadDTMs;
    Begin
      Bone := DTMFromString('78DA637462626078C200068C108AE1CCD1230' +
            'C9250FE7F2060B400AA79C080061851F4303A00D5DC26A0C606A8' +
            'E6150135BE40354F09A87104AA794D408D3B50CD3DFC6A0003390' +
            'E90');
      BigBone := DTMFromString('78DA63B467626078C400068C108AE1D9E3C70' +
               'C9250FE7F20603407AA79CA80061851F430FA00D5BC2642CD0302' +
               '6A1C806A9E1350E30254F392801A3BA09ADB4498739F801A5B22D' +
               'CE30E54F30CBF1A009C351275');
      OpenFWBank := DTMFromString('78DA635465646038CF00068C108AA13AC58D4' +
                  '112CAFF0F048C2035BB51D504DAABC1D580C5AD802C25461435ED' +
                  'CEF6A86ADA802C055435C78FEF4355130464ED40B52BD4490355C' +
                  'D2F20B10FBF7B00443410E9');
    End;

    Function WaitUntil(Secs : integer; UntilProc : boolean):Boolean; //only Secs is integer
    Var
      Time : Integer;
    Begin
      MarkTime(Time)
      Repeat
        Wait(50 + Random(25));
      Until (Time > Secs) or (UntilProc);
      if untilproc then Result:=true;       {you had "Until Time > Secs or UntilProc;"}
      if Time > Secs then Result:=false;
    End;
    {==========================]
      Performs Anti-Ban
    [==========================}

    Procedure AntiBan;
    Begin
      If Not (LoggedIn) Then Exit;


    End;

    {==========================]
      Take's Bones From Bank
    [==========================}

    Procedure Bank;
    Begin
      If Not (LoggedIn) Then Exit;
      If DTMRotated(OpenFWBank, X, Y, MSX1, MSY1, MSX2, MSY2) Then
      Begin
        Mouse(X,Y,3,3,False);
        Wait(50 + Random (25));
        If ChooseOption('Quickly') Then if WaitUntil(5000,BankScreen) then
        begin
          If Players[CurrentPlayer].Booleans[2] Then //booleans not boolean
          Begin
            If FindDTM(BigBone, X, Y, MSX1, MSY1, MSX2, MSY2) then
            Begin
              WaitUntil(5000,ChooseOption('ll'));
              CloseBank;
              GameTab(4);
            End Else
              If FindDTM(Bone, X, Y, MSX1, MSY1, MSX2, MSY2) Then
              WaitUntil(5000,ChooseOption('ll'));
              CloseBank;
              GameTab(4);
          End Else
            If FindDTM(Bone, X, Y, MSX1, MSY1, MSX2, MSY2) then
            WaitUntil(5000,ChooseOption('ll'));
            CloseBank;
            GameTab(4);
        End Else
          Begin
            CloseBank;
            logout;
          End;
      End Else
      OpenBankQuiet('FWB');
    End;

    {==========================]
      Bury's The Bones
    [==========================}

    Procedure Bury;
    Begin
      If Not (LoggedIn) Then Exit;


    End;

    {==========================]
      Writes an ProgressReport
    [==========================}

    Procedure ProgressReport;
    Begin


    End;

    {==========================]
      Multi-Player Procedure
    [==========================}

    Procedure LoginNewPlayer;
    Begin
      If LoggedIn Then Exit;
      If Not(LoggedIn) Then If Players[CurrentPlayer].Integers[0] > Loads then Nextplayer(True) else Nextplayer(False);
      Wait(1000 + Random(500));
      SetAngle(True);
      MakeCompass('N');
    End;

    {==========================]
      Main Loop
    [==========================}

    Begin
      SetupSrl;
      SRLPlayerForm(True, ['Bank(True), Pick-Up(False)','Use BigBones'], ['How Many Loads'], [''], ['']);
      LoginPlayer;
      Repeat
        LoginNewPlayer;
        Bank;


      Until (False);

    End.

    got'em all i'm pretty sure
    Quote Originally Posted by That guy that wrote forefeathers
    <munklez>haha im too lazy, girls annoy me
    <munklez> they always wanna like, do stuff
    <munklez> and i just wanna program
    <munklez> and they always take all my money

  5. #5
    Join Date
    Jun 2007
    Posts
    152
    Mentioned
    4 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by hermpie View Post
    what ive done wrong?
    BankScreen returns a boolean

    In your waituntil function, you declared UntilProc as a integer.

  6. #6
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ow k, can some1 help me to get untilwait work

    because if i want to use it for waituntil bankscreen then i do
    if waituntil(5000,bankscreen) then The rest

    but that doesnt work
    ~Hermen

  7. #7
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    SCAR Code:
    Function WaitUntil(Secs : integer; UntilProc : boolean):Boolean;
    Var
      Time : Integer;
    Begin
      MarkTime(Time)
      Repeat
        Wait(50 + Random(25));
      Until (Time > Secs) or (UntilProc);  // it has to be Until (TimeFromMark(Time) > secs)
      if untilproc then Result:=true;
      if Time > Secs then Result:=false;
    End;

  8. #8
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i already fixed that sorry that i forgot the ''fixed'' one here but could some1 help me or explain me why it doesnt w8 until bankscreen or somthing.... and could explain how to fix
    ~Hermen

  9. #9
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Well from what I know, when you call the function it will check once if the bank screen is open. It will not check again during the loop. So if the bank screen isn't there when you call the function, untilwait will remain false.

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

    Default

    SCAR Code:
    Function WaitUntil(TimeMs: Integer; Statement: Boolean): Boolean;

    Var
      T: Integer;
     
    Begin

      T := GetSystemTime;
     
      Repeat
        Wait(50 + Random(25));
        Writeln(BoolToStr(Statement));
      Until Statement Or (GetSystemTime - T >= TimeMs);

      If ( Statement and (GetSystemTime - T < TimeMS )) Then
        Result := True;
       
    End;


    And yes, you do have to call it again, in the Until it stays the same, I checked...

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
  •