Results 1 to 3 of 3

Thread: can someone help me make a proggy?

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

    Default can someone help me make a proggy?

    whenever I run the Script to make a proggy i allways get the thing in the attached tumbnail below . Its like the paint stacks on itself or something, please help
    the script is here
    Simba Code:
    program fallytabs;
    {$i srl/srl/misc/smart.simba}
    {$i srl/srl.simba}
    {$i srl/srl/misc/online.simba}
    {$i SRL/SRL/misc/paintsmart.simba}


    const
      //////////////////////////////////////////////////////////////////////////////
      //--------------------------------------------------------------------------//
      //NICK IS FOR WINDOW TITLE

      USERNAME = '';
      PASSWORD = '';
      NICK = '';

      //--------------------------------------------------------------------------//
      //////////////////////////////////////////////////////////////////////////////



    var
       x, y : Integer;
        tabsperhour, XPGain, profitgained, profiteach, tabsmade : Integer;
        XPPerHour,  CurrentXP, OriginalXP : Integer;
        time, starttime,TimeGone : Integer;

        info1,info2,info3: String;


    Const
      Version = 2;

    procedure DeclarePlayers;
    begin
      NumberOfPlayers(1);
      CurrentPlayer := 0;
      Players[0].Name := USERNAME;
      Players[0].Pass := PASSWORD;
      Players[0].Nick := NICK;
      Players[0].Active := True;
     end;
     function CurrentTime: string;
    var
      Hour, Mins, Sec, MSec: Word;
    begin
      DecodeTime(Now, Hour, Mins, Sec, MSec);
      Result := ('['+Padz(IntToStr(Hour), 2) + ':' + Padz(IntToStr(Mins), 2) + ':' + Padz(IntToStr(Sec), 2)+']');
    end;
    procedure SmartProggy;
    var
      info,info2,info3: String;
    begin
      info:= 'Script has been running for: ' + TimeRunning;
      info2:= 'Total tabs made: ' +IntToStr(tabsmade);
      info3:= 'Total xp gained: '+IntToStr(tabsmade*48);
      SMART_DrawText(0,20,LoginChars,info,clTeal);
      SMART_DrawText(0,40,LoginChars,info2,clFuchsia);
      SMART_DrawText(0,60,LoginChars,info2,clgreen);


    end;


    procedure RotateCam;
    var
      Keys: TIntegerArray;
      I: Integer;
      Deg: Extended;
    begin
     if(not(LoggedIn))then exit;
      Keys := [VK_RIGHT, VK_LEFT];
      I := Random(2);
     if (Random(2) = I) then
      begin
       ActivateClient;
       Deg := RS_GetCompassAngleDegrees;
       Wait(100 + random(50));
       KeyDown(Keys[I]);
       Wait(500 + random(1000));
       KeyUp(Keys[I]);
       Wait(500 + random(1000));
      end else
       if (Random(3) = 0) then
        SleepAndMoveMouse(1000 + random(200));
    end;



    Procedure Antiban;
    Begin

      Case Random(100) Of
        1: HoverSkill('magic', False);
        2: HoverSkill('random', False);
        3: Boredhuman;
        4: Wait(2500 + random(4500));
        5: HoverSkill('construction', False);
        6: PickUpMouse;
        7: RandomMovement;
        8: RandomRClick;
      end;
    end;

    Procedure MiniBreaker;
    Begin

      Case Random (160) Of
        1: Wait(40000 + random(7400));
        2: Wait(25500 + random(8550));
        3: Wait(60040 + random(6759));
        4: Wait(20400 + random(2549));
      end;
    end;





    function FindLectern(var fx, fy: Integer): Boolean;
    var
      arP, arAP: TPointArray;
      arC, arUC: TIntegerArray;
      ararP: T2DPointArray;
      tmpCTS, i, j, arL, arL2: Integer;
      P: TPoint;
      X, Y, Z: Extended;
    begin
      TimeGone := (GetTimeRunning/1000);
      OriginalXP := GetXPBar(1);
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.42, 0.24);

      if not(FindColorsTolerance(arP, 11186354, MSX1, MSY1, MSX2, MSY2, 5)) then
      begin
        //Writeln('Failed to find the color, no object found.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      arC := GetColors(arP);
      arUC := arC;
      ClearSameIntegers(arUC);
      arL := High(arUC);
      arL2 := High(arC);

      for i := 0 to arL do
      begin
        ColorToXYZ(arC[i], X, Y, Z);

        if (X >= 35.42) and (X <= 47.33) and (Y >= 37.50) and (Y <= 50.14) and (Z >= 38.15) and (Z <= 50.91) then
        begin
          for j := 0 to arL2 do
          begin
            if (arUC[i] = arC[j]) then
            begin
              SetLength(arAP, Length(arAP) + 1);
              arAP[High(arAP)] := arP[j];
            end;
          end;
        end;
      end;

      SortTPAFrom(arAP, Point(MSCX, MSCY));
      ararP := SplitTPAEx(arAP, 3, 3);
      arL := High(ararP);

      for i := 0 to arL do
      begin
        if (Length(ararP[i]) < 10) then Continue;
        P := MiddleTPA(ararP[i]);
        MMouse(P.x, P.y, 5, 5);
        Wait(100 + Random(100));
        if (IsUpText('Study')) then
        begin;
          Result := True;
          Break;
        end;
      end;

      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      if (i = arL + 1) then
      begin
        //Writeln('FindObject could not find object.');
        Exit;
      end;

      GetMousePos(fx, fy);
    end;



    function FindDemon(var fx, fy: Integer): Boolean;
    var
      arP, arAP: TPointArray;
      arC, arUC: TIntegerArray;
      ararP: T2DPointArray;
      tmpCTS, i, j, arL, arL2: Integer;
      P: TPoint;
      X, Y, Z: Extended;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.22, 1.40);

      if not(FindColorsTolerance(arP, 1317937, MSX1, MSY1, MSX2, MSY2, 10)) then
      begin
        //Writeln('Failed to find the color, no object found.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      arC := GetColors(arP);
      arUC := arC;
      ClearSameIntegers(arUC);
      arL := High(arUC);
      arL2 := High(arC);

      for i := 0 to arL do
      begin
        ColorToXYZ(arC[i], X, Y, Z);

        if (X >= 0.33) and (X <= 4.30) and (Y >= 0.28) and (Y <= 3.63) and (Z >= 0.16) and (Z <= 2.59) then
        begin
          for j := 0 to arL2 do
          begin
            if (arUC[i] = arC[j]) then
            begin
              SetLength(arAP, Length(arAP) + 1);
              arAP[High(arAP)] := arP[j];
            end;
          end;
        end;
      end;

      SortTPAFrom(arAP, Point(MSCX, MSCY));
      ararP := SplitTPAEx(arAP, 2, 2);
      arL := High(ararP);

      for i := 0 to arL do
      begin
        if (Length(ararP[i]) < 10) then Continue;
        P := MiddleTPA(ararP[i]);
        MMouse(P.x, P.y, 5, 5);
        Wait(100 + Random(100));
        if (IsUpText('Talk')) then
        begin;
          Result := True;
          Break;
        end;
      end;

      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      if (i = arL + 1) then
      begin
        //Writeln('FindObject could not find object.');
        Exit;
      end;

      GetMousePos(fx, fy);
    end;



    function TalkToDemon : Boolean;
    var
      nextBMP: Integer;
    label
      Start;
    begin
      Result:=True;

      Start:
     MarkTime(time);
      repeat
        if (TimeFromMark(time)>300000) then
        begin
          Result:=False;
          Exit;
        end;
        RotateCam;
        Wait(RandomRange(1000,1500));
      until FindDemon(x,y)
      Writeln(' Found your Demon Butler.' );
      MarkTime(time);
      repeat
        Mouse(x,y,0,0,mouse_right);
        Writeln(' Right clicking on Demon Butler.');
        Wait(RandomRange(2000,1000));
        if (TimeFromMark(time)>20000) then
        begin
          Result:=False;
          Writeln(' Cant talk to Demon .');
          Exit;
        end;
      until ChooseOption('Fe')
      Writeln( ' Chose option: "Fetch-from-bank".');
      Wait(RandomRange(2000,3000));

      nextBMP := BitmapFromString(19, 12, 'meJyzaI43a4qxaI4Do3gIAooYlIZIO+pxq4gASSAbKGLZlmDdkQRHkoVuQCSR6wxEELZUqSeQzWOhXFRb8fb9exNnG04daZFka4iUdIU3EEHUiGU7QRBcL1CZiqE2UNfff/+AKDkvE6hXKMQIqACiF0gC1QjHWQJJ0Ux7ZMRjpgjUe/HiJYjepUuXMSuL8LppQQwHkoJRJnAE1C6UbAokgQjI5TCQFlGS3rx5C0Tv/sOHRJSlIcqAiC9YB44EIgygKFQPyGXRFBOUk+js79m1a/fp02dWrVoN5PL5aUFs4fFRQ0a8AepABGQAdcmoK86eM2fylCmzZ8+pbW5gkeYBugEoBbGF00kGE3HYSUmrygMtAiKgU31DA0C6TEWB4kBZbg95iBoICWHAEYsib2RCNFAjMIhYpHg4rMQhauDK0NQjLLUSB+pl4GMEkpi64HZh2giVQtKCpozNRJQ8BABBW6fQ');
      if FindBitmapToleranceIn(nextBMP, x, y, MCX1, MCY1, MCX2, MCY2, 30) then
      begin
        Writeln(' Demon wants his payment  :( ');
        MouseBox(225,463,293,472,mouse_left); Wait(RandomRange(1000,2000));
        MouseBox(118,387,400,394,mouse_left); Wait(RandomRange(1000,2000));
        profitgained:=profitgained-10000;
        Writeln(' Paying 10k from money pouch :/.');
        ClearDebug;
        FreeBitmap(nextBMP);
        goto Start;
      end;
      FreeBitmap(nextBMP);

      MarkTime(time);
      repeat
        if (TimeFromMark(time)>15000) then
        begin
          Result:=False;
          Writeln(' Cant uncert the soft clays.');
          Exit;
        end;
      until FindNPCChatText('Un',ClickLeft)
      Writeln(' Chose option: "Un-cert another 24 pieces of soft clay".');
      Wait(1000);
      Writeln(' Waiting for them soft clays');


    end;



    function MakeTabs : Boolean;
    var
      varTabBMP : Integer;
    begin
      varTabBMP := BitmapFromString(45, 49, 'meJzN2GFKAzEQBeDD+MuTldJaS1jbriIe0JvoGQSDA8OSTF7eTKII80Mwm/n6drK6Tema0nVZVq3L5UXrdnvV+rq/I0vW6yaybfppdD4/5To9LrmOD+lwOO/3p93uuDV4AevzmxTjMTEqGQRsK4BRiRrI/E1AGKMSYUwBBDAiyQwxgAu9AAaTa8vIgQgjAAiv1FhEIozWvYh9Rv4qZUggtSEGCOwgEpPBd++uIRkSiHdzb1x4jckYAfDXmoF0V7oA5FECjNYOAYC5FZ4QHMWgAexmMn4pCoYhErCg2PDz4z1Xt2+9rHsMhUFGwTDMNeRhZOQjDCYQfiqkBZZ0Gcyn7k4mZuDf4kD+G4M5pPi+dG8ZkLgYoBczwNMZdUfyqdLt8gcMVxqB+zISReCktAIZjCL2R20iI/AUbUlcBrJjIJDxKKYEwj+1Wr3w/xvhw+uNYpAhksGpyD9v35WYWxYoc6siCpNRS2IYcgLrl2jAcGHwtbUBvMC2JBjDXFUz8gsCnkkeE1imUdSM1ocFHldigOGaySmAwgAY3jHwDozJCM9k4MgUw1kw5mJw9yKKZVnD524QUHypHttzEOBlkJgwQL+4njJvZPcCEGPw808C1JDrG9H2SiE=');
      Result:=True;
      MarkTime(time);
      repeat
        if FindLectern(x,y) then
        begin
          Writeln(' Clicking on your  lectern.');
          Mouse(x,y,0,0,mouse_left);
          Wait(RandomRange(4000,4500));
        end;
        if (TimeFromMark(time)>30000) then
        begin
          Result:=False;
          Writeln(' Cant find lectern or failed to click on it.');
          FreeBitmap(VarTabBMP);
          Exit;
        end;
      until FindBitmapToleranceIn(varTabBMP, x, y, MSX1, MSY1, MSX2, MSY2, 30)
      FreeBitmap(VarTabBMP);
      MarkTime(time);
      repeat
        MouseBox(223, 145, 276, 196, mouse_Right);
        Writeln(' Right clicking on Falador Teleport.');
        if (TimeFromMark(time)>15000) then
        begin
          Result:=False;
          Writeln(' Cant find option: "Make-All"');
          Exit;
        end;
      until WaitOption('e-All',100)
      Writeln(' Chose option: "Make-All".');
      Wait(1000);
      Writeln(' Making 24 tabs, this is gonna take a while :(');

    end;


    function WhileTabbing : Boolean;
    begin
      Result:=True;
      MarkTime(time);
      repeat
        Wait(100);
        Antiban;
        FindNormalRandoms;
        if (TimeFromMark(time)>180000) then
        begin
          Result:=False;
          Writeln(' Took too long to make 24 tabs.');
          Exit;
        end;
      until (InvCount=4)
      tabsmade:=tabsmade+24;
      SmartProggy;
      CurrentXP := GetXPBar(1);
      Writeln(' Done.');
      Wait(RandomRange(3000,7000));
    end;







    procedure Main;
    begin

      ToggleXPBar(True);
      ToggleMoneyPouch(False);
      SetAngle(SRL_ANGLE_HIGH);

      if (InvCount>4) then
      begin
        Writeln('Waiting till the first 24 tabs are done');
        MarkTime(time);
        repeat
          Wait(2000);
          if (TimeFromMark(time)>180000) then
          begin
            Writeln('Setup failure. Try again.');
            Exit;
          end;
        until (InvCount=4)
      end;
      MarkTime(starttime);
      Writeln(' Lets make them fally tabs ')


      while LoggedIn do
      begin
        if not TalkToDemon then Exit;
        MarkTime(time);
        repeat
          FindNormalRandoms;
          if (TimeFromMark(time)>30000) then
          begin
            Writeln(' Demon didnt bring us any soft clays.')
            Exit;
          end;
        until (InvCount>4);
        if (InvCount<28) then
        begin
          Writeln(' Out of stuff.');
          Exit;
        end;
        Writeln(' WE GOT CLAYSSSSSSSSS   :D ');
        Wait(RandomRange(500,3000));
        if not MakeTabs then Exit;
        if not WhileTabbing then Exit;
      end;
      Writeln(' We got logged out .');
    end;



    begin
      Smart_Server := 20;
      Smart_Members := False;
      Smart_Signed := False;
      Smart_SuperDetail := False;
      SetupSRL;
      ActivateClient;
      DeclarePlayers;
      tabsmade:=tabsmade+24;
      SmartProggy;
      Disguise('fallytabs_v'+IntToStr(Version)+' ['+Players[0].Nick+']');

      if not LoggedIn then
      begin
        //LoginPlayerToLob;
        //OpenWorldScreen;
        //SelectWorld(RandomWorld(true,false));
        LoginPlayer;
        Writeln('Logged in successfully.');
        Writeln('make sure demon is following you');
        Writeln('uncert 24 soft clays');
        Writeln(' make 24 Falador tabs');
        Writeln('start the script again.');

        Exit;
      end;

      Main;
      Logout;
      Writeln(' Script stopped.');

    end.
    check out my falador tablet making script http://http://villavu.com/forum/show...177#post968177

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

    Default

    Put SMART_ClearCanvas(); at the begging of your SmartProggy procedure
    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.


  3. #3
    Join Date
    Jan 2012
    Posts
    111
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Kyle Undefined View Post
    Put SMART_ClearCanvas(); at the begging of your SmartProggy procedure

    Thank you so much, it works now
    check out my falador tablet making script http://http://villavu.com/forum/show...177#post968177

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
  •