Results 1 to 15 of 15

Thread: i need help withy my almost finished script

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

    Default i need help withy my almost finished script

    my script needs to click on the red dot on minimap if he cant find a bone for a sec but he clicks on it evry sec and not if hye cant find it for 5 sec


    SCAR Code:
    If(TimeFromMark(myMark) >= 5000)then
      If DotOnMM AND Not InvFull then
      Begin
        Mouse(x, y, 1, 1, True);
        Flag;
        GetBones;
      End
      Else
        Writeln('inventory is full');
        BuryBones;
      Until(InvFull) OR (TimeFromMark(BonePickup) >= MaxLoadTime * 1000);
    End;
    ~Hermen

  2. #2
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    so u want it to find the red dots? just make a dtm of a red dot...or a bitmap
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


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

    Default

    no that function i already gots the clicking is okay but it clicks each 5 sec because he thinks he must click it evry 5 sec but he need to click he he cant find the bone for 5 secs
    ~Hermen

  4. #4
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    ummm

    SCAR Code:
    if FindDTM(bone,whatever)then
    begin
      repeat
        Mouse(x,y,2,2,true);
        Flag;
        MMouse(msc1,msc2,10,10)
        if IsUpText('ones')then
        Mouse(x,y,2,2,true);
      until not finddtm(bones,whatever)
    end;
    ?? im still not exactly sure on what you want
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  5. #5
    Join Date
    Jan 2007
    Posts
    117
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    looks like maybe a bit more of the script will be required to be seen in order to sort out the problem- i think i understand wat the problem is tho- the script is clicking on the red dot regardless of whether it has failed to find a red dot on the minimap right?

  6. #6
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    it cant click on a red dot if it cant find 1
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  7. #7
    Join Date
    Oct 2006
    Posts
    1,071
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    So you want it to click the red dot on the minimap only after not finding a bone for 5 seconds?

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

    Default

    yeah tim thats wat i mean i teh getbones is okay and the clicking dot to but he only need to click the dot if he cant find it

    heres the script


    SCAR Code:
    ////////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    ////////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    ////////////////////////k k k                                                    k k k\\\\\\\\\\\\\\\\\\\\\\
    ////////////////////////k k  kk   kk        ooo     tttttttttt                     k k\\\\\\\\\\\\\\\\\\\\\\
    ////////////////////////k    kk  kk      o       o      tt      ssssssss             k\\\\\\\\\\\\\\\\\\\\\\
    ////////////////////////k    kk kk      o         o     tt     s          zzzzzzzzz  k\\\\\\\\\\\\\\\\\\\\\\
    ////////////////////////k    kkkk      o           o    tt     s                zz   k\\\\\\\\\\\\\\\\\\\\\\
    ////////////////////////k    kk kk     o           o    tt      sssss         zz     k\\\\\\\\\\\\\\\\\\\\\\
    ////////////////////////k    kk  kk    o           o    tt           s      zz       k\\\\\\\\\\\\\\\\\\\\\\
    ////////////////////////k    kk   kk    o         o     tt           s    zz         k\\\\\\\\\\\\\\\\\\\\\\
    ////////////////////////k k  kk    kk    o       o      tt   ssssssss    zzzzzzzzz k k\\\\\\\\\\\\\\\\\\\\\\
    ////////////////////////k k k               ooo                                  k k k\\\\\\\\\\\\\\\\\\\\\\
    ////////////////////////                      PRAYER LEVELER V.1                      \\\\\\\\\\\\\\\\\\\\\\
    //////////////////////////////////////////////////          \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    /////////////////////////////////////////////////instructions\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\                                                               /////////////////////
    ////////////////////////1.fill in setup lines 39-46 and drag the croshair on runescape\\\\\\\\\\\\\\\\\\\\\\
    ////////////////////////2.use normal runescape client on low detail.                  \\\\\\\\\\\\\\\\\\\\\\
    ////////////////////////3.use runescape on v-bright                                   \\\\\\\\\\\\\\\\\\\\\\
    ////////////////////////4.start logged in or out                                      \\\\\\\\\\\\\\\\\\\\\\
    ////////////////////////                                                              \\\\\\\\\\\\\\\\\\\\\\
    ////////////////////////                                                              \\\\\\\\\\\\\\\\\\\\\\
    ////////////////////////                                                              \\\\\\\\\\\\\\\\\\\\\\
    ////////////////////////   THIS SCRIPT IS MADE TO GET BONES AND BURY BONES FROM THE   \\\\\\\\\\\\\\\\\\\\\\
    ////////////////////////   GROUND AT THE CHAOSALTAR IN LEVEL 11/15 IN THE WILDY       \\\\\\\\\\\\\\\\\\\\\\
    ////////////////////////   DONT TRY TO USE THIS SCRIPT ON OTHER PLACES                \\\\\\\\\\\\\\\\\\\\\\
    ////////////////////////   PLS POST BUGS/PROGGY,S ON MY THREAD                        \\\\\\\\\\\\\\\\\\\\\\
    ///////////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    ///////////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\




    program KotszPrayerLeveler;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/misc/trade.scar}


    //setup
    const


    NumberOfUsers = 1; // = player [NUMBER] + 1 =?  fill the ? in here
    StartingPlayer = 0;//Player to start
    HowMuchAntiBan=  5;//(recommend)let this.lesser number is lesser antiban 1-5 (choice of numbers)
    Red = 241;//Color of the red dot on MM.
    MaxLoadTime = 10;//Maximum time in minutes per load.

    Var
     StartPlayer, Loads, NormalRandomsTime, FastRandomsTime, FindTalkTime, MyMark, FallyBuildingColor, buried : integer;
    Var
    Bone, BonePickup :integer;
    Var
    xp :extended;


      Procedure DeclarePlayers;
      Begin
         StartPlayer := StartingPlayer;
         NumberOfPlayers( NumberOfUsers );
         CurrentPlayer := StartPlayer;

         Players[0].Name :='mininghotxp';
         Players[0].Pass :='lol123456789';
         Players[0].Nick :='hotx';
         Players[0].Loc :='chaosaltar';
         Players[0].Integer1 := 2;//Number of loads you want to do.
         Players[0].Active:=True;

         Writeln( IntToStr ( NumberOfUsers ) + ' Players' );
      End;





     Procedure ChangeLocation(Location:string);
      begin
       Players[CurrentPlayer].Loc := location;
      end;



    Function AngleCompass(Angle:integer):Boolean;
    Var
    Ax, Ay, AMark:Integer;
    Begin
      MarkTime(AMark);

      Ax:= Round( 6 * Sin (Angle * Pi / 180))+ 566;
      Ay:= Round(-6 * Cos (Angle * Pi / 180))+ 20;

      KeyDown(VK_Left);

       repeat
         Wait(10+random(5));
         If(FindColor(x, y, 723587, Ax, Ay, Ax, Ay))then
         Begin
           Result:=true;
           break;
         End;
       Until(TimeFromMark(AMark) > 10000);
       KeyUp(VK_Left);
    End;

    //---------------------------------------------------------------------\\
    Procedure DoomCompass;
    Var
    CurrentAngle:integer;
    begin
      CurrentAngle:=FindCompassAngle;
      Case Random(10) Of
        0: begin
             SendArrowWait(1, 250+Random(50));
             SendArrowWait(2, 100+Random(30));
           end;

        1 : begin
             SendArrowWait(3, 1500+Random(150));
            end;

        2 : begin
             SendArrowWait(2, 500+Random(250));
             SendArrowWait(1, 2000+Random(500));
            end;
        3 : SendArrowWait(1, 3000+Random(400));

        4 : SendArrowSilentWait( ((Random(2) * 2) + 1), 1000 + Random(200));

        5 : SendArrowSilentWait( ((Random(2) * 2) + 1), 200 + Random(200));

        6 : SendArrowSilentWait( ((Random(2) * 2)), 200 + Random(200));

        7 : SendArrowSilentWait( ((Random(2) * 2) + 1), 20 + Random(20));

        8 : SendArrowSilentWait( ((Random(2) * 2)), 20 + Random(20));

        9 : SendArrowSilentWait( ((Random(2) * 2)), 1000 + Random(200));

      end;
      AngleCompass(CurrentAngle);
      HighestAngle;
    end;



    //--------------------------------------------------------------------\\
    procedure AntiBannage;
    begin
      Case Random(15) Of

        1 : DoomCompass;
        2 : begin
             GameTab(1+Random(12));
             Wait(2000+Random(400));
             GameTab(4);
            end;
        3 : RandomRClick;
        4 : PickUpMouse;
        5: MouseBox(MSX1,MMY1,MMX2,MMY2,5);



      end;
    end;


    {is what the name says:P}

     procedure KotszSignature;
    begin
      ClearDebug;



    Writeln('////     kk   kk        ooo     tttttttttt                       \\\\')
    Writeln('////     kk  kk      o       o      tt      ssssssss             \\\\')
    Writeln('////     kk kk      o         o     tt     s          zzzzzzzzz  \\\\')
    Writeln('////     kkkk      o           o    tt     s                zz   \\\\')
    Writeln('////     kk kk     o           o    tt      sssss         zz     \\\\')
    Writeln('////     kk  kk    o           o    tt           s      zz       \\\\')
    Writeln('////     kk   kk    o         o     tt           s    zz         \\\\')
    Writeln('////     kk    kk    o       o      tt   ssssssss    zzzzzzzzz   \\\\')
    Writeln('////                    ooo    and  credits to chris             \\\\')

    end;
    //does what the name says:P\\
    procedure KotszProggy;
    begin
      cleardebug;
      Writeln('    THANKS FOR USING MY KOTSZ PRAYER LEVELER!!    ');
      Writeln('    Please remember to post proggies/bugs         ');
      Writeln('////////////////////report\\\\\\\\\\\\\\\\\\\\\\\\');
      Writeln('//Worked For : ' + ScriptTime2(2)                );
      Writeln('//Did ' + IntToStr(Loads) + ' Loads             ');
      Writeln('//'+inttostr(players[currentplayer].integer2 - 1)+  ' bones buried ');
      Writeln('//'            +  Floattostr(Xp)+ 'xp gained '           );

      SRLRandomsReport;
    end;


    {function findfast randoms credits to WT-Fawaki }

    Function FindFastRandoms: Boolean;
    var
      i: Integer;
    begin
      findnormalrandoms;
      for i:=1 to 10 do
      begin
        case I of
           1:  If FindDead then
                 Result := True;
           2:  If FindMod then
                 Result := True;
           3:  If FindMime then
                 Result := True;
           4:  If FindMaze then
                 Result := True;
           5:  If FindQuiz then
                 Result := True;
           6:  If FindDemon then
                 Result := True;
           7:  if NoGameTab then
                 begin
                   Result := True;
                   Players[CurrentPlayer].loc := 'No GameTab';
                   Logout;
                   Exit;
                 end;
           8 : If RC Then Result := True;

           9: If FindTalk Then Result := True;

           10: If HandleTrade Then Result := True;
        End;
        Wait(1);
      end;
    end;


    {Credits to Wizzup}

    Function ScanMiniMap(iFrom, iTo, Distance: Integer): Integer;

    Var
       I, iX,iY: Integer;
    Begin
      For I := iFrom To ITo Do
      Begin
        iX := Round(Distance * Sin(I * Pi / 180)) + 648;
        iY := Round(-Distance * Cos(I * Pi / 180)) + 80;
        If GetColor(iX, iY) = 0 Then
        Begin
          Result := Result + 1;
        End;
      End;
    End;


    {credits to wizzup}

    Function FindNormalRandomsTimeEx: Boolean;

    Var
      TempTime, Time1, Time2: LongInt;

    Begin
      TempTime := GetSystemTime;
      If TempTime - NormalRandomsTime > 6000 Then
      Begin
        NormalRandomsTime := GetSystemTime;
        Time1 := GetSystemTime;
        Result := FindNormalRandoms;
        Time2 := GetSystemTime;
        Status('Calling FNRandoms; Took '+IntToStr(Time2-Time1)+'.');
        Exit;
      End;

      If TempTime - FastRandomsTime > 2000 Then
      Begin
        FastRandomsTime := GetSystemTime;
        Time1 := GetSystemTime;
        Result := FindFastRandoms;
        Time2 := GetSystemTime;
        Status('Calling FFRandoms; Took '+IntToStr(Time2-Time1)+'.');
        Exit;
      End;

      If TempTime - FindTalkTime > 500 Then
      Begin
        FindTalkTime := GetSystemTime;
        Time1 := GetSystemTime;
        Result := FindTalk;
        Time2 := GetSystemTime;
        Status('Calling FT; Took '+IntToStr(Time2-Time1)+'.');
        Exit;
      End;
    End;



    procedure LoadDTM; //The name of the procedure.
    begin
      Bone := DTMFromString('78DA63F4646660C862644006678E1E613002D' +
           '220D1FF40C0E88CA906220B2381B42B504D1101352140353904D4' +
           'F801D5A4E057030056770A2F');

    end;





    {procedure BuryBones bury the bones }


    procedure BuryBones;
    begin

    Repeat
      FindFastRandoms;

    If(Random(25) <= 15)then
      AntiBannage;
      FindNormalRandomsTimeEx;
    if(FindDTM(Bone, x, y,MIX1, MIY1, MIX2, MIY2 ))then
    Begin
      mouse(x,y,1,1,true);
      Buried:=Buried + 1;
      players[currentPlayer].integer2 := buried;
      xp:=xp + 4.5;

    end
    else
    Writeln('Cant find Bones in inventory..');
    Until(Not(FindDTM(Bone, x, y, MIX1, MIY1, MIX2, MIY2)));
    Loads := Loads+1;
    kotszProggy;

    end;


    function DotOnMM:Boolean;
    Begin
      Result := FindColorSpiralTolerance(x, y, Red, MMX1, MMY1, MMX2, MMY2, 5);
    End;


    {procedure GetBones to get bones from the ground }

    procedure GetBones;
    Var
      BoneColor : Integer;
      ix, iY, I, Tol : Integer;
      FoundBone : Boolean;
    begin
      MarkTime(BonePickup);
      BoneColor:= 12764106;
    Repeat
    if(not(LoggedIn))then
    Exit;

    Begin
      MarkTime(myMark);
      FindFastRandoms;
      Tol := 0;
    Repeat
      Tol := Tol + 1;
      If FindColorSpiralTolerance(iX, iY, BoneColor, MSX1, MSY1, MSX2, MSY2, Tol) Then

        Begin
          Writeln('Found the bone with color: '+inttostr(BoneColor));
          MMouse(iX, iY, 2, 2);
          If IsUpText('ake')Then
            FoundBone := True;;
          End;

        Until(Tol > 9) OR (FoundBone);

    If (FoundBone) Then
    Begin
      Case Random(2) Of
        0 : Begin
              Mouse(iX, iY, 1, 1, True);
              Flag;
              if(InvFull) then
              Begin
                writeln('inventory is full');
                BuryBones;
              End;
            End;

        1 : Begin
              Mouse(iX, iY, 1, 1, False);
              Wait(100+random(200));
              ChooseOption(x, y, 'Take');
              While FlagPresent Do
                FindFastRandoms;
                If(Random(25) <= 15)then
                Begin
                  AntiBannage;
                End;
              if(InvFull) then
              Begin
                writeln('inventory is full');
                BuryBones;
              End;
            End;
          End;
        End;
      End;

    If(TimeFromMark(myMark) >= 5000)then
      If DotOnMM AND Not InvFull then
      Begin
        Mouse(x, y, 1, 1, True);
        Flag;
        GetBones;
      End
      Else
        Writeln('inventory is full');
        BuryBones;
      Until(InvFull) OR (TimeFromMark(BonePickup) >= MaxLoadTime * 1000);
    End;





    {procedure setupclient does wat the names says   }
    procedure SetUpClient;
    begin
      wait(500+random(500));
      SetupSrl;
      declareplayers;
      wait(3000);
      ActivateClient;

    end;

    {MainLoop}


     begin
       KotszSignature;
       wait(3000)
       SetUpClient;
       LoadDTM;
       LoginPlayer;
       HighestAngle;
       MakeCompass('N');
    Repeat
      If not LoggedIn Or WeAreDead then break
        FindFastRandoms;
        FindNormalRandoms;
        GetBones;
        BuryBones;
        kotszProggy;
      if(Loads >= Players[CurrentPlayer].Integer1)then
     begin
        LogOut;
        NextPlayer(True);

     end;

    Until(False);
    end.
    ~Hermen

  9. #9
    Join Date
    Dec 2006
    Location
    .̿̂̔͋͗̎̆ͥ̍̒ͤ͂̾̌̀̅
    Posts
    3,012
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    You left your user and pass there.. Changed, I'll PM the new pass to you. By the way, don't use lvl 3 accs for macroing ..

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

    Default

    o yeah srry but this is just a test account and thanks lol i knew tehre was somthing wrong but i didnt know what srry
    ~Hermen

  11. #11
    Join Date
    Jan 2007
    Posts
    117
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hmm i had a look but cant see anything too obvious.. try changing :
    SCAR Code:
    If IsUpText('ake')Then
                      FoundBone := True;; //theres a double semi-colon here
                   End;
    to:
    SCAR Code:
    If IsUpText('ake')Then //should this be 'ones' rather than 'ake'?
          begin
            FoundBone := True;
            MarkTime(myMark);
          End;
    if this dosnt work, try including more debug statements so you can pinpoint what is happening. g'luck

    edit- you could also try changing
    SCAR Code:
    If(TimeFromMark(myMark) >= 5000)then
      If DotOnMM AND Not InvFull then
    to
    SCAR Code:
    If(TimeFromMark(myMark) >= 5000)then
      If DotOnMM AND Not InvFull AND (foundbone=false)then

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

    Default

    ill try the last thing thank you and ake is from 'take bone'
    ~Hermen

  13. #13
    Join Date
    Jan 2007
    Posts
    117
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    glad to be of help, just get back if you need any more help i realised that ake was from take bone, but wud this mean that the script mite take anything which has the bonecolor? i dunno, perhaps you intend this or perhaps theres nothing else which is the same colour as bones.

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

    Default

    dude i didnt test it fully but i think its working ill give a report over few hours
    ~Hermen

  15. #15
    Join Date
    Jan 2007
    Posts
    117
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    cool stuff nice work
    No Signature Assigned.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Third script, not finished woodcutter.
    By Pure1993 in forum First Scripts
    Replies: 22
    Last Post: 03-10-2008, 07:25 PM
  2. I finaly finished my first script.
    By mclovin in forum OSR Help
    Replies: 4
    Last Post: 11-28-2007, 11:03 PM
  3. [Finding Finished Script]Cow Killer / Hide Banker
    By HanTu in forum RS3 Outdated / Broken Scripts
    Replies: 9
    Last Post: 11-14-2007, 03:41 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
  •