Results 1 to 12 of 12

Thread: Script Needs a lot of work

  1. #1
    Join Date
    Aug 2009
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Script Needs a lot of work

    Ok So now i have
    SCAR Code:
    Program RyasPowerMiner;
    {.include SRL/SRL.scar}

    Var x, y, Rock, FailedFinding, W, OreDTM, InvC, ha, LoadsDone, tt, ab:integer;

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

      Players[0].Name       := '';
      Players[0].Pass       := '';
      Players[0].Nick       := '';
      Players[0].Active     := True;    // Use this account??
      Players[0].Integers[1]:= 100; // How many Loads
      Players[0].Booleans[0]:= false//Is the pixaxe in the inv
      Players[0].strings[0]:='iron';//what ore?? copper tin iron gold
      Players[0].Strings[1]:='true';//Is pixaxe in inv
    End;

    {Procedure CheckLevels;
    Begin
    End;}


    Procedure AskLevels;
    Begin
      Inc(tt);
        Case Random(40) of
          0: TypeSend('Mining Lvls');
          1: TypeSend('Lvls');
          2: TypeSend('Whats your minning lvls');
          3: Begin
               TypeSend('Woodcutting Lvls?');
               TypeSend('soz Mining Lvls?');
             End;
          4: TypeSend('mining lv');
          5: TypeSend('Who has the best minning lvl?');
          6: TypeSend('Whats every body minning?');
        End;
    End;

    Procedure RandomTalk;
    Begin
      Inc(tt);
      Case Random(30) of
      0: TypeSend('I cant wait to mine faster');
      1: TypeSend('I like the mining skill cape');
      2: TypeSend('Why does levevling mining take for ever');
      3: TypeSend('Someone told me this was the best way to level up but it takes for ever');
      End;
    End;

    Procedure AntiRandoms;
    Begin
      SolveNonTalkingRandoms;
      FindTalk;
      FindNonInventoryRandoms;
      If FindBox then
      SloveBox;
      SolveSandWich;
     
    End;

    Procedure AntiBan;
    Begin
      Inc(ab);
      Case Random(100) of
         0..9: HoverSkill('Random', false);
         10..14: PickUpMouse;
         15..29: BoredHuman;
         30: AskLevels;
         31..40: RandomRClick;
         41..49: RandomMovement;
         50..79: Wait(5000+random(5000));
         80..99: MMouse(230,230,500,500);
         100: RandomTalk;
       End;
    End;

    Procedure SetRocks;
    Begin
    OreDTM := DTMFromString('78DA6374636660E06562400646B262609A11C' +
           'A673401AA114155039385AB0902AAE123A0C605A8469A801A07A0' +
           '1A36026AEC8830C71FA84614BF1A00C0AF02FA');
    End;

    procedure Drop;
    Var i:integer;
    begin
     Inc(LoadsDone);
        case lowercase(Players[CurrentPlayer].Strings[1]) of
        'false': begin
                 DropAll;
                end;
        'true': begin
                  for i:= 2 to 28 do
                     DropItem(i);
                 end;
        end;
          AntiBan;
          AntiRandoms;
    end;

    Procedure AreWeStillMining;
    Begin
    //  InvC := CountItems;
      AntiBan;
    //    While (InvC = CountItems) do
        Wait(600+random(600));
    End;

    Procedure CheckForMine;
    Begin
    End;

    Procedure MineRock;
    Begin
      If (not LoggedIn) then
      Exit;
        Repeat
          SetRocks;
            If FindColorSpiralTolerance(x, y, Rock, MSX1, MSY1, MSX2, MSY2, 39) Then
              Begin
                MMouse(x,y,5,5);
                AntiBan;
                If IsUpTextMultiCustom(['Rock', 'ock', 'ck']) Then
                   If (Random(7)=4) then
                   Begin
                     Mouse(x,y,0,0,True);
                   End Else
                    Begin
                      Mouse(x,y,0,0,False);
                      ChooseOption('ine');
                    End;
                      AreWeStillMining;
                      AntiBan;
                   If not(FindColorSpiralTolerance(x, y, Rock, MSX1, MSY1, MSX2, MSY2, 39)) Then
                   W := 0;
                     Repeat
                       AntiBan;
                       Wait(400+random(300));
                       Inc(W);
                     Until (FindColorSpiralTolerance(x, y, Rock, MSX1, MSY1, MSX2, MSY2, 39)) or (W = 10);
                       If (W = 10) then
                       While not (FindColorSpiralTolerance(x, y, Rock, MSX1, MSY1, MSX2, MSY2, 39)) Do
                       CheckForMine;
              End;
        Until (InvFull)
          If (InvFull) Then
          Inc(loadsDone);
    End;

    Procedure Intro;
    Begin
     Writeln('        __________     ____           ______        _______                             ');
     Wait(75);
     Writeln('       |         |     \    \        /     /       /      \                             ');
      Wait(75);
     Writeln('       |  ____   |      \    \      /     /       /   __   \                            ');
      Wait(75);
     Writeln('       |  |   |  |       \    \    /     /       /   /  \   \                           ');
      Wait(75);
     Writeln('       |  |___|  \        \    \  /     /       /   /    \   \                          ');
      Wait(75);
     Writeln('       |  _____   \        \    \/     /       /   /______\   \                         ');
      Wait(75);
     Writeln('       | |     \   \        \         /       /   /        \   \                        ');
      Wait(75);
     Writeln('       | |      \   \        \       /       /   /          \   \                       ');
      Wait(75);
     Writeln('       | |       \   \        \     /       /   /            \   \                      ');
      Wait(75);
     Writeln('       |_|        \ __\       /    /       /___/              \___\                     ');
      Wait(75);
     Writeln('                             /    /                                                     ');
      Wait(75);
     Writeln('                            /    /                                                      ');
      Wait(75);
     Writeln('                           /    /                                                       ');
      Wait(75);
     Writeln('                          /____/                                     __  ______         ');
      Wait(75);
     Writeln('                            _                                        || / ___  \        ');
      Wait(75);
     Writeln('                           |_|                           _____       | / /   \  \       ');
      Wait(75);
     Writeln('                            _         /\          / /   /  ___ \     |  |      \__\     ');
      Wait(75);
     Writeln('       /\        /\        | |       /  \        / /   /  /____\\    |  |               ');
      Wait(75);
     Writeln('      //\\      //\\       | |      //\  \      / /   /  ________\   |  |               ');
      Wait(75);
     Writeln('     //  \\    //  \\      | |     //  \  \    / /   /   /           |  |               ');
      Wait(75);
     Writeln('    //    \\  //    \\     | |    //    \  \  / /    |  /______      |  |               ');
      Wait(75);
     Writeln('   //      \\//      \\    |_|   //      \  \/ /      \_______\      |__|               ');
      Wait(75);
     Writeln('                    Please Post Progys and Bugs                                         ');
      Wait(75);
     Writeln('                        Have Fun Mining                                                 ');
      Wait(75);
     Writeln('                             Rya                                                        ');
     Wait(1000);
    End;

    Procedure Proggy;
    begin
      ClearDebug;
      Writeln('{===========================================}');
      Writeln('{===== Time Running : ' + TimeRunning + '   =========}');
      Writeln('{===== Rocks Mined  : ' + IntToStr(Loadsdone*27) + '   =================}');
      Writeln('{===== Loads Done   : ' + IntToStr(LoadsDone) + '   =================}');
      Writeln('{===== Times Talked : ' + IntToStr(tt) + '   =================}');
      Writeln('{===== AntiBan used ' + IntToStr(ab) + ' times ===============}');
      Writeln('{===== Please Proggys to get things updated}');
      Writeln('{============================================}');
    end;

    Procedure ScriptTerminate;
    Begin
    Proggy;
    Logout;
    End;

    begin
      SetupSRL;
      declareplayers;
      cleardebug; }
      Intro;
      if(not(loggedin))then
        Loginplayer;
          Repeat
            MineRock;
            Drop;
          Until (LoadsDone = (Players[CurrentPlayer].Integers[1]));
          LogOut;
            Proggy;
    end.
    How can i make it shorter
    Quicker
    Does it work
    And how can i check my minning lvl
    How do i make it so its logs out after the amount of loads needed and log in next also adding amount of times to log in

    So i need alot of help
    Any help would be great thanks

    ~Rya
    Last edited by rya; 10-30-2009 at 01:25 PM.
    I see Now, says the blind man

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

    Default

    {************************************************* ******************************
    function ClickAllItems(Identifier: Integer; ItemType, option: string; waitnum: Integer; tol: TIntegerArray):Integer;
    By: Nava2
    Description: See ClickAllItemsExcept, this doesn't ignore any slots.
    ************************************************** *****************************}

    Make DTM/Bitmap of ore, use that to drop them. No need for crazy/random dropping .

  3. #3
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Your random drop could simply be this:

    SCAR Code:
    Procedure DropRando;
    Var
      Rando : Integer;
      Arrays : Array[0..27] of Integer;
    Label
      Drop;
    Begin
      For I := 0 to 27 do
      Begin
        Drop:
        Rando := Random(27);
        If Arrays[Rando] = 0 then
        Begin
          DropItem(Rando);
          Inc(Arrays[Rando]);
        End else
          Goto Drop;
      End;
    End;

    I'll go into a deeper explanation in a few minutes (playing a Mafia irc game, done in a bit), in the off chance you see this before I've done it. I believe it should work, but not 100% sure.

    Not sure how you'd add a for..to loop to the Line drop, but you could probably figure it out after some sleep!

    @Yoho - Ninja'd and better solution .

    ~Sand

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

    Default

    Yeah, yous will drop everything in inventory, thats dangerous!

  5. #5
    Join Date
    Aug 2009
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Would this be ok
    SCAR Code:
    procedure Drop;
    begin
     Inc(LoadsDone);
        case lowercase(Players[CurrentPlayer].Strings[1]) of
        'false': begin
                 DropAll;
                end;
        'true': begin
                  for i:= 2 to 28 do
                     DropItem(i);
                 end;
        end;
          AntiBan;
          AntiRandoms;
    end;
    I see Now, says the blind man

  6. #6
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by rya View Post
    Would this be ok
    Make it boolean
    SCAR Code:
    procedure Drop;
    begin
      Inc(LoadsDone);
      case Players[CurrentPlayer].Booleans[1] of
        false: DropAll;
        true: for i:= 2 to 28 do
                  DropItem(i);
      end;
      AntiBan;
      AntiRandoms;
    end;

    You seem to have lots of unnecessary nestings.
    SCAR Code:
    If (Random(7)=4) then
                      Begin
                        Mouse(x,y,0,0,True);
                      End Else
                      Begin
                        Mouse(x,y,0,0,False);
                        ChooseOption('ine');
                      End;

    Can be shortened to:
    SCAR Code:
    If (Random(7)=4) then
                        Mouse(x,y,0,0,True);
                    Else
                    Begin
                      Mouse(x,y,0,0,False);
                      ChooseOption('ine');
                    End;

    Also I think you should make the chance of AskLevels a lot smaller to occur, because now I believe it asks the same question in like 10 minutes, which is very botlike behaviour.
    You can do it like this:
    SCAR Code:
    Procedure AntiBan;
    Begin
      Case Random(100) of
         0..9: HoverSkill('Random', false);
         10..14: PickUpMouse;
         15..29: BoredHuman;
         30: AskLevels;
         31..40: RandomRClick;
         41..49: RandomMovement;
       End;
    End;
    Last edited by marpis; 10-30-2009 at 10:37 AM.

  7. #7
    Join Date
    Aug 2009
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for all your help marpis, YoHoJo and Sandstorm nut for every problem sloved there is five more to fix
    I see Now, says the blind man

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

    Default

    Quote Originally Posted by YoHoJo View Post
    {************************************************* ******************************
    function ClickAllItems(Identifier: Integer; ItemType, option: string; waitnum: Integer; tol: TIntegerArray):Integer;
    By: Nava2
    Description: See ClickAllItemsExcept, this doesn't ignore any slots.
    ************************************************** *****************************}

    Make DTM/Bitmap of ore, use that to drop them. No need for crazy/random dropping .
    That would still b best option since it ONLY drops ores try using it

  9. #9
    Join Date
    Aug 2009
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    That would still b best option since it ONLY drops ores try using it
    Yohojo how would i use it please could you go in to info on the parameters and what they mean
    I see Now, says the blind man

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

    Default

    {************************************************* ******************************
    function ClickAllItems(Identifier: Integer; ItemType, option: string; waitnum: Integer; tol: TIntegerArray):Integer;
    By: Nava2
    Description: See ClickAllItemsExcept, this doesn't ignore any slots.
    ************************************************** *****************************}

    ClickAllItems('dtm',MyOreDTM,'Drop',300,[])
    I Think that wroks
    Will click a DTM
    The DTM is MYOreDTM
    It will choose the 'Drop' option in the popup menu.
    It will wait 300ms between each.
    [] Because DTM's tolerance is defined when you make them, not by the function.

    ! Ask more questions if you got em!

  11. #11
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by marpis View Post
    SCAR Code:
    If (Random(7)=4) then
                        Mouse(x,y,0,0,True);
                    Else
                    Begin
                      Mouse(x,y,0,0,False);
                      ChooseOption('ine');
                    End;
    wont work.

    SCAR Code:
    If (Random(7)=4) then
                        Mouse(x,y,0,0,True) // Cant have a ; here.
                    Else
                    Begin
                      Mouse(x,y,0,0,False);
                      ChooseOption('ine');
                    End;

    will work.
    I do visit every 2-6 months

  12. #12
    Join Date
    Aug 2009
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    {************************************************* ******************************
    function ClickAllItems(Identifier: Integer; ItemType, option: string; waitnum: Integer; tol: TIntegerArray):Integer;
    By: Nava2
    Description: See ClickAllItemsExcept, this doesn't ignore any slots.
    ************************************************** *****************************}

    ClickAllItems('dtm',MyOreDTM,'Drop',300,[])
    I Think that wroks
    Will click a DTM
    The DTM is MYOreDTM
    It will choose the 'Drop' option in the popup menu.
    It will wait 300ms between each.
    [] Because DTM's tolerance is defined when you make them, not by the function.

    ! Ask more questions if you got em!

    Edit: Double posted so i toom that one out

    Quote Originally Posted by YoHoJo View Post

    ! Ask more questions if you got em!
    Umm how do you check the minning level?
    And then how could i use that to pick what ore to mine
    Thanks it was the DTM and MyOreDTM that i did'nt get
    Last edited by rya; 11-01-2009 at 09:39 PM. Reason: I double posted
    I see Now, says the blind man

Thread Information

Users Browsing this Thread

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

Posting Permissions

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