Results 1 to 7 of 7

Thread: Advice For My Script?

  1. #1
    Join Date
    Jan 2008
    Location
    Stanford, CA
    Posts
    329
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Advice For My Script?

    Hey! Ive been thinking of applying with this script for quite sometime, adding new things in, but i im not really sure if this would be good enough. Is there anyone who could give me feedback about the script itself? (suggestions, ideas, possibilies). Here is my script



    SCAR Code:
    program FreaksAutoLeatherCrafter;
    {.include SRL/SRL.scar}
     
    {===============================INSTRUCTIONS==============================}
    {1.Start In Any Free World Bank!                                          }
    {2.Have Your Needle And Thread in Inv.                                    }
    {3.If You Don't Have Them in Your Inv. It Will Search For It In Your Bank!}
    {4.Fill Out Lines 18-28 and the Declare Players                           }
    {5.You Can Start Logged In Or Logged Out!                                 }
    {6.YOu Can Use Any Amount Of Players!                                     }
    {7.It Will Enter In The Pin.                                              }
    {8.THIS AUTOER CRAFTS LEATHER ARMOR,COIFS,COWLS,HARD BODIES,AND CHAPS     }
    {9.I Will Try To Add In A Function For DragonHide Armor!                  }
    {10.If You Have Suggestions PM Me On SRL                                  }
    {11.ENJOY! =)                                                             }

    //========================VERSION HISTORY============================//
    ///////////////////////////////////////////////////////////////////////
    //           VERSION .1     BETA                                     //
    ///////////////////////////////////////////////////////////////////////
    // AntiBan,AntiRandom,AutoResponder,LevelCheck,Customized Login Check//
    // Multiplayer,TPA Inv Object Finder, Disabled Dragon Leather Crafter//
    ///////////////////////////////////////////////////////////////////////


    //==========================CREDITS==================================//
    ///////////////////////////////////////////////////////////////////////
    // Major Thanks To WhoCares357 For So Much Support! =)               //
    ///////////////////////////////////////////////////////////////////////
    //  Cazax,Nauman==>Major Advisors In Scripting Help Forum            //
    //  n3ss3s==>Wonderfully Explicative TPA TUT XD                      //
    //  Everyone Who Gave Me Advice In Genereal==>HELL OF A LOT OF HELP  //
    //  SRL DEVELOPERS                                                   //
    ///////////////////////////////////////////////////////////////////////

    var
    craftname,LevelIncrease,LevelIncrease2,x,y,z: Integer;
    LevelReq,leather,crafted,antirandom,loads,Needle,cowl,Thread: Integer;
    Coif,Armour,Chaps,HardBody,SoftLeather,HardLeather,Dragonleather: Integer;
    StXp,Endxp,TestColor:integer;
    Dbody,Dlegs,vambraces,i: integer;
    bankname: String;

    ///////
    const//
    ///////
    //=====================================================================================
    CraftHL=False; //Craft Hard Leather?
    CraftSL=True;  //Craft Soft Leather?
    CraftDL=FALSE; //Craft Dragon Leather? TEMPORARILY DISABLED
    WhatToCraft='coif'; //Which Type Of Clothing To Craft? hard body,coif,cowl,armor,chaps
    NameofBank='al kharid'; //Which Bank To Craft In?
    TAntiBan=True; //Uses Talking AntiBan (Rare)
    NTAntiBan=True; //Uses Non Talking AntiBan(More Common)
    NumberofTimes=20; //Number Of Times To Craft (Before Switching?)<==If Applies
    UseAutoResponder=True;//Use Auto Responder?
    UseMultiple=False; //Use Multiple Characters?
    Sleeping=True; //Sleep?
    SleepTime=10; //Time To Sleep For (In Minutes Can Be Decimalized!).
    SRLIdentification=''; //SRL ID. Not Your Forum ID!
    SRLPASS=''; //SRL Password.
    //=====================================================================================

    //=========================================//
    Version='.1';                              //NO TOUCHING!
    //=========================================//

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

         Players[0].Name :=''; //Username For Runescape
         Players[0].Pass :=''; //Password For Runescape
         Players[0].Nick :='';  //Three Words From Your Username
         Players[0].Active:=True; //If This Player Is Active
         Players[0].pin := 0000; // Your Pin Number.
         
       { Players[1].Name :=''; //Username For Runescape
         Players[1].Pass :=''; //Password For Runescape
         Players[1].Nick :='';  //Three Words From Your Username
         Players[1].Active:=True; //If This Player Is Active
         Players[1].pin := 0000; // Your Pin Number. }

         
         //Add More Players If You Wish
       Writeln('You are using '+inttostr(howmanyplayers)+' player[s]');
       Writeln('Good Luck');
       
       MouseSpeed:=15;//Higher Maybe If Higher Lag?

    end;

    //=====================================//
    //                                     //
    procedure LevelCheck;forward;          //
    procedure Depositing;forward;          //
    procedure FindNeedleAndLeather;forward;//
    procedure WaitWhileCrafting;forward;   //
    function Loggedin2:boolean;forward;    //
    procedure Coordinatemapping;forward;   //
    //                                     //
    //=====================================//

    procedure BankTrans;
    begin
      bankName := '';
      Craftname:= 0;
      case NameofBank of
       'al kharid':    bankName:='akb';
       'falador east': bankName:='feb';
       'falador west': bankName:='fwb';
       'edgeville':    bankName:='eb';
       'varrock west': bankName:='vwb';
       'varrock east': bankName:='veb';
       'draynor':      bankName:='db';
      end;
      if bankName = '' then
      begin
        WriteLn('Put in the correct bank.');
        TerminateScript;
      end;
    end;

    procedure NameChecker;

    begin
      if craftname=0 then
      begin
        Writeln('You did not correctly name what you are going to craft!');
        Writeln('Recheck your constants and make sure that you filled');
        Writeln('everything out correctly! TERMINATING SCRIPT!');
        TERMINATESCRIPT;
      end;
    end;
     


    procedure DeclareSLDTMS;

    begin
      if CraftSL=True then
      begin
      case WhatToCraft of
      'coif':begin
                coif := DTMFromString('78DA6314666060606740019696B6609A11CA6' +
                          '76405126C0C688011550D489E93801A6E20214A408D00901021A0' +
                          '461248481150230324848970B3007E350046B601B7');
               LevelReq:= 38;
               CraftName:=Coif;
             end;
      'cowl':begin
                cowl := DTMFromString('78DA6314606060606740011AAAE2609A11CA6' +
                           '7940012BC0C688011558D18A639186A9881040701356C40828980' +
                           '1A1E20214C400DC8CD1294AB0100F7DC0167');
                levelreq:=14;
                craftname:=cowl;
             end;
      'armor': begin
                   armour := DTMFromString('78DA63E463606000612460A0A708A619A17C4' +
                                '66620C1CA80061831D5081250033243880835E204D4F000096902' +
                                '6A0489502309244408A89102123CF8D5000045DA01AB');
                  LevelReq:=14;
                  CraftName:=armour;
                end;

      'chaps': begin
                  chaps:= DTMFromString('78DA63E4636060106140010A6126609A11CA6' +
                             '7E400129C0C688011550D0F906026A0468008354240828D801A90' +
                             '7B3908A8E10212F204D47013A106E41E19FC6A00787301CF');
                LevelReq:=18;
                Craftname:=Chaps;
               end;
      end;
     end;
    end;
               
    procedure DeclareDragonDTMS;

    begin
      if CraftDL=True then
      case WhatToCraft of
         'RVambraces','GVambraces','BLVambraces','Bdbody':begin
                                                 //INSERT Vambrace DTM here
                                                            Craftname:=Vambraces;
                                                          end;
         'RDBody','GDBody','BdBody','BLDBody':begin
                                                 //INSERT DRAGON BODY DTM
                                                   Craftname:=Dbody;
                                              end;
         'RDLegs','BLDLegs','BDlegs','GDLegs':begin
                                                 //INSERT DRAGON LEGS DTM
                                                 Craftname:=DLegs;
                                              end;
      end;
    end;

    procedure DragonTrans;

    begin
      if CraftDL=True then
      begin
        Craftname:=0;
        case WhatToCraft of
          'GDBody': LevelReq:=63;
          'RDBody': LevelReq:=77;
          'BLDBody': LevelReq:= 84;
          'BDBody': LevelReq:=71;
          'GDLegs': LevelReq:=60;
          'RDLegs': LevelReq:=75;
          'BLDLegs': LevelReq:=82;
          'BDLegs': LevelREq:=68;
          'BVambraces': LevelReq:=66;
          'RVambraces': LevelReq:=73;
          'GVambraces': LevelReq:=57;
          'BLVambraces': LevelReq:=79;
        end;
      end;
    end;

    procedure SleepyBaby;

    var
    Sleepy,SSleep,Secs,Mints:integer;

    begin
      if Sleeping=True then
      begin
        if not LoggedIn2 then
        begin
          repeat
             Sleepy:=Sleepy+1;
             Logout;
             Wait(2000+random(200));
          until(not Loggedin)or (Sleepy=5);
        end;
      end;
      if Sleepy=5 then
      begin
        Writeln('Could Not Log Out To Sleep!');
        Writeln('TERMINATING SCRIPT AS A SAFETY PRECAUTION!');
        TERMINATESCRIPT;
      end;
      if not LoggedIn then
      begin
        MarkTime(ssleep);
        repeat
           Secs:=Secs+1;
           Disguise(inttostr(Secs)+'second[s] Slept So Far!');
           Wait(1000);
        until(Secs mod 59=0);
      end;
      if Secs mod 59=0 then
      begin
        Secs:=0;
        Mints:=Mints+1;
        repeat
          Secs:=Secs+1;
          Disguise(inttostr(mints)+' minute[s] and '+inttostr(secs)+' second[s] Slept So Far!');
          Wait(1000);
          if Secs mod 59=0 then
          begin
            Secs:=0;
            Mints:=Mints+1;
          end;
        until(timefrommark(ssleep)>=SleepTime*60000);
      end;
    end;
         


    procedure DeclareHLDTMS;

    begin
      if CraftHL=True then
      begin
         hardbody := DTMFromString('78DA63146060601066400121FE960CFF81342' +
           '310FF0702463E208385010D302291409A0348301150C346841A66' +
           '20C147400DC82D6204D470020939026A248084287E35005B0B06B' +
           '5');
         craftname:=hardbody;
         LevelReq:=23;
           
      end;
    end;

    procedure DeclareLeatherDTMS;

    begin
      if CraftHL=True then
      begin
        HardLeather := DTMFromString('78DA6314646060E061400196460A0CBF80342' +
           '310FF0702466920838F010D302291401AA48695801A2E20214140' +
           '8D18909024A08619480813A18693801A7620C1845F0D00389E067' +
           'B');
        Leather:=Hardleather;
      end;
      if CraftSL=true then
      begin
          SoftLeather := DTMFromString('78DA6394646060E06340017E9E5C0CBF80342' +
           '310FF0702465520838B010D302291405A1148B01250230E249808' +
           'A801D92342841A21026A78818438013562404286087F49E257030' +
           '062530711');
         leather:=Softleather;
      end;
      if CraftDL=True then
      begin
          //INSERT DRAG LEATHER DTM
          leather:=DragonLeather;
      end;
     
      Needle := DTMFromString('78DA858C390E80300C04D71C12385C521AF87' +
           '77A9E1AA624147825CF6E31B225499B9ADCA5A8D2C65562CE58F4' +
           '89BD481FA00F9C099C81D381AB35927BEB8C20077F66B006CE0E8' +
           '67FE7016C1707B6');
             
      thread := DTMFromString('78DA6314666060106040019B972F67F80FA41' +
           '981F83F1030CA0219DC0C6880118904D212408295801A51202141' +
           '400D3F909027A0861348C81250C34AD82E00B4650817');
    end;

    procedure FAutoResponder;

    var
    NName:String;

    begin
      NName:=TrimNumbers(Players[currentplayer].name);
      TrimNumbers(Players[currentplayer].name);
      if UseAutoResponder=True then
      begin
        Writeln('Starting up Auto Responder');
        if InChat(players[currentplayer].nick)then
        case random(5)of
          1:begin
             TypeSend('Ya huh =)'+Players[CurrentPlayer].name+'s my name');
             Wait(2000+random(200));
             TypeSend('Normally i would chat but im on a tight schedule');
            end;

          2:begin
             TypeSend('Los siento...no ingles...');
             Wait(2000+random(200));
             TypeSend('Soy de Mexico =)');
            end;

          3:TypeSend('Soz dude cant talk... workin on fletching..');

          4:begin
              TypeSend('Ya watcha want homie XD');
              Wait(2000+random(2000));
              TypeSend('Just kidin bim not black');
            end;
        end;
      end;

      if inchat('macro')then
        case random(6)of
          1:begin
           TypeSend('Macroers...are SO h0m0...');
           Wait(2000+random(200));
           TypeSend('Would u guys not agree?');
          end;

          2:TypeSend('They ruin the game for everyone!');

          3:TypeSend('Jesus..they took the wildy away from us =/');
        end;

      if inchat('craft')and inchat('level?')then
      case random(4)of
        1:begin
            TypeSend('Wait h/o lemme check');
            Wait(3000+random(3000));
            TypeSend('Mines'+inttostr(LevelIncrease));
            Wait(200+random(250));
            TypeSend('U?');
            Wait(6000+random(2000));
            if inchat(IntToStr(1+random(98)))then
            begin
              TypeSend('Sweet');
              Wait(2000+random(200));
            end;
          end;
         2:begin
             TypeSend('Mines '+inttostr(LevelIncrease));
             Wait(2000+random(2000));
             TypeSend('And you?');
           end;
       end;

      if inchat('esta')or inchat('aqui')or
         inchat('ja  ') or inchat('guapo')then
           case random(4)of
             1:begin
                 Typesend('I DONT SPEAK FOREIGN DAG GUMMIT!');
                 Wait(2000+random(200));
                 TypeSend('Im srry that was uncalled for...=(');
               end;

             2:begin
                 TypeSend('srry dont speak spanish');
                 Wait(2000+random(200));
                 TypeSend('haha i bet u speak it well though =)');
               end;
           end;


     end;
     
     procedure TalkAnti;
     
     begin
       if not LoggedIn then
         NextPlayer(False);
       if TAntiBan=True then
       case random(501)of
        1:TypeSend('sup?');
        2:TypeSend('Wat was that?');
        3:TypeSend('Hah');
        4,194:TypeSend('Crafting...gets boring sometimes..');
        6,142:TypeSend('Willows are great xp');
        7,33: begin
                TypeSend('Crafting lvls?');
                Wait(2000+random(200));
                SendKeys('Mines');
                SayCurrentLevels('crafting');
               end;
        8,14: TypeSend('HAHA tight!');
        20,198: begin
                SendArrowSilentWait(1, 5000);
                Wait(1000+random(3000));
                TypeSend('Flash2: HaHa WEEEEEE!!');
                Wait(2000+random(4000));
                TypeSend('Im kinda weird ya...im moving the direction around XD');
                Wait(2000+random(400));
               end;
        21,50,126,345:TypeSend('Hopefully i can get to '+(inttostr(levelincrease+1+random(4)))+' crafting by tonight!');
       end;
    end;

    procedure NonTalkAnti;

    var
    Movement:Integer;

    begin
      if not LoggedIn then
        NextPlayer(False);
      if NTAntiBan=True then
      case random(200)of
        7: RandomRClick;
        8: BoredHuman;
        9: HoverSkill('Mining', False);
        10: HoverSkill('Woodcutting', False);
        11: HoverSkill('Fletching',False);
        14: Hoverskill('Random',False);
        12: AlmostLogout;
        13: PickUpMouse;
        16: begin
                Gametab(1+random(5));
                Wait(5000);
                Gametab(4);
               end;
        17: MMouse(200+random(400),300+random(300),2+random(90),3+random(99));
        18: MMouse(200+random(400),300+random(300),2+random(90),3+random(99));
        19: begin
              MouseSPeed:=5;
              repeat
                MoveMent:=Movement+1;
                MMouse(200+random(400),300+random(300),2+random(90),3+random(99));
              until(Movement=5);
              if Movement>=5 then
                MouseSpeed:=15;
            end;
      end;
    end;

    procedure AntiRandoms;

    var
    i,q:Integer;

    begin
     if InBlack or NoGameTab then
     case random(3)of
      1:begin
         AntiRandom:=Antirandom+1;
         TypeSend('snap..');
         Logout;
         Wait(2000+random(300));
         if LoggedIn then
         repeat
          Writeln('Could Not log out for some reason. Trying again.');
          Logout;
         until(not Loggedin);
        end;

      2:begin
         AntiRandom:=AntiRandom+1;
         TypeSend('Aw jeez here we go again..');
         Logout;
         Wait(2000);
         if LoggedIn then
         repeat
           Writeln('Could Not log out for some reason. Trying again.');
           Logout;
         until(not Loggedin);
        end;

      3:begin
         AntiRandom:=AntiRandom+1;
         TypeSend('Oh lord...just crafting and this happens');
         Logout;
         Wait(2000+random(300));
         if LoggedIn then
         repeat
          Writeln('Could Not log out for some reason. Trying again.');
          Logout;
         until(false);
        end;
      end;

    begin
     if FindFight then
     begin
      AntiRandom:=AntiRandom+1;
      TypeSend('Snappities =(');
      Wait(2000+random(400));
      Runto('n',true);
      Depositing;
     end;
    end;

    begin
      if FindDead or Ischatblacktextanyline('Oh dear')then
      begin
        Writeln('You are dead performing antiban and terminating script.');
        Wait(2000+random(200));
        case random(3)of
          1:TypeSend('Dang i died....');
          2:TypeSend('Freakin....died again?');
          3:begin
              q:=1;
              TypeSend('Gosh i can neva stop dying...');
              Wait(2000+random(200));
              TypeSend('Oh wel...lets dance!');
              Wait(2000+random(200));
              DoEmote(13);
              if ischatblacktextanyline('unlock')then DoEmote(11);
            end;
        end;
      begin
        if (q<1)then
        begin
          DoEmote(17);
          Wait(2000+random(200));
        end;
          Logout;
          NextPlayer(false);
      end;
     end;
    end;

    begin
     if FindNormalRandoms then
     begin
       AntiRandom:=AntiRandom+1;
       Logout;
       NextPlayer(True);
     end;
    end;
    end;


    procedure LevelCheck;

    var
    Doit: integer;

    begin
      Doit:=GetSkillInfo('Crafting',false);
      if (Doit)<(LevelReq)then
      begin
        WriteLn('You dont have the appropriate level to craft this type of leather');
        TerminateScript;
      end else
      Writeln('Your Crafting Level is '+IntToStr(GetSkillInfo('Crafting',false)));
      LevelIncrease:=Doit;
    end;
       
    procedure SetupRS;

    var
    direction: String;

    begin
     if not LoggedIn then NextPlayer(False);
       StXp:= GetXp('crafting');
       GetXp('crafting');
       Wait(2000+random(200));
       LevelCheck;
       Wait(1000+random(100));
       GameTab(4);
       Wait(750);
       SetChat('on',1);
       Wait(2000+random(200));
       SetChat('off',2);
       Wait(1000+random(100));
       SendArrowWait(0,1000);
       case random(3)of
         1:Direction:='n';
         2:Direction:='s';
         3:Direction:='e';
       end;
       MakeCompass(direction);
     end;

    procedure OpeningBank;

    var
    Tries,FB: Integer;

    begin
      Writeln('Starting to Open Bank');
      repeat
        Tries:=Tries+1;
        OpenBankQuiet(BankName);
      until(BankScreen)or (Pinscreen)or(Tries=5);
        if Tries=5 then
        begin
          Writeln('You are not in the right bank or we cannot find it');
          Writeln('TERMINATING SCRIPT!');
          TERMINATESCRIPT;
        end;
        if PinScreen then
        begin
          Inpin(Inttostr(Players[0].pin));
          if ischatblacktextanyline('try')then
          begin
            Writeln('We Incorrectly entered the pin.');
            OpenBankQuiet(bankname);
            Inpin(Inttostr(Players[0].pin));
          end;
            Writeln('We have entered the pin or should have.');
        end;
        if BankScreen then
        begin
          repeat
            FB:=FB+1;
            FindDTM(leather,x,y,23,57,478,303);
          until(FindDTM(leather,x,y,23,57,478,303))or
          (FB>=50);
        end;
        if FB>=50 then
        begin
          Writeln('COuld not find the '+inttostr(leather)+' . Terminating the script!');
          TERMINATESCRIPT;
        end;
        if FindDTM(leather,x,y,23,57,478,303)then
        begin
          Mouse(x,y,1+random(8),1+random(8),false);
          Wait(2000+random(200));
          ChooseOption('draw X');
          Wait(2000+random(200));
          TypeSend(inttostr(27+random(200)));
          Writeln('We withdrew the leather...or we should have =)');
        end;
        CLOSEBANK;
    end;

    procedure AbsentNeedle;

    var
    Tries2,FN: Integer;

    begin
      Writeln('Trying to Open bank to find a needle!');
      repeat
        Tries2:=Tries2+1;
        OpenBankQuiet(BankName);
      until(BankScreen)or (Tries2=5);
        if Tries2=5 then
        begin
          Writeln('You are not in the right bank or we cannot find it');
          Writeln('TERMINATING SCRIPT!');
          TERMINATESCRIPT;
        end;
        if BankScreen then
        begin
          repeat
             FN:=FN+1;
             FindDTM(Needle,x,y,23,57,478,303);
          until (FN>=50) or (FindDTM(Needle,x,y,23,57,478,303));
          if FN>=50 then
          begin
            Writeln('You DONT have a needle.. Get one and restart the script!');
            TERMINATESCRIPT;
          end;
          begin
          if FindDTM(Needle,x,y,23,57,478,303)then
            begin
              Writeln('We have found the needle in your bank!');
              Mouse(576,229,1+random(8),1+random(8),true);
              Writeln('Deposited first item in inv.');
              Mouse(x,y,1+random(8),1+random(8),true);
              CLOSEBANK;
              FINDNEEDLEANDLEATHER;
            end;
          end;
       end;
    end;

    procedure AbsentThread;

    var
    FT,Tries3: Integer;

    begin
      Writeln('Opening bank to try and find absent thread!');
      repeat
        Tries3:=Tries3+1;
        OpenBankQuiet(BankName);
      until(BankScreen)or (Tries3=5);
        if Tries3=5 then
        begin
          Writeln('You are not in the right bank or we cannot find it');
          Writeln('TERMINATING SCRIPT!');
          TERMINATESCRIPT;
        end;
        if BankScreen then
        begin
           if FindDTM(leather,x,y,549,205,740,465)then
             Mouse(x,y,1,1,true);
          repeat
             FT:=FT+1;
             FindDTM(Thread,x,y,23,57,478,303);
          until (FT>=50) or (FindDTM(Thread,x,y,23,57,478,303));
          if FT>=50 then
          begin
            Writeln('You DONT have Thread... Get one and restart the script!');
            TERMINATESCRIPT;
          end;
          begin
            if FindDTM(Thread,x,y,23,57,478,303)then
            begin
              Mouse(x,y,1+random(8),1+random(8),false);
              Wait(2000+random(200));
              ChooseOption('draw X');
              Wait(2000+random(200));
              TypeSend(inttostr(200+random(200)));
              Writeln('Retrieved Thread');
              CLOSEBANK;
              FINDNEEDLEANDLEATHER;
            end;
          end;
      end;
    end;

    function Loggedin2:boolean;// Thanks Cazax For Your Very Skilled TUT
                                //Just Did This To Show That I Understand
    var
      R,G,B : Integer;
      H,S,L : Extended;
      X,Y,Z : Extended;
      L1Color: Integer;
      CTPA : TPointArray;
      Uno: TIntegerArray;
      i : Integer;
    begin
      L1color :=16777215;//add colors later! might have to recalculate
      FindColorsSpiralTolerance(MSCX, MSCY, CTPA, l1color, 210,177, 558, 363, 60);
      Uno := GetColors(CTPA);
      for i:=0 to Length(Uno)-1 do
      begin
        TestColor:=GetColor(CTPA[i].x,CTPA[i].y);
        if SimilarColors(TestColor,l1color,40)then
        begin
          ColortoRGB(testcolor,R,G,B);
          ColorToHSL(testcolor,H,S,L);
          ColortoXYZ(testcolor,x,y,z);
          if InRange(R-G,-15,15)then
            if Inrange(R-B,-15,15)then
              if Inrange(g-b,-15,-5)then
                 if InRange(Round(S) - Round(H),-15,15) then
                    if InRange(Round(L) - Round(H), 85, 115) then
                      if InRange(Round(S) - Round(L), -115,-85) then
                        if InRange(Round(X) - Round(Y),-20,10) then
                          if InRange(Round(Y) - Round(Z),-24,7) then
                             if GetColor(CTPA[i].X + 2, CTPA[i].Y + 2) = TestColor then
                                if GetColor(CTPA[i].X + 1, CTPA[i].Y + 1) = TestColor then

            begin
              WriteLn('We are logged in...');
              Result:=True;
            end;
          end;
        end;
      Writeln('We are Logged Out.');
      Result := False;
    end;



    function FindColorObjectInvTPA(color:integer;Text:String):Boolean;

    var
    OC: array of Tpoint;
    I,C,AR,B: integer;

    begin
      SetArrayLength(Oc,4);
      AR:=getarraylength(oc[i])
      C:=10;
      FindColorsSPiralTolerance(MSCX,MSCY,OC,COLOR,MIX1,MIY1,MIX2,MIY2,C);
      for i:=0 to Length(OC)-1 do
      begin
        if AR>=2 then
        begin
          repeat
            B:=B+1;
            C:=C-1;
            FindColorsSPiralTolerance(x,y,OC,COLOR,MIX1,MIY1,MIX2,MIY2,C);
          until(AR=1)or (b=5)and(Ar>=2);
        end;
       if AR=1 then
       begin
         MMouse(x,y,1,1);//moves mouse on object
         If IsUpText(Text) then
           Result := True;
       end else
       if (B=5) and (AR>=2) then
       begin
         MiddleTPAEx(Oc,x,y); //haha this is my idea of randomly XD
         Writeln('There are More than 1 Objects with the same color!');
         Result := False;
         Exit;
       end;
      end;
    end;

    procedure DragonArea;

    begin
      case whattocraft of
        'RVambraces','GVambraces','BVambraces':begin
                                                 //stuff here
                                               end;
        'RDBody','GDBody','BdBody':begin
                                     //stuff here
                                   end;
                                   
         'RDLegs','BDLegs','GDLegs':begin
                                      //stuff here
                                    end;
      end;
     WaitWhileCrafting;
    end;


    procedure FindNeedleAndLeather;

    var
    FN:integer;

    begin
      LevelIncrease2:=GetSKillInfo('Crafting',false);
      GetSKillInfo('Crafting',false);
      if LevelIncrease2>LevelIncrease then
        Writeln('You Have Increased A Level!');
      Gametab(4);
      repeat
        FN:=FN+1;
        FindDTM(Needle,x,y,549,205,740,465);
      until(FindDTM(Needle,x,y,549,205,740,465))or
      (FN>=50);
      if FN>=50 then
      begin
        Writeln('No Needle in your Inventory Searching in bank....');
        AbsentNeedle;
      end;
      begin
        if not FindDTm(thread,x,y,549,205,740,465)then
          AbsentTHread;
        if FindDTM(Needle,x,y,549,205,740,465)then
        begin
          Mouse(x,y,1+random(8),1+Random(8),true);
          Writeln('The Needle should be used right now.');
        end;
      end;
      begin
        if FindDTM(leather,x,y,549,205,740,465)then
        begin
          Mouse(x,y,1+random(8),1+random(8),true);
          if FindTextTPA(0,5,229,396,286,410,'to make',NPCchars,nothing)then
          begin
            Writeln('You dont have thread');
            AbsentThread;
          end;
          Coordinatemapping;
        end;
      end;
     end;
     
    procedure CoordinateMapping;

    var
    Attempt:integer;

    begin
      if (craftsl=true) or (crafthl=true) then
        case WhatToCraft of
          'chaps':begin
                  repeat
                    Attempt:=Attempt+1;
                    Mouse(130,235,1+random(8),1+random(8),false);
                    Wait(2000+random(200));
                  until(FindColor(x,y,4231423,118,223,136,268))or (Attempt=5);
                    if FindColor(x,y,4231423,118,223,136,268)then
                    begin
                      ChooseOption('Make All');
                      WaitWhileCrafting;
                    end;
                end;
        'armor':begin
                  repeat
                    Attempt:=Attempt+1;
                    Mouse(72,108,1+random(8),1+random(8),false);
                    Wait(2000+random(200));
                  until(FindCOlor(x,y,4231423,55,94,86,123))or (Attempt=5);
                  if FindCOlor(x,y,4231423,55,94,86,123)then
                  begin
                    ChooseOption('Make All');
                    WaitWhileCrafting;
                  end;
                end;
        'coif':begin
                    Mouse(256,241,1+random(8),1+random(8),false);
                    Wait(2000+random(200));
                    ChooseOption('Make All');
                    WaitwhileCrafting;
               end;
        'cowl':begin
                  repeat
                    Attempt:=Attempt+1;
                    Mouse(387,236,1+random(8),1+random(8),false);
                    Wait(2000+random(200));
                  until(FindColor(x,y,4231423,370,221,417,267))or(attempt=5);
                  if FindColor(x,y,4231423,370,221,417,267)then
                  begin
                    ChooseOption('Make All');
                    WaitWhileCrafting;
                  end;
               end;
        'hard body':begin
                        Mouse(258,412,1+random(8),1+random(8),false);
                        Wait(2000+random(200));
                        ChooseOption('Make All');
                        WaitWhileCrafting;
                    end;
      end;
        if (Attempt=5)then
          TERMINATESCRIPT;
       if CraftDL=True then
         DragonArea;
    end;

    procedure WaitWhileCrafting;

    var
    Mark:integer;

    begin
      MarkTime(mark);
        TalkAnti;
        repeat
          FAutoResponder;
          AntiRandoms;
          NonTalkAnti;
        until(TimeFromMark(Mark)>=50000);
      Crafted:=Crafted+26;
      Endxp:=GetXp('crafting');
      GetXp('Crafting');
    end;

    procedure Depositing;

    var
    Tries4,Dep,FZ: Integer;

    begin
      Writeln('Opening bank to deposit crafted '+inttostr(Craftname)+'s!');
      repeat
        Tries4:=Tries4+1;
        OpenBankQuiet(BankName);
      until(BankScreen)or (Tries4=5);
        if Tries4=5 then
        begin
          Writeln('We cannot find the bank');
          Writeln('TERMINATING SCRIPT!');
          TERMINATESCRIPT;
        end;
        if BankScreen then
        begin
          repeat
            Dep:=Dep+1;
            FindDTM(Craftname,x,y,549,205,740,465);
          until(FindDTM(Craftname,x,y,549,205,740,465))or
          (Dep=5);
          if Dep=5 then
          begin
            Writeln('Cannot find the '+inttostr(Craftname)+'s. TERMINATING SCRIPT!');
            TERMINATESCRIPT;
          end;
          if FindDTM(Craftname,x,y,549,205,740,465)then
          begin
            Mouse(x,y,1+random(8),1+random(8),false);
            Wait(2000+random(200));
            ChooseOption('Store All');
            Loads:=Loads+1;
          end;
          begin
            repeat
              FZ:=FZ+1;
              FindDTM(leather,x,y,23,57,478,303);
            until(FindDTM(leather,x,y,23,57,478,303))or
          (FZ>=50);
        end;
        if FZ>=50 then
        begin
          Writeln('COuld not find the '+inttostr(leather)+' . Terminating the script!');
          TERMINATESCRIPT;
        end;
        if FindDTM(leather,x,y,23,57,478,303)then
        begin
          Mouse(x,y,1+random(8),1+random(8),false);
          Wait(2000+random(200));
          ChooseOption('draw X');
          Wait(2000+random(200));
          TypeSend(inttostr(27+random(200)));
          Writeln('We withdrew the leather...or we should have =)');
        end;
        CLOSEBANK;
      end;
    end;

    procedure Credits;

    begin
     ClearDebug;
     Writeln('///////////////////////////////////////');
     Writeln('=========                            //');
     Writeln('==                                   //');
     Writeln('=======                              //');
     Writeln('==                                   //');
     Writeln('==                                   //');
     Writeln('==   REAKYMONKEYS AUTO CRAFTER       //');
     Writeln('Version'+' '+Version+'/////////////////////////');
     Writeln('Special Thanks To WHOCARES357 and the staff of http://poopnsuch.com.');
     Wait(2000+random(200));
     ClearDebug;
    end;

    procedure Proggie;

    var
    ToTxp:Integer;

    begin
      TotXp:=EndXp-StXp;
      Writeln('');
      Writeln('');
      Writeln('');
      Writeln('=========FREAKS AUTO==========');
      Writeln('Time Running     '+(TimeRunning));
      Writeln('Your Current Level    '+inttostr(levelincrease));
      Writeln('AntiRandom peformed' +inttostr(AntiRandom));
      if Crafted>=1 then
      Writeln('Number Crafted   '+inttostr(Crafted));
      Writeln('Item Crafted     '+Whattocraft);
      if Loads>=1 then
      Writeln('Loads done       '+inttoStr(loads));
      if Totxp>=50 then
      Writeln('Experience       '+inttostr(Totxp));
      Writeln('Version          '+version);
      if levelincrease2>levelincrease then
      Writeln('You increased    '+inttostr(levelincrease2)+'level[s]');
      Writeln('===========THANKS=============');
    end;

    begin
      Credits;
      SetupSRL;
       ScriptID:='784';
      SRLID:=SRLIdentification;
      SRLPASSWORD:=SRLPASS;
      begin
        case Random(3) of
         1:begin
            Writeln('Disguising as Itunes');
            Disguise('iTunes');
           end;
         2:begin
             Writeln('Disguising as AIM 6');
             Disguise('AIM 6');
           end;
         3:begin
             Writeln('Disguising as Paint');
             Disguise('Paint');
           end;
        end;
      end;
      begin
        BankTrans;
        DeclarePlayers;
        DeclareLeatherDTMS;
        DeclareSLDTMS;
        DeclareDragonDTMS;
        DragonTrans;
        DeclareHLDTMS;
        Namechecker;
        if not Loggedin then
         LoginPlayer;
        begin
          SetupRS;
          OpeningBank;
          repeat
            i:=i+1;
            z:=z+1;
            FindNeedleAndLeather;
            WaitWhileCrafting;
            Depositing;
            if i mod 1 = 0 then
              Proggie;
            if (z=NumberofTimes)then
              NextPlayer(False);
          until(false);
       TERMINATESCRIPT;
        end;
      end;
    end.

    rep++ for those who can help me XD?

  2. #2
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Yeah looks a solid script, but you use alot of TerminateScript's in it maybe just do:
    SCAR Code:
    NextPlayer(False);
    and your cases are wrong if there are 3 random outcomes it should be:
    SCAR Code:
    Case Random(4) of

    Not
    SCAR Code:
    Case Random(3) Of
    .

    And I fixed up most of your script.

    P.S for your waitwhilecrafting thing, did you get that idea from my tutorial .

    Here:

    SCAR Code:
    program FreaksAutoLeatherCrafter;
    {.include SRL/SRL.scar}

    {===============================INSTRUCTIONS==============================}
    {1.Start In Any Free World Bank!                                          }
    {2.Have Your Needle And Thread in Inv.                                    }
    {3.If You Don't Have Them in Your Inv. It Will Search For It In Your Bank!}
    {4.Fill Out Lines 18-28 and the Declare Players                           }
    {5.You Can Start Logged In Or Logged Out!                                 }
    {6.YOu Can Use Any Amount Of Players!                                     }
    {7.It Will Enter In The Pin.                                              }
    {8.THIS AUTOER CRAFTS LEATHER ARMOR,COIFS,COWLS,HARD BODIES,AND CHAPS     }
    {9.I Will Try To Add In A Function For DragonHide Armor!                  }
    {10.If You Have Suggestions PM Me On SRL                                  }
    {11.ENJOY! =)                                                             }

    //========================VERSION HISTORY============================//
    ///////////////////////////////////////////////////////////////////////
    //           VERSION .1     BETA                                     //
    ///////////////////////////////////////////////////////////////////////
    // AntiBan,AntiRandom,AutoResponder,LevelCheck,Customized Login Check//
    // Multiplayer,TPA Inv Object Finder, Disabled Dragon Leather Crafter//
    ///////////////////////////////////////////////////////////////////////


    //==========================CREDITS==================================//
    ///////////////////////////////////////////////////////////////////////
    // Major Thanks To WhoCares357 For So Much Support! =)               //
    ///////////////////////////////////////////////////////////////////////
    //  Cazax,Nauman==>Major Advisors In Scripting Help Forum            //
    //  n3ss3s==>Wonderfully Explicative TPA TUT XD                      //
    //  Everyone Who Gave Me Advice In Genereal==>HELL OF A LOT OF HELP  //
    //  SRL DEVELOPERS                                                   //
    ///////////////////////////////////////////////////////////////////////

    var
    craftname,LevelIncrease,LevelIncrease2,x,y,z: Integer;
    LevelReq,leather,crafted,antirandom,loads,Needle,cowl,Thread: Integer;
    Coif,Armour,Chaps,HardBody,SoftLeather,HardLeather,Dragonleather: Integer;
    StXp,Endxp,TestColor:integer;
    Dbody,Dlegs,vambraces,i: integer;
    bankname: String;

    ///////
    const//
    ///////
    //=====================================================================================
    CraftHL=False; //Craft Hard Leather?
    CraftSL=True;  //Craft Soft Leather?
    CraftDL=FALSE; //Craft Dragon Leather? TEMPORARILY DISABLED
    WhatToCraft='coif'; //Which Type Of Clothing To Craft? hard body,coif,cowl,armor,chaps
    NameofBank='al kharid'; //Which Bank To Craft In?
    TAntiBan=True; //Uses Talking AntiBan (Rare)
    NTAntiBan=True; //Uses Non Talking AntiBan(More Common)
    NumberofTimes=20; //Number Of Times To Craft (Before Switching?)<==If Applies
    UseAutoResponder=True;//Use Auto Responder?
    UseMultiple=False; //Use Multiple Characters?
    Sleeping=True; //Sleep?
    SleepTime=10; //Time To Sleep For (In Minutes Can Be Decimalized!).
    SRLIdentification=''; //SRL ID. Not Your Forum ID!
    SRLPASS=''; //SRL Password.
    //=====================================================================================

    //=========================================//
    Version='.1';                              //NO TOUCHING!
    //=========================================//

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

         Players[0].Name :=''; //Username For Runescape
         Players[0].Pass :=''; //Password For Runescape
         Players[0].Nick :='';  //Three Words From Your Username
         Players[0].Active:=True; //If This Player Is Active
         Players[0].pin := 0000; // Your Pin Number.

       { Players[1].Name :=''; //Username For Runescape
         Players[1].Pass :=''; //Password For Runescape
         Players[1].Nick :='';  //Three Words From Your Username
         Players[1].Active:=True; //If This Player Is Active
         Players[1].pin := 0000; // Your Pin Number. }


         //Add More Players If You Wish
       Writeln('You are using '+inttostr(howmanyplayers)+' player[s]');
       Writeln('Good Luck');

       MouseSpeed:=15;//Higher Maybe If Higher Lag?

    end;

    //=====================================//
    //                                     //
    procedure LevelCheck;forward;          //
    procedure Depositing;forward;          //
    procedure FindNeedleAndLeather;forward;//
    procedure WaitWhileCrafting;forward;   //
    function Loggedin2:boolean;forward;    //
    procedure Coordinatemapping;forward;   //
    //                                     //
    //=====================================//

    procedure BankTrans;
    begin
      bankName := '';
      Craftname:= 0;
      case NameofBank of
       'al kharid':    bankName:='akb';
       'falador east': bankName:='feb';
       'falador west': bankName:='fwb';
       'edgeville':    bankName:='eb';
       'varrock west': bankName:='vwb';
       'varrock east': bankName:='veb';
       'draynor':      bankName:='db';
      end;
      if bankName = '' then
      begin
        WriteLn('Put in the correct bank.');
        TerminateScript;
      end;
    end;

    procedure NameChecker;

    begin
      if craftname=0 then
      begin
        Writeln('You did not correctly name what you are going to craft!');
        Writeln('Recheck your constants and make sure that you filled');
        Writeln('everything out correctly! TERMINATING SCRIPT!');
        TERMINATESCRIPT;
      end;
    end;



    procedure DeclareSLDTMS;

    begin
      if CraftSL=True then
      begin
      case WhatToCraft of
      'coif':begin
                coif := DTMFromString('78DA6314666060606740019696B6609A11CA6' +
                          '76405126C0C688011550D489E93801A6E20214A408D00901021A0' +
                          '461248481150230324848970B3007E350046B601B7');
               LevelReq:= 38;
               CraftName:=Coif;
             end;
      'cowl':begin
                cowl := DTMFromString('78DA6314606060606740011AAAE2609A11CA6' +
                           '7940012BC0C688011558D18A639186A9881040701356C40828980' +
                           '1A1E20214C400DC8CD1294AB0100F7DC0167');
                levelreq:=14;
                craftname:=cowl;
             end;
      'armor': begin
                   armour := DTMFromString('78DA63E463606000612460A0A708A619A17C4' +
                                '66620C1CA80061831D5081250033243880835E204D4F000096902' +
                                '6A0489502309244408A89102123CF8D5000045DA01AB');
                  LevelReq:=14;
                  CraftName:=armour;
                end;

      'chaps': begin
                  chaps:= DTMFromString('78DA63E4636060106140010A6126609A11CA6' +
                             '7E400129C0C688011550D0F906026A0468008354240828D801A90' +
                             '7B3908A8E10212F204D47013A106E41E19FC6A00787301CF');
                LevelReq:=18;
                Craftname:=Chaps;
               end;
      end;
     end;
    end;

    procedure DeclareDragonDTMS;

    begin
      if CraftDL=True then
      case WhatToCraft of
         'RVambraces','GVambraces','BLVambraces','Bdbody':begin
                                                 //INSERT Vambrace DTM here
                                                            Craftname:=Vambraces;
                                                          end;
         'RDBody','GDBody','BdBody','BLDBody':begin
                                                 //INSERT DRAGON BODY DTM
                                                   Craftname:=Dbody;
                                              end;
         'RDLegs','BLDLegs','BDlegs','GDLegs':begin
                                                 //INSERT DRAGON LEGS DTM
                                                 Craftname:=DLegs;
                                              end;
      end;
    end;

    procedure DragonTrans;

    begin
      if CraftDL=True then
      begin
        Craftname:=0;
        case WhatToCraft of
          'GDBody': LevelReq:=63;
          'RDBody': LevelReq:=77;
          'BLDBody': LevelReq:= 84;
          'BDBody': LevelReq:=71;
          'GDLegs': LevelReq:=60;
          'RDLegs': LevelReq:=75;
          'BLDLegs': LevelReq:=82;
          'BDLegs': LevelREq:=68;
          'BVambraces': LevelReq:=66;
          'RVambraces': LevelReq:=73;
          'GVambraces': LevelReq:=57;
          'BLVambraces': LevelReq:=79;
        end;
      end;
    end;

    procedure SleepyBaby;

    var
    Sleepy,SSleep,Secs,Mints:integer;

    begin
      if Sleeping=True then
      begin
        if not LoggedIn2 then
        begin
          repeat
             Sleepy:=Sleepy+1;
             Logout;
             Wait(2000+random(200));
          until(not Loggedin)or (Sleepy=5);
        end;
      end;
      if Sleepy=5 then
      begin
        Writeln('Could Not Log Out To Sleep!');
        Writeln('TERMINATING SCRIPT AS A SAFETY PRECAUTION!');
        TERMINATESCRIPT;
      end;
      if not LoggedIn then
      begin
        MarkTime(ssleep);
        repeat
           Secs:=Secs+1;
           Disguise(inttostr(Secs)+'second[s] Slept So Far!');
           Wait(1000);
        until(Secs mod 59=0);
      end;
      if Secs mod 59=0 then
      begin
        Secs:=0;
        Mints:=Mints+1;
        repeat
          Secs:=Secs+1;
          Disguise(inttostr(mints)+' minute[s] and '+inttostr(secs)+' second[s] Slept So Far!');
          Wait(1000);
          if Secs mod 59=0 then
          begin
            Secs:=0;
            Mints:=Mints+1;
          end;
        until(timefrommark(ssleep)>=SleepTime*60000);
      end;
    end;



    procedure DeclareHLDTMS;

    begin
      if CraftHL=True then
      begin
         hardbody := DTMFromString('78DA63146060601066400121FE960CFF81342' +
           '310FF0702463E208385010D302291409A0348301150C346841A66' +
           '20C147400DC82D6204D470020939026A248084287E35005B0B06B' +
           '5');
         craftname:=hardbody;
         LevelReq:=23;

      end;
    end;

    procedure DeclareLeatherDTMS;

    begin
      if CraftHL=True then
      begin
        HardLeather := DTMFromString('78DA6314646060E061400196460A0CBF80342' +
           '310FF0702466920838F010D302291401AA48695801A2E20214140' +
           '8D18909024A08619480813A18693801A7620C1845F0D00389E067' +
           'B');
        Leather:=Hardleather;
      end;
      if CraftSL=true then
      begin
          SoftLeather := DTMFromString('78DA6394646060E06340017E9E5C0CBF80342' +
           '310FF0702465520838B010D302291405A1148B01250230E249808' +
           'A801D92342841A21026A78818438013562404286087F49E257030' +
           '062530711');
         leather:=Softleather;
      end;
      if CraftDL=True then
      begin
          //INSERT DRAG LEATHER DTM
          leather:=DragonLeather;
      end;

      Needle := DTMFromString('78DA858C390E80300C04D71C12385C521AF87' +
           '77A9E1AA624147825CF6E31B225499B9ADCA5A8D2C65562CE58F4' +
           '89BD481FA00F9C099C81D381AB35927BEB8C20077F66B006CE0E8' +
           '67FE7016C1707B6');

      thread := DTMFromString('78DA6314666060106040019B972F67F80FA41' +
           '981F83F1030CA0219DC0C6880118904D212408295801A51202141' +
           '400D3F909027A0861348C81250C34AD82E00B4650817');
    end;

    procedure FAutoResponder;

    var
    NName:String;

    begin
      NName:=TrimNumbers(Players[currentplayer].name);
      TrimNumbers(Players[currentplayer].name);
      if UseAutoResponder=True then
      begin
        Writeln('Starting up Auto Responder');
        if InChat(players[currentplayer].nick)then
        case random(5)of
          1:begin
             TypeSend('Ya huh =)'+Players[CurrentPlayer].name+'s my name');
             Wait(2000+random(200));
             TypeSend('Normally i would chat but im on a tight schedule');
            end;

          2:begin
             TypeSend('Los siento...no ingles...');
             Wait(2000+random(200));
             TypeSend('Soy de Mexico =)');
            end;

          3:TypeSend('Soz dude cant talk... workin on fletching..');

          4:begin
              TypeSend('Ya watcha want homie XD');
              Wait(2000+random(2000));
              TypeSend('Just kidin bim not black');
            end;
        end;
      end;

      if inchat('macro')then
        case random(6)of
          1:begin
           TypeSend('Macroers...are SO h0m0...');
           Wait(2000+random(200));
           TypeSend('Would u guys not agree?');
          end;

          2:TypeSend('They ruin the game for everyone!');

          3:TypeSend('Jesus..they took the wildy away from us =/');
        end;

      if inchat('craft')and inchat('level?')then
      case random(4)of
        1:begin
            TypeSend('Wait h/o lemme check');
            Wait(3000+random(3000));
            TypeSend('Mines'+inttostr(LevelIncrease));
            Wait(200+random(250));
            TypeSend('U?');
            Wait(6000+random(2000));
            if inchat(IntToStr(1+random(98)))then
            begin
              TypeSend('Sweet');
              Wait(2000+random(200));
            end;
          end;
         2:begin
             TypeSend('Mines '+inttostr(LevelIncrease));
             Wait(2000+random(2000));
             TypeSend('And you?');
           end;
       end;

      if inchat('esta')or inchat('aqui')or
         inchat('ja  ') or inchat('guapo')then
           case random(4)of
             1:begin
                 Typesend('I DONT SPEAK FOREIGN DAG GUMMIT!');
                 Wait(2000+random(200));
                 TypeSend('Im srry that was uncalled for...=(');
               end;

             2:begin
                 TypeSend('srry dont speak spanish');
                 Wait(2000+random(200));
                 TypeSend('haha i bet u speak it well though =)');
               end;
           end;


     end;

     procedure TalkAnti;

     begin
       if not LoggedIn then
         NextPlayer(False);
       if TAntiBan=True then
       case random(501)of
        1:TypeSend('sup?');
        2:TypeSend('Wat was that?');
        3:TypeSend('Hah');
        4,194:TypeSend('Crafting...gets boring sometimes..');
        6,142:TypeSend('Willows are great xp');
        7,33: begin
                TypeSend('Crafting lvls?');
                Wait(2000+random(200));
                SendKeys('Mines');
                SayCurrentLevels('crafting');
               end;
        8,14: TypeSend('HAHA tight!');
        20,198: begin
                SendArrowSilentWait(1, 5000);
                Wait(1000+random(3000));
                TypeSend('Flash2: HaHa WEEEEEE!!');
                Wait(2000+random(4000));
                TypeSend('Im kinda weird ya...im moving the direction around XD');
                Wait(2000+random(400));
               end;
        21,50,126,345:TypeSend('Hopefully i can get to '+(inttostr(levelincrease+1+random(4)))+' crafting by tonight!');
       end;
    end;

    procedure NonTalkAnti;

    var
    Movement:Integer;

    begin
      if not LoggedIn then
        NextPlayer(False);
      if NTAntiBan=True then
      case random(200)of
        7: RandomRClick;
        8: BoredHuman;
        9: HoverSkill('Mining', False);
        10: HoverSkill('Woodcutting', False);
        11: HoverSkill('Fletching',False);
        14: Hoverskill('Random',False);
        12: AlmostLogout;
        13: PickUpMouse;
        16: begin
                Gametab(1+random(5));
                Wait(5000);
                Gametab(4);
               end;
        17: MMouse(200+random(400),300+random(300),2+random(90),3+random(99));
        18: MMouse(200+random(400),300+random(300),2+random(90),3+random(99));
        19: begin
              MouseSPeed:=5;
              repeat
                MoveMent:=Movement+1;
                MMouse(200+random(400),300+random(300),2+random(90),3+random(99));
              until(Movement=5);
              if Movement>=5 then
                MouseSpeed:=15;
            end;
      end;
    end;

    procedure AntiRandoms;

    var
    i,q:Integer;

    begin
     if InBlack or NoGameTab then
     case random(3)of
      1:begin
         AntiRandom:=Antirandom+1;
         TypeSend('snap..');
         Logout;
         Wait(2000+random(300));
         if LoggedIn then
         repeat
          Writeln('Could Not log out for some reason. Trying again.');
          Logout;
         until(not Loggedin);
        end;

      2:begin
         AntiRandom:=AntiRandom+1;
         TypeSend('Aw jeez here we go again..');
         Logout;
         Wait(2000);
         if LoggedIn then
         repeat
           Writeln('Could Not log out for some reason. Trying again.');
           Logout;
         until(not Loggedin);
        end;

      3:begin
         AntiRandom:=AntiRandom+1;
         TypeSend('Oh lord...just crafting and this happens');
         Logout;
         Wait(2000+random(300));
         if LoggedIn then
         repeat
          Writeln('Could Not log out for some reason. Trying again.');
          Logout;
         until(false);
        end;
      end;

    begin
     if FindFight then
     begin
      AntiRandom:=AntiRandom+1;
      TypeSend('Snappities =(');
      Wait(2000+random(400));
      Runto('n',true);
      Depositing;
     end;
    end;

    begin
      if FindDead or Ischatblacktextanyline('Oh dear')then
      begin
        Writeln('You are dead performing antiban and terminating script.');
        Wait(2000+random(200));
        case random(3)of
          1:TypeSend('Dang i died....');
          2:TypeSend('Freakin....died again?');
          3:begin
              q:=1;
              TypeSend('Gosh i can neva stop dying...');
              Wait(2000+random(200));
              TypeSend('Oh wel...lets dance!');
              Wait(2000+random(200));
              DoEmote(13);
              if ischatblacktextanyline('unlock')then DoEmote(11);
            end;
        end;
      begin
        if (q<1)then
        begin
          DoEmote(17);
          Wait(2000+random(200));
        end;
          Logout;
          NextPlayer(false);
      end;
     end;
    end;

    begin
     if FindNormalRandoms then
     begin
       AntiRandom:=AntiRandom+1;
       Logout;
       NextPlayer(True);
     end;
    end;
    end;


    procedure LevelCheck;

    var
    Doit: integer;

    begin
      Doit:=GetSkillInfo('Crafting',false);
      if (Doit)<(LevelReq)then
      begin
        WriteLn('You dont have the appropriate level to craft this type of leather');
        TerminateScript;
      end else
      Writeln('Your Crafting Level is '+IntToStr(GetSkillInfo('Crafting',false)));
      LevelIncrease:=Doit;
    end;

    procedure SetupRS;

    var
    direction: String;

    begin
     if not LoggedIn then NextPlayer(False);
       StXp:= GetXp('crafting');
       GetXp('crafting');
       Wait(2000+random(200));
       LevelCheck;
       Wait(1000+random(100));
       GameTab(4);
       Wait(750);
       SetChat('on',1);
       Wait(2000+random(200));
       SetChat('off',2);
       Wait(1000+random(100));
       SendArrowWait(0,1000);
       case random(4)of
         1:Direction:='n';
         2:Direction:='s';
         3:Direction:='e';
       end;
       MakeCompass(direction);
     end;

    procedure OpeningBank;

    var
    Tries,FB: Integer;

    begin
      Writeln('Starting to Open Bank');
      repeat
        Tries:=Tries+1;
        OpenBankQuiet(BankName);
      until(BankScreen)or (Pinscreen)or(Tries>5);
        if Tries>5 then
        begin
          Writeln('You are not in the right bank or we cannot find it');
          Writeln('TERMINATING SCRIPT!');
          TERMINATESCRIPT;
        end;
        if PinScreen then
        begin
          Inpin(Inttostr(Players[0].pin));
          if ischatblacktextanyline('try')then
          begin
            Writeln('We Incorrectly entered the pin.');
            OpenBankQuiet(bankname);
            Inpin(Inttostr(Players[0].pin));
          end;
            Writeln('We have entered the pin or should have.');
        end;
        if BankScreen then
        begin
          repeat
            FB:=FB+1;
            FindDTM(leather,x,y,23,57,478,303);
          until(FindDTM(leather,x,y,23,57,478,303))or
          (FB>=50);
        end;
        if FB>=50 then
        begin
          Writeln('COuld not find the '+inttostr(leather)+' . Terminating the script!');
          TERMINATESCRIPT;
        end;
        if FindDTM(leather,x,y,23,57,478,303)then
        begin
          Mouse(x,y,1+random(8),1+random(8),false);
          Wait(2000+random(200));
          ChooseOption('draw X');
          Wait(2000+random(200));
          TypeSend(inttostr(27+random(200)));
          Writeln('We withdrew the leather...or we should have =)');
        end;
        CLOSEBANK;
    end;

    procedure AbsentNeedle;

    var
    Tries2,FN: Integer;

    begin
      Writeln('Trying to Open bank to find a needle!');
      repeat
        Tries2:=Tries2+1;
        OpenBankQuiet(BankName);
      until(BankScreen)or (Tries2>5);
        if Tries2>5 then
        begin
          Writeln('You are not in the right bank or we cannot find it');
          Writeln('TERMINATING SCRIPT!');
          TERMINATESCRIPT;
        end;
        if BankScreen then
        begin
          repeat
             FN:=FN+1;
             FindDTM(Needle,x,y,23,57,478,303);
          until (FN>=50) or (FindDTM(Needle,x,y,23,57,478,303));
          if FN>=50 then
          begin
            Writeln('You DONT have a needle.. Get one and restart the script!');
            TERMINATESCRIPT;
          end;
          begin
          if FindDTM(Needle,x,y,23,57,478,303)then
            begin
              Writeln('We have found the needle in your bank!');
              Mouse(576,229,1+random(8),1+random(8),true);
              Writeln('Deposited first item in inv.');
              Mouse(x,y,1+random(8),1+random(8),true);
              CLOSEBANK;
              FINDNEEDLEANDLEATHER;
            end;
          end;
       end;
    end;

    procedure AbsentThread;

    var
    FT,Tries3: Integer;

    begin
      Writeln('Opening bank to try and find absent thread!');
      repeat
        Tries3:=Tries3+1;
        OpenBankQuiet(BankName);
      until(BankScreen)or (Tries3>5);
        if Tries3>5 then
        begin
          Writeln('You are not in the right bank or we cannot find it');
          Writeln('TERMINATING SCRIPT!');
          TERMINATESCRIPT;
        end;
        if BankScreen then
        begin
           if FindDTM(leather,x,y,549,205,740,465)then
             Mouse(x,y,1,1,true);
          repeat
             FT:=FT+1;
             FindDTM(Thread,x,y,23,57,478,303);
          until (FT>=50) or (FindDTM(Thread,x,y,23,57,478,303));
          if FT>=50 then
          begin
            Writeln('You DONT have Thread... Get one and restart the script!');
            TERMINATESCRIPT;
          end;
          begin
            if FindDTM(Thread,x,y,23,57,478,303)then
            begin
              Mouse(x,y,1+random(8),1+random(8),false);
              Wait(2000+random(200));
              ChooseOption('draw X');
              Wait(2000+random(200));
              TypeSend(inttostr(200+random(200)));
              Writeln('Retrieved Thread');
              CLOSEBANK;
              FINDNEEDLEANDLEATHER;
            end;
          end;
      end;
    end;

    function Loggedin2:boolean;// Thanks Cazax For Your Very Skilled TUT
                                //Just Did This To Show That I Understand
    var
      R,G,B : Integer;
      H,S,L : Extended;
      X,Y,Z : Extended;
      L1Color: Integer;
      CTPA : TPointArray;
      Uno: TIntegerArray;
      i : Integer;
    begin
      L1color :=16777215;//add colors later! might have to recalculate
      FindColorsSpiralTolerance(MSCX, MSCY, CTPA, l1color, 210,177, 558, 363, 60);
      Uno := GetColors(CTPA);
      for i:=0 to Length(Uno)-1 do
      begin
        TestColor:=GetColor(CTPA[i].x,CTPA[i].y);
        if SimilarColors(TestColor,l1color,40)then
        begin
          ColortoRGB(testcolor,R,G,B);
          ColorToHSL(testcolor,H,S,L);
          ColortoXYZ(testcolor,x,y,z);
          if InRange(R-G,-15,15)then
            if Inrange(R-B,-15,15)then
              if Inrange(g-b,-15,-5)then
                 if InRange(Round(S) - Round(H),-15,15) then
                    if InRange(Round(L) - Round(H), 85, 115) then
                      if InRange(Round(S) - Round(L), -115,-85) then
                        if InRange(Round(X) - Round(Y),-20,10) then
                          if InRange(Round(Y) - Round(Z),-24,7) then
                             if GetColor(CTPA[i].X + 2, CTPA[i].Y + 2) = TestColor then
                                if GetColor(CTPA[i].X + 1, CTPA[i].Y + 1) = TestColor then

            begin
              WriteLn('We are logged in...');
              Result:=True;
            end;
          end;
        end;
      Writeln('We are Logged Out.');
      Result := False;
    end;



    function FindColorObjectInvTPA(color:integer;Text:String):Boolean;

    var
    OC: array of Tpoint;
    I,C,AR,B: integer;

    begin
      SetArrayLength(Oc,4);
      AR:=getarraylength(oc[i])
      C:=10;
      FindColorsSPiralTolerance(MSCX,MSCY,OC,COLOR,MIX1,MIY1,MIX2,MIY2,C);
      for i:=0 to Length(OC)-1 do
      begin
        if AR>=2 then
        begin
          repeat
            B:=B+1;
            C:=C-1;
            FindColorsSPiralTolerance(x,y,OC,COLOR,MIX1,MIY1,MIX2,MIY2,C);
          until(AR=1)or (b=5)and(Ar>=2);
        end;
       if AR=1 then
       begin
         MMouse(x,y,1,1);//moves mouse on object
         If IsUpText(Text) then
           Result := True;
       end else
       if (B=5) and (AR>=2) then
       begin
         MiddleTPAEx(Oc,x,y); //haha this is my idea of randomly XD
         Writeln('There are More than 1 Objects with the same color!');
         Result := False;
         Exit;
       end;
      end;
    end;

    procedure DragonArea;

    begin
      case whattocraft of
        'RVambraces','GVambraces','BVambraces':begin
                                                 //stuff here
                                               end;
        'RDBody','GDBody','BdBody':begin
                                     //stuff here
                                   end;

         'RDLegs','BDLegs','GDLegs':begin
                                      //stuff here
                                    end;
      end;
     WaitWhileCrafting;
    end;


    procedure FindNeedleAndLeather;

    var
    FN:integer;

    begin
      LevelIncrease2:=GetSKillInfo('Crafting',false);
      GetSKillInfo('Crafting',false);
      if LevelIncrease2>LevelIncrease then
        Writeln('You Have Increased A Level!');
      Gametab(4);
      repeat
        FN:=FN+1;
        FindDTM(Needle,x,y,549,205,740,465);
      until(FindDTM(Needle,x,y,549,205,740,465))or
      (FN>=50);
      if FN>=50 then
      begin
        Writeln('No Needle in your Inventory Searching in bank....');
        AbsentNeedle;
      end;
      begin
        if not FindDTm(thread,x,y,549,205,740,465)then
          AbsentTHread;
        if FindDTM(Needle,x,y,549,205,740,465)then
        begin
          Mouse(x,y,1+random(8),1+Random(8),true);
          Writeln('The Needle should be used right now.');
        end;
      end;
      begin
        if FindDTM(leather,x,y,549,205,740,465)then
        begin
          Mouse(x,y,1+random(8),1+random(8),true);
          if FindTextTPA(0,5,229,396,286,410,'to make',NPCchars,nothing)then
          begin
            Writeln('You dont have thread');
            AbsentThread;
          end;
          Coordinatemapping;
        end;
      end;
     end;

    procedure CoordinateMapping;

    var
    Attempt:integer;

    begin
      if (craftsl=true) or (crafthl=true) then
        case WhatToCraft of
          'chaps':begin
                  repeat
                    Attempt:=Attempt+1;
                    Mouse(130,235,1+random(8),1+random(8),false);
                    Wait(2000+random(200));
                  until(FindColor(x,y,4231423,118,223,136,268))or (Attempt=5);
                    if FindColor(x,y,4231423,118,223,136,268)then
                    begin
                      ChooseOption('Make All');
                      WaitWhileCrafting;
                    end;
                end;
        'armor':begin
                  repeat
                    Attempt:=Attempt+1;
                    Mouse(72,108,1+random(8),1+random(8),false);
                    Wait(2000+random(200));
                  until(FindCOlor(x,y,4231423,55,94,86,123))or (Attempt=5);
                  if FindCOlor(x,y,4231423,55,94,86,123)then
                  begin
                    ChooseOption('Make All');
                    WaitWhileCrafting;
                  end;
                end;
        'coif':begin
                    Mouse(256,241,1+random(8),1+random(8),false);
                    Wait(2000+random(200));
                    ChooseOption('Make All');
                    WaitwhileCrafting;
               end;
        'cowl':begin
                  repeat
                    Attempt:=Attempt+1;
                    Mouse(387,236,1+random(8),1+random(8),false);
                    Wait(2000+random(200));
                  until(FindColor(x,y,4231423,370,221,417,267))or(attempt=5);
                  if FindColor(x,y,4231423,370,221,417,267)then
                  begin
                    ChooseOption('Make All');
                    WaitWhileCrafting;
                  end;
               end;
        'hard body':begin
                        Mouse(258,412,1+random(8),1+random(8),false);
                        Wait(2000+random(200));
                        ChooseOption('Make All');
                        WaitWhileCrafting;
                    end;
      end;
        if (Attempt=5)then
          TERMINATESCRIPT;
       if CraftDL=True then
         DragonArea;
    end;

    procedure WaitWhileCrafting;

    var
    Mark:integer;

    begin
      MarkTime(mark);
        TalkAnti;
        repeat
          FAutoResponder;
          AntiRandoms;
          NonTalkAnti;
        until(TimeFromMark(Mark)>=50000);
      Crafted:=Crafted+26;
      Endxp:=GetXp('crafting');
      GetXp('Crafting');
    end;

    procedure Depositing;

    var
    Tries4,Dep,FZ: Integer;

    begin
      Writeln('Opening bank to deposit crafted '+inttostr(Craftname)+'s!');
      repeat
        Tries4:=Tries4+1;
        OpenBankQuiet(BankName);
      until(BankScreen)or (Tries4=5);
        if Tries4=5 then
        begin
          Writeln('We cannot find the bank');
          Writeln('TERMINATING SCRIPT!');
          TERMINATESCRIPT;
        end;
        if BankScreen then
        begin
          repeat
            Dep:=Dep+1;
            FindDTM(Craftname,x,y,549,205,740,465);
          until(FindDTM(Craftname,x,y,549,205,740,465))or
          (Dep=5);
          if Dep=5 then
          begin
            Writeln('Cannot find the '+inttostr(Craftname)+'s. TERMINATING SCRIPT!');
            TERMINATESCRIPT;
          end;
          if FindDTM(Craftname,x,y,549,205,740,465)then
          begin
            Mouse(x,y,1+random(8),1+random(8),false);
            Wait(2000+random(200));
            ChooseOption('Store All');
            Loads:=Loads+1;
          end;
          begin
            repeat
              FZ:=FZ+1;
              FindDTM(leather,x,y,23,57,478,303);
            until(FindDTM(leather,x,y,23,57,478,303))or
          (FZ>=50);
        end;
        if FZ>=50 then
        begin
          Writeln('COuld not find the '+inttostr(leather)+' . Terminating the script!');
          TERMINATESCRIPT;
        end;
        if FindDTM(leather,x,y,23,57,478,303)then
        begin
          Mouse(x,y,1+random(8),1+random(8),false);
          Wait(2000+random(200));
          ChooseOption('draw X');
          Wait(2000+random(200));
          TypeSend(inttostr(27+random(200)));
          Writeln('We withdrew the leather...or we should have =)');
        end;
        CLOSEBANK;
      end;
    end;

    procedure Credits;

    begin
     ClearDebug;
     Writeln('///////////////////////////////////////');
     Writeln('=========                            //');
     Writeln('==                                   //');
     Writeln('=======                              //');
     Writeln('==                                   //');
     Writeln('==                                   //');
     Writeln('==   REAKYMONKEYS AUTO CRAFTER       //');
     Writeln('Version'+' '+Version+'/////////////////////////');
     Writeln('Special Thanks To WHOCARES357 and the staff of http://poopnsuch.com.');
     Wait(2000+random(200));
     ClearDebug;
    end;

    procedure Proggie;

    var
    ToTxp:Integer;

    begin
      TotXp:=EndXp-StXp;
      Writeln('');
      Writeln('');
      Writeln('');
      Writeln('=========FREAKS AUTO==========');
      Writeln('Time Running     '+(TimeRunning));
      Writeln('Your Current Level    '+inttostr(levelincrease));
      Writeln('AntiRandom peformed' +inttostr(AntiRandom));
      if Crafted>=1 then
      Writeln('Number Crafted   '+inttostr(Crafted));
      Writeln('Item Crafted     '+Whattocraft);
      if Loads>=1 then
      Writeln('Loads done       '+inttoStr(loads));
      if Totxp>=50 then
      Writeln('Experience       '+inttostr(Totxp));
      Writeln('Version          '+version);
      if levelincrease2>levelincrease then
      Writeln('You increased    '+inttostr(levelincrease2)+'level[s]');
      Writeln('===========THANKS=============');
    end;

    begin
      Credits;
      SetupSRL;
       ScriptID:='784';
      SRLID:=SRLIdentification;
      SRLPASSWORD:=SRLPASS;
      begin
        case Random(3) of
         1:begin
            Writeln('Disguising as Itunes');
            Disguise('iTunes');
           end;
         2:begin
             Writeln('Disguising as AIM 6');
             Disguise('AIM 6');
           end;
         3:begin
             Writeln('Disguising as Paint');
             Disguise('Paint');
           end;
        end;
      end;
      begin
        BankTrans;
        DeclarePlayers;
        DeclareLeatherDTMS;
        DeclareSLDTMS;
        DeclareDragonDTMS;
        DragonTrans;
        DeclareHLDTMS;
        Namechecker;
        if not Loggedin then
         LoginPlayer;
        begin
          SetupRS;
          OpeningBank;
          repeat
            i:=i+1;
            z:=z+1;
            FindNeedleAndLeather;
            WaitWhileCrafting;
            Depositing;
            if i mod 1 = 0 then
              Proggie;
            if (z=NumberofTimes)then
              NextPlayer(False);
          until(false);
       TERMINATESCRIPT;
        end;
      end;
    end.

  3. #3
    Join Date
    Jan 2008
    Location
    Stanford, CA
    Posts
    329
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    oh ya! i think i accredited it to u! but if i didnt please tell me! ur srl members tut was very good =)

    EDIT:

    wow lol thanks! i didnt know how many times i had put terminatescript instead of nextplayer...even considering that i had 'multiplayer' lol

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

    Default

    well, one thing i noticed, is couldn't you use one single variable for all DTMs in your DeclareDTMs procedures? and also, couldn't you combine them all into one procedure?
    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
    Jan 2008
    Location
    Stanford, CA
    Posts
    329
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    hm i dont exactly know wat u mean by a single variable. could u show me like from my script. Oh ya and about the single declareDTM procedure, it just keeps me a bit more organized (if i wanna go back and change something). would it decrease lag if i put all the DTMs into a single procedure? because at this point im desperate to try and keep lag as low as possible

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

    Default

    i don't think it would decrease lag..but, it would look neater in my opinion, and what i meant was have one dtm, so like

    SCAR Code:
    procedure DeclareSLDTMS;
     
    begin
      if CraftSL=True then
      begin
      case WhatToCraft of
      'coif':begin
                CDTM := DTMFromString('78DA6314666060606740019696B6609A11CA6' +
                          '76405126C0C688011550D489E93801A6E20214A408D00901021A0' +
                          '461248481150230324848970B3007E350046B601B7');
               LevelReq:= 38;
               CraftName:=Coif;
             end;
      'cowl':begin
                CDTM := DTMFromString('78DA6314606060606740011AAAE2609A11CA6' +
                           '7940012BC0C688011558D18A639186A9881040701356C40828980' +
                           '1A1E20214C400DC8CD1294AB0100F7DC0167');
                levelreq:=14;
                craftname:=cowl;
             end;
      'armor': begin
                   CDTM := DTMFromString('78DA63E463606000612460A0A708A619A17C4' +
                                '66620C1CA80061831D5081250033243880835E204D4F000096902' +
                                '6A0489502309244408A89102123CF8D5000045DA01AB');
                  LevelReq:=14;
                  CraftName:=armour;
                end;
     
      'chaps': begin
                  cDTM:= DTMFromString('78DA63E4636060106140010A6126609A11CA6' +
                             '7E400129C0C688011550D0F906026A0468008354240828D801A90' +
                             '7B3908A8E10212F204D47013A106E41E19FC6A00787301CF');
                LevelReq:=18;
                Craftname:=Chaps;
               end;
      end;
     end;
    end;

    so you won't have all those variables floating around unused
    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

  7. #7
    Join Date
    Jan 2008
    Location
    Stanford, CA
    Posts
    329
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    oh aright i think i get it, easier than putting global variables for every DTM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Idea for my first script. Advice please?
    By crossback7 in forum RS3 Outdated / Broken Scripts
    Replies: 1
    Last Post: 06-12-2007, 08:12 PM
  2. advice and test of my first released script
    By king vash in forum OSR Help
    Replies: 4
    Last Post: 04-22-2007, 07:49 PM
  3. Need Advice :(
    By arti in forum OSR Help
    Replies: 8
    Last Post: 04-13-2007, 02:27 AM
  4. any advice pls am new
    By kitson in forum Who Are You ? Who ? Who ?
    Replies: 0
    Last Post: 10-07-2006, 11:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •