Results 1 to 13 of 13

Thread: Help...again

  1. #1
    Join Date
    Jan 2012
    Posts
    105
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help...again

    Ok now im getting the below error and it just keeps getting spamed over and over.

    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.

  2. #2
    Join Date
    Jan 2012
    Posts
    105
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Also how do you make the screen rotate after 5 seconds of no combat?

  3. #3
    Join Date
    Dec 2011
    Posts
    392
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by asap1 View Post
    Also how do you make the screen rotate after 5 seconds of no combat?
    Try to avoid double posting ^.^

    As for your finder error that means it was searching for something outside the width of the window. For example it's looking for a color but it it started looking outside the rs window because it couldn't find it and kept going. You can use findobjex() or findcolorex() to set an area to look in.

    To rotate compass your going to have to have a function that detects combat. If function = false then makecompass('n') or something else you want.

  4. #4
    Join Date
    Jan 2012
    Posts
    105
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by lilcmp1 View Post
    Try to avoid double posting ^.^

    As for your finder error that means it was searching for something outside the width of the window. For example it's looking for a color but it it started looking outside the rs window because it couldn't find it and kept going. You can use findobjex() or findcolorex() to set an area to look in.

    To rotate compass your going to have to have a function that detects combat. If function = false then makecompass('n') or something else you want.
    i am new to scripting and dont know how to do this can you or someone explain or give a example plz

  5. #5
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Could you post some code? That would help a lot
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  6. #6
    Join Date
    Jan 2012
    Posts
    105
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok im have a lot of problems

    1.it walks to bank, opens bank but does not withdraw from row 1 column 1 but from row 2 column 2.

    2.After it withdraws 28 lobsters 1 time it does it 3 more times.

    3.Screen spins in circle after withdrawing 28 lobsters 4 times and then scrip stops

    4.i still need help fixing this error-Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.

    5.Getting this error on line 158 function TurnScreen-[Error] (159:20): colon (':') expected at line 158
    Compiling failed.
    Simba Code:
    Program Al_Kharid_Warrior_Killer;
    {$i srl\srl\misc\smart.simba}
    {$i SRL\SRL.simba}
    {$i srl\srl\skill\fighting.simba}
    {$i sps/sps.simba}
    Var
      x, y: Integer;
      B: Array [0..3] of Integer;
      aFound: Extended;

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

      Players[0].Name := ''; // Username
      Players[0].Pass := ''; // Password
      Players[0].Nick := ''; // 3-4 lowercase letters from username
      Players[0].Active := True; // Set to true if you want to use Player 0
      Players[0].Pin := ''; // Bankpin Here
      Players[0].BoxRewards := ['Xp'];
    end;

    Procedure Attackwarrior;
    Var
      x, y: Integer;
    Begin
      If FindObjCustom( x, y, ['att', 'warrior'], [1321795, 5325613, 6509099], 3) Then
      Begin
        GetMousePos (x, y);

        Case Random (0) Of
          0: Mouse (x, y, 0, 0, True);
        End;
      End;
    End;

    ///// Credit goes to Tickyy
    Procedure Bankit;
     Var
      i: Integer;
    Begin
      If (Not (LoggedIn)) Then Exit;
      For i := 1 To 4 Do
      Begin
        If OpenBank('akb', True, True) Then
        begin
          Withdraw(1, 1, 28)
          CloseBank;
        end;
      End;
      Writeln('Banking Failed - Stoping Script');
      NextPlayer(False);
    End;

    Procedure SetDTM;
    Begin
      B[0] := DTMFromString('mrAAAAHic42BgYChhYmAIAuJVQLwSiu2h2AmI7YBqUoA4EYiDgdgTiKOBOByI/YB4em8qQ7ghG4NBkgiDQoQAg5U1Kxw7JEkxiADV4MOMBDAMAACI9AxR');
      B[1] := DTMFromString('mlwAAAHicY2dgYDBkYmBwAmJHKHYAYj8gjgfiQKC8CxCHAXE8EOcDsTMQOwHxzJ5UBqdEKQYbK1Y4NkoUYVAKF2AQAcrjwox4MBQAAKFHCbE=');
      B[2] := DTMFromString('mlwAAAHicY2dgYIhiYmDwAOJ6NOwOxJVA+Xwg9gXiHCCuBeIJQGwJxFt70hi+/+ZmMEoUYbCxYgVjENu70IRBBCiPCzPiwVAAABJQDU0=');

      B[3] := DTMFromString('mlwAAAHicY2dgYJjGxMDQBcSzgXg5FGcA8TIgTgPKewGxBxCHAXERlN0KxFt70hhsrFgZlMIFGIwSReC0qRYngwhQHhdmxIOhAADt4ww3');
    end;

    procedure FrDTM;
    begin
      FreeDTM(B[0]);
      FreeDTM(B[1]);
      FreeDTM(B[2]);
      FreeDTM(B[3]);
    end;

    Procedure ToBank;
    begin
        if FindDTMRotated(B[0], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
        FFlag(6);
        repeat
          Wait(50 + Random(25));
        until FindDTMRotated(B[1], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
      end;

      if FindDTMRotated(B[1], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
        FFlag(6);
        repeat
          Wait(50 + Random(25));
        until FindDTMRotated(B[2], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
      end;

      if FindDTMRotated(B[2], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
        FFlag(6);
        Bankit;
        repeat
          Wait(50 + Random(25));
        until FindDTMRotated(B[1], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
      end;

      if FindDTMRotated(B[1], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
        FFlag(6);
         repeat
          Wait(50 + Random(25));
        until FindDTMRotated(B[0], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
      end;

      if FindDTMRotated(B[0], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
        FFlag(6);
        repeat
          Wait(50 + Random(25));
        until FindDTMRotated(B[3], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
      end;

      if FindDTMRotated(B[3], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse((x-5), y, 3, 3, True);
        FFlag(6);
        FrDTM;
      end;
    end;

    Function LowHPLetsEat(What: String): Boolean;
    var
      I, x, y: Integer;
    begin
      Result := (HPPercent < 70) and (LoggedIn);
      If(not(Result)) then
        Exit;

      if Result then
      If InvEmpty then
      begin
        ToBank;
        Bankit;
      end else
      for i := 1 to 28 do
      begin
        InvMouse(I, 3);
        Wait(RandomRange(150, 250));
        if WaitUpText(What, RandomRange(250, 300)) then
        begin
          GetMousePos(x, y);
          Mouse(x, y, 0, 0, True);
          Exit;
        end else
          Continue;
      end;
    end;

    function TurnScreen;
    begin
      Result := not (Infight)
      If Result then
      makecompass('e')
      Wait(6000)
      If Result then
      makecompass('s') else
      exit;
    end;

    begin
      MouseSpeed := 15;
      Smart_Server := 0;
      Smart_Members := False;
      Smart_Signed := True;
      Smart_SuperDetail := False;
      ClearDebug;
      SetupSRL;

      DeclarePlayers;
      LoginPlayer;
      SetDTM;
      MouseSpeed := 18;
      If InvEmpty Then
      TerminateScript;

      repeat
      SetAngle(SRL_ANGLE_HIGH);
      Attackwarrior;
      While(Infight)do
      Wait(100);
      LowHPLetsEat('Lobster');
      Until not LoggedIn;
    end.

  7. #7
    Join Date
    Nov 2011
    Posts
    1,532
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    1. Withdraw(0, 0, 28); //bank index starts from 0.

    2. For i := 1 To 4 Do //that's why you do it 4 times

    3. No ideas yet

    4. Ignore these errors unless you've a very good reason you did something wrong.

    5. Bad standards without proper use of ;
    Simba Code:
    function TurnScreen;
    begin
      Result := not (Infight) //here
      If Result then
      makecompass('e') //here
      Wait(6000) //here
      If Result then
      makecompass('s') else
      exit;
    end;
    Current activity: Recovering from vacation
    - Nulla pars vitae vacare officio potest -
    SRL membership? Can I buy that?
    Scripts - AGS - SWF - WAR - EMS - W100S-EM
    If you need scripting help, you can pm me. Remember, if you need help you have to ask for it properly though

  8. #8
    Join Date
    Jan 2012
    Posts
    105
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by nosaj.421 View Post
    1. Withdraw(0, 0, 28); //bank index starts from 0.

    2. For i := 1 To 4 Do //that's why you do it 4 times

    3. No ideas yet

    4. Ignore these errors unless you've a very good reason you did something wrong.

    5. Bad standards without proper use of ;
    Simba Code:
    function TurnScreen;
    begin
      Result := not (Infight) //here
      If Result then
      makecompass('e') //here
      Wait(6000) //here
      If Result then
      makecompass('s') else
      exit;
    end;
    Thank you for the help and my standards are sloopy but im working on it this is my first script so i just getting use to the scripting thing

  9. #9
    Join Date
    Nov 2011
    Posts
    1,532
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Standards serve to make code readable and reduce the chance of making mistakes. Invest good time in it and you'll be very grateful you did.
    Current activity: Recovering from vacation
    - Nulla pars vitae vacare officio potest -
    SRL membership? Can I buy that?
    Scripts - AGS - SWF - WAR - EMS - W100S-EM
    If you need scripting help, you can pm me. Remember, if you need help you have to ask for it properly though

  10. #10
    Join Date
    Jan 2012
    Posts
    105
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by nosaj.421 View Post
    Standards serve to make code readable and reduce the chance of making mistakes. Invest good time in it and you'll be very grateful you did.
    I think i fixed my standards but im still getting the error-[Error] (159:20): colon (':') expected at line 158
    Compiling failed.

    Simba Code:
    Function TurnScreen;    //<--------line 158
    Begin
      Result := not (Infight);

      If Result then
      begin
        makecompass('e');
        Wait(6000) else
        Exit;

        If Result then
        begin
        makecompass('s') else
        Exit;
        end;
      end;
    end;

  11. #11
    Join Date
    Nov 2011
    Posts
    1,532
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    function must take a return value.
    If you dont have return value, use procedure.
    Current activity: Recovering from vacation
    - Nulla pars vitae vacare officio potest -
    SRL membership? Can I buy that?
    Scripts - AGS - SWF - WAR - EMS - W100S-EM
    If you need scripting help, you can pm me. Remember, if you need help you have to ask for it properly though

  12. #12
    Join Date
    Jan 2012
    Posts
    105
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by nosaj.421 View Post
    function must take a return value.
    If you dont have return value, use procedure.
    wow this whole time i did not even think of that idk why i even put function...probably lost track of what i was doing while reading tutorials -.-

  13. #13
    Join Date
    Nov 2011
    Posts
    1,532
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It would be a good idea for you to review them again
    Current activity: Recovering from vacation
    - Nulla pars vitae vacare officio potest -
    SRL membership? Can I buy that?
    Scripts - AGS - SWF - WAR - EMS - W100S-EM
    If you need scripting help, you can pm me. Remember, if you need help you have to ask for it properly though

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
  •