Results 1 to 6 of 6

Thread: You passed a wrong ys funder fuction?

  1. #1
    Join Date
    Dec 2011
    Location
    Texas
    Posts
    348
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default You passed a wrong ys funder fuction?

    Code:
                      {/////////////////////////////////////////
                      //          ~Snape Grass Picker~        //
                      //            Made by Jhangir           //
                      //             Version: 1.0             //
                      /////////////////////////////////////////}
    
    program JhangirsSnapeGrass;
    
      {$define SMART}
      {$i srl/srl.scar}
      {$i sps/sps.simba}
    
    
      Var
      Variable:Integer;
    
      Procedure DeclarePlayers;
      begin
        HowManyPlayers := 1;
        NumberOfPlayers(HowManyPlayers);
        CurrentPlayer := 0;
        with Players[0] do
        begin
          Players[0].Name := '';     // Type in your Username
          Players[0].Pass := '';  // Type in your Password
          Players[0].Pin := '';         // Type in your Pin
          Players[0].Active := True;        // Dont touch
        end;
      end;
    
      Procedure Antiban;
      Begin
        case Random(500) Of
        0: HoverSkill('random', False);
        1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;
        2: ExamineInv;
        3: RandomAngle(1);
        4: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(Tab_Inv); End;
        5: HoverSkill('random', False);
        End;
      End;
    
      Procedure StatsGuise(wat:String);
      begin
        Status(wat);
        Disguise(wat);
      end;
    
      Procedure StartScript;
      Begin
        SetUpSRL;
        MouseSpeed := 15;
        ActivateClient;
        DeclarePlayers;
        If (Not LoggedIn) then
        LoginPlayer;
        SetAngle(True);
        MakeCompass('n');
      End;
    
      Procedure WalkToBank;
      var
      ToBanker:TPointArray;
      Begin
    
      If Not FindNormalRandoms Then
      Begin
        SPS_Setup(RUNESCAPE_SURFACE, ['13_4']);
        ToBanker := [Point(5608, 1844), Point(5622, 1803), Point(5620, 1778), Point(5617, 1763)];
        StatsGuise('Heading to Banker');
        WriteLn('Heading to Banker');
        SPS_WalkPath(ToBanker);
        FFlag(0);
        Wait(3000);
        StatsGuise('Arrived at Banker');
        WriteLn('Arrived at Banker');
    
      End;
    End;
    
      Procedure Bank;
      Var
      x, y:Integer;
    
        begin
          FFlag(0);
          If FindObjCustom(x, y, ['Fremen', 'anker'], [5848882, 6723765], 20) Then
            begin;
              MMouse(x, y, 1, 1);
              Wait(200+RandomRange(50,100));
              Mouse(x, y, 1, 1, False);
              Wait(200+Randomrange(100,150));
              ChooseOption('ank Frem');
              FFlag(0);
              Wait(2000+RandomRange(25,50));
              if PinScreen then
              if (Players[CurrentPlayer].Pin <> '') then
              InPin(Players[CurrentPlayer].Pin)
    
              else
              begin;
              writeln('NO PIN ENTERED!');
              TerminateScript;
              end;
    
    
              end;
          end;
    
      Procedure Withdrawrunes;
    
    
    
        begin
          DepositAll;
          Inc(Variable);
          Withdraw(0, 0, 2);
          Wait(200+RandomRange(50,100));
          Withdraw(1, 0, 1);
          Wait(200+RandomRange(50,100));
          Withdraw(2, 0, 1);
          Wait(200+RandomRange(50,100));
          CloseBank;
          StatsGuise('Banked snape grass and withdrew runes');
          WriteLn('Banked snape grass and withdrew runes');
    
    
        end;
    
        Function Teleport: Boolean;
    Var
    x, y, Tele:Integer;
    Begin
      Tele := BitmapFromString(15, 18, 'meJxlkrFKA1EQRXcrIUHBIomkiD' +
            'aWgdiujdiaSgTRcvEbomAhpEgqi4jpTbGFpXbaKSJ+gOIXpBfLVB4' +
            '8MCwbuCzz5p13Z+btS5MkTZLtbveg3x+PR/OHu4/3N0TAkmSW7ab/' +
            'TC/br9XrLMkv5i/o56uoiC0AMHiC+2IW2O/rFfp+PjUwCaC/nmLXl' +
            '4215qpFsTrZaz2OzjwC1mp3aE9yZ3NFrCyODI468phri4m7HLkYnD' +
            'taVJEnCUmHJo8PN26n0xC7US764SBLfMpkSH98HNYeMAkgz3PGoRN' +
            'iMK2El529KP4UMVfkpLObITD92Bgl6BPFL2DrabLurgMia1UE+Vls' +
            'RV0YeSYlGXdFQHVI5IXwpRCyGf8ykjHWVtjOfUiVt4GiNwo5hYL3i' +
            'VKFVuNZ6hZPVMWReI1lBVbW8oVUgD9yFhNs');
      If (LoggedIn) then
        Begin
        If Not FindNormalRandoms then
        Begin
          GameTab(Tab_Magic);
          Wait(400);
          If FindBitMapTolerancein(Tele,x,y,MIX1,MIY1,MIX2,MIY2,45)then
          Begin
            MMouse(x,y,1,1);
            ClickMouse2(True);
            Result:=True;
          End;
          If not FindBitMapTolerancein(Tele,x,y,MIX1,MIY1,MIX2,MIY2,45)then
          Begin
          WriteLn('Out of runes');
          StatsGuise('Out of runes');
          Result:=False;
          TerminateScript;
          End;
    
          Wait(200+RandomRange(50,100));
          GameTab(Tab_Inv);
          FreeBitMap(Tele);
        End;
        StatsGuise('Teleported to island');
        WriteLn('Teleported to island');
        Wait(3000);
      End;
    End;
    
    Function ClickSnapeGrass : Boolean;
    Var
    X, Y:Integer;
      begin;
        If Not FindNormalRandoms Then
      Begin
        If (Not InvFull) Then
    
        Repeat
    
        Begin
        If FindObjCustom(x, y, ['ape'], [5207075, 6265391, 5610517], 20)  Then
          Begin
          StatsGuise('We found snape grass');
          WriteLn('We found snape grass');
          AntiBan;
          Mouse(x, y, 2, 2, false);
          Wait(50+Randomrange(100,150));
          ChooseOption('ake');
          Wait(50+RandomRange(200,300));
          FFlag(0);
          Result := True;
          End;
        End;
        Until (InvFull);
        Wait(3000);
    End;
    End;
    
    Function TeleportBack: Boolean;
    Var
    x, y, Ring:Integer;
    Begin
      Ring := BitmapFromString(24, 30, 'meJxllX9M1HUYx12bJYVaMwhH5A' +
            'GGYQgncAIdcBz3hfse3q/v3XEccB4Mh3RdNwUk8VJGQmkwoxYzGBl' +
            'EEIMIZxpblEQwUSfGRNphDZezrbW5tTUXq/FHb3jg2e3a3vvsc9/v' +
            '87zu+fH5Ph9BFEW9HtJLZkEUocc2bAiSwSLlaDQwMNtsULHrAOzxB' +
            'MJPq6MIP4VVTqoyJ1WpJq/NOypa/12GIhRDTbMPfZOLeAhf2EOwz9' +
            'EIJCIAhb+gDRGeS+mDL0ScrdGerTHed+b/OnH1V0LBHjEARY5YKTZ' +
            'swITN8fbuurbO6pb2k9P3T/sfRewb2Z5+CZA1xR5uuP4bzGAMDhwV' +
            '6gJ2xwrhrdFzzPBqra7Cm1/mtjadqx9faJ77k1DRuofRBWt6a+YPr' +
            'hhBaKUgVYWupBxteGRUxAuyyOhY1cFq44mzjtZuBNC6uNxw7QGSam' +
            't6E3uNxpiVpf16fOzK9CRQVFjiYJ+SbwSBIFE74yCl011wtJkCa7z' +
            '5+7t3l8amvoevKFpnF+aVSmH48sXL330DFOVINIVoAoEgsl3xEAzS' +
            '7BWCx2dCYC3nUS54abWWmZ9ug4YVqL7hwS8uXaDiU/05DBBi4hMgL' +
            'oLC6lIfqkPrR0a/ysszIZgY/SPoxtyPGRm5Xb3dnw0NcK12vJwUvS' +
            'c5Vq54MTkNilO8glcymRzrXoMjq8yLQn0+MiQIprlf/DGGv1dRS9O' +
            'zN4HaV1hOxkARhDiAvJSWxZxE0ZLuqMQ57Bno02gM8/d+jjEs4Vxh' +
            'jTX+MzVzHSgyRqE4GECCOLtz96danAjJW3sEzfLfX4R7WFJH2N6uW' +
            'OMyNHHjKtoHS+QVmBEguzNUxFELwmpIEqpUOzqLvt99cO/O4sIt/5' +
            '1rt2+BgCai/oMXvyT7IAhz8nQ6bHZla5FdquRsPl6DdqNHAxeGUS5' +
            'U+NPB/k/6ez/u62EOQYiToFxLWW+R0FDKTq63J2qlEqvxkMdd56tH' +
            'WY5d8Vf2jOK4kjHEZSEIc2hQoBH4mZBvRlQ4nOKRxiSdNdlcik4Zf' +
            'a3FZ3u4X0zYky1A+EbW4gn4tPEEh9x+psv2doeu5hRo5pNtRS3ni9' +
            '/rJWPMnHWIhiAkOqh85plT3jESJu9caZm88+mdtSXv93E8gZHIc3X' +
            'MoZDoY2SO69wQxkhImBASrsUwYQ4mWCCExChhfeQSB4kcaB8E5PXJ' +
            'KayYcqUf9PM/puttgRBGccDEyXR5wIEjIMTZIqtyfjjAHMwNOCYL+' +
            '6F1jkgbngzEQV5IBATPxA8hz+ZijCM8/jtsCJIsFGClNFk0S4lTeL' +
            'oTjUYwr41PrHCiXMyhXhQebeRO/V8w0JRWgoPJhoMXGml/MlxXNfZ' +
            't6PMlfAh5RIsVXvIKKhRJXVQOSQc9dnf1E8+k2T7qeGq7KRDC199K' +
            'R8wODHwOgyGZlpJMqURrd+qdFRtD4xIl6fEtCQxB1mj66qWmoSO3M' +
            'gBFc16ZG2na3zhlrWmQDvvM3voMgz3XbFcbrZu2qTZujsdqLK/i8l' +
            'JG2NAFRHcl3qK2uEGgbJtTZXchHZVeShd0m7ZlodGobWBGCIAaSjS' +
            '6temOpsnMJzMl34A9DVsWQ/hSps+Q9lwuGoZBIl8W2bMvHP8Dcct7' +
            'gQ==');
      If (LoggedIn) then
        Begin
        If Not FindNormalRandoms then
        Begin
          GameTab(Tab_Equip);
          Wait(400);
          If FindBitMapTolerancein(Ring,x,y,MIX1,MIY1,MIX2,MIY2,45)then
          Begin
          Mouse(x, y, 1, 1, false);
          Wait(200+Randomrange(100,150));
          ChooseOption('elep');
          Result:=True;
          End;
          If not FindBitMapTolerancein(Ring,x,y,MIX1,MIY1,MIX2,MIY2,45)then
          Begin
          WriteLn('Ring not equipped');
          StatsGuise('Ring not equipped');
          Result:=False;
          TerminateScript;
          End;
          Wait(200+RandomRange(50,100));
          GameTab(Tab_Inv);
          FreeBitMap(Ring);
        End;
        StatsGuise('Teleported to bank');
        WriteLn('Teleported to bank');
        Wait(5000);
      End;
    End;
    
    procedure ProgressReport;
    begin
      Writeln('');
      Writeln('/=======================================================\')
      Writeln('| Jhangirs Snape Grass Picker');
      Writeln('| Time running: '+TimeRunning+'');
      Writeln('| Times Banked: '+ToStr(Variable - 1)+'');
      Writeln('| Amount of Snape grass collected: '+ToStr((Variable - 1)* 28)+'');
    Writeln('\=======================================================/')
    end;
    
    
    
    
    
    
    
    
    
    begin
    StartScript;
    Repeat
    WalkToBank;
    Bank;
    Withdrawrunes;
    ProgressReport;
    Teleport;
    ClickSnapeGrass;
    TeleportBack;
    until(false)
    end.
    I keep getting this for some reason while my script is picking up grass on the island. Script works perfectly except this keeps coming up in the box.

    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.
    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.
    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.
    We found snape grass

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

    Default

    Try moving your MMouse function to pick up right after your FindObj function.
    Also use WaitOption instead of Chooseoption/Waits

  3. #3
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    thats when a "find color" function tries to search for a color outside the rs screen. nothing to worry about

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  4. #4
    Join Date
    Dec 2011
    Location
    Texas
    Posts
    348
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok im still getting it yohojo

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

    Default

    Weird, problem in FindObj then but it's no big deal really, unless your mouse is doing something crazy, I sometimes/rarely get that in my scripts too.

  6. #6
    Join Date
    Mar 2007
    Location
    Mars, I thought all men were from Mars.
    Posts
    513
    Mentioned
    7 Post(s)
    Quoted
    124 Post(s)

    Default

    I got this message a week back and for the life of me can't remember what I did to fix it. I'm still trying to remember, but here is the post I made on it.

    http://villavu.com/forum/showthread.php?t=69573

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
  •