Results 1 to 6 of 6

Thread: Can Somone Fix My Script?

  1. #1
    Join Date
    Oct 2007
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Can Somone Fix My Script?

    Hello, iam currently working on a script, and i need somone to check my script and look for any bugs/errors in it, so can somone help me with this?

    SCAR Code:
    program Monk_Killer;
    {.Include SRL/SRL.Scar}
    {.Include SRL/SRL/Skill/Fighting.Scar}
     
    {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~INSTRUCTIONS~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
    {1. Low-Detail, Highest Brightness, Scar 3.14, SRL Revision 14.                }
    {2. Start Player(s) At The Monastery Logged Out, Have Food If Needed.          }
    {3. Fill Out Declare Players & Const.                                          }
    {4. Drag The Cross-Hair Onto The Runescape Window And Hit Run.                 }
    {5. Enjoy!                                                                     }
    ////////////////////////////////////////////////////////////////////////////////
    {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~FEATURES~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
    {1. Anti-Ban.                                                                  }
    {2. Anti-Randoms.                                                              }
    {3. Multi-Player.                                                              }
    {4. Neatness.                                                                  }
    {5. Heals Using Cabbage Way Or Food Way.                                       }
    {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~NOTES~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
    {NOTE 1: Pick The Color Of The Food That You Are Using, Make Sure That You Dont}
    {Have No Other Colors That Are Similiar To The Color Of Your Food.             }
    {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
    {NOTE 2: Choose One Of The Healing Way's.                                      }
    {Way 1 (Cabbage): The Script Will Walk Your Charecter To The Cabbages At North,}
    {Then, It Will Pick And Eat The Cabbages Until You Have Full HP, Then Go Back. }
    {Way 2 (Food): The Script Will Eat Your Food That You Have On Your Charecter   }
    {Until Your HP Is Full.                                                        }
    {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
    ////////////////////////////////////////////////////////////////////////////////
    {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~TO BE ADDED~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
    {1. Monk - Healing.                                                   }
    {2. More Fail-Safes.                                                           }
    {3. Bug-Fixes.                                                                 }
    ////////////////////////////////////////////////////////////////////////////////
     
    const
      KillInTotal = 50;//How Many Monks To Try And Kill By Using All Of The Players That Are Active?
     
    procedure DeclarePlayers;
    begin
     
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
     
      Players[0].Name := ''; //UserName (EXAMPLE: Deathdoom1112) [THIS IS NOT REAL, WONT WORK]
      Players[0].Pass := ''; //PassWord (EXAMPLE: 313we2ewewrwr) [THIS IS NOT REAL, WONT WORK]
      Players[0].Nick := ''; //3-4 Letters From Your UserName (EXAMPLE: eath) [THIS IS NOT REAL, WONT WORK]
      Players[0].Active := True;//True/False If You Want To Use This Player Or Not.
      Players[0].Strings[0] := 'Cabbage';//Which Healing Way To Use, SEE NOTE 2.
      Players[0].Integers[0] := 0;//If Using Food SEE NOTE 1.
     
      {
      Players[1].Name := ''; //UserName (EXAMPLE: Deathdoom1112) [THIS IS NOT REAL, WONT WORK]
      Players[1].Pass := ''; //PassWord (EXAMPLE: 313we2ewewrwr) [THIS IS NOT REAL, WONT WORK]
      Players[1].Nick := ''; //3-4 Letters From Your UserName (EXAMPLE: eath) [THIS IS NOT REAL, WONT WORK]
      Players[1].Active := True;//True/False If You Want To Use This Player Or Not.
      Players[1].Strings[0] := '';//Which Healing Way To Use, SEE NOTE 2.
      Players[1].Integers[0] := 0;//If Using Food SEE NOTE 1.
      }

     
    end;
     
    var
      X, Y, MMCabbage : Integer;
      TotalKills, CabbagesEaten, FoodEaten : Integer;
      Version : String;
     
    procedure LoadDTMs;
    begin
     
      MMCabbage := DTMFromString('78DA63E46660606067400112160C0CFF81342' +
           '310FF0702461E208305554D6B990F986684F21939B19B83A20664' +
           '0E07AA1A4D7716143500F73907A5');
     
    end;
     
    procedure AntiBan;
    begin
      case Random(12) of
     
        0: MMouse(200+random(50), 200+random(100), 50, 50);
     
        1: begin
             GameTab(2);
             HoverSkill('random', false);
             GameTab(4);
           end;
     
        2: begin
             GameTab(random(14));
             Wait(1000+random(4000));
             GameTab(4);
           end;
     
        3: RandomRClick;
     
        4: BoredHuman;
     
        5: AlmostLogOut;
     
        6: PickUpMouse;
     
      end;
    end;
     
    function TotallyLost : Boolean;
    begin
      if(not(FindColorSpiralTolerance(X, Y, 7642572, MSX1, MSY1, MSX2, MSY2, 3)))and
      (not(FindSymbol(X, Y, 'water')))then
      begin
        LogOut;
        NextPlayer(False);
        WriteLn('Account Was Lost, Next Player.');
        Result:=True;
      end else
      Result:=False;
    end;
     
    function AllPlayersFalse : Boolean;//TOOK FROMM Mickaliscious CREDITS TO HIM.
    var ActivePlayers, i : Byte;
    begin
      for i := 0 to High(Players) do
      if Players[i].Active then Inc(ActivePlayers);
      if ActivePlayers = 0 then Result := True;
    end;
     
    function TheHpPercent : Integer;{Took From Narcle's Auto-Fighter, CREDITS TO HIM}
    var S : String;
    begin
      Result:=(GetMMLevels('hp',S)*100)/Players[CurrentPlayer].Level[8];
    end;
     
    procedure Heal;
    begin
      if(Players[CurrentPlayer].Strings[0] = 'Food')then
      begin
       GameTab(4);
       if(FindColorTolerance(X, Y, Players[CurrentPlayer].Integers[0], MIX1, MIY1, MIX2, MIY2, 5))then
       begin
         Mouse(X, Y, 2, 2, True);
         Wait(3000+random(650));
       end;
      end;
    end;
     
     
    procedure SolveHP;
    var
      AG : Extended;
    begin
      if(HpPercent < 65)then
      begin
        if(Players[CurrentPlayer].Strings[0] = 'Food')then
        begin
          repeat
            Heal;
            FindNormalRandoms;
            FoodEaten := FoodEaten + 1;
          until(HpPercent >= 80);
        end else
        if(Players[CurrentPlayer].Strings[0] = 'Cabbage')then
        begin
          if(FindDTMRotated(MMCabbage, X, Y, MMX1, MMY1, MMX2, MMY2, 270, 90, 0.8, AG))then
          begin
            Mouse(X, Y, 1, 1, True);
            FFlag(0);
          end;
          repeat
            if(FindObj(X, Y, 'ick', 1014102, 5))then
            begin
              Mouse(X, Y, 2, 2, True);
              Wait(1500+random(500));
              GameTab(4);
              if(FindColorTolerance(X, Y, 5485197, MIX1, MIY1, MIX2, MIY2, 5))then
              begin
                Mouse(X, Y, 1, 1, True);
                Wait(1000 + random(500));
                CabbagesEaten := CabbagesEaten + 1;
              end;
            end;
            until(HpPercent >= 80);
            if(FindSymbol(X, Y, 'water'))then
            begin
              Mouse(X, Y, 2, 2, True);
              FFlag(0);
            end;
            if(HpPercent < 40)then
            begin
              SetRun(True);
              MakeCompass('n');
              RunAway('n', True, 1, 1000+random(4000));
            end;
        end;
      end;
    end;
     
    procedure Report;
    begin
      ClearDebug;
      WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
      WriteLn('Monastery Killer Version: ' + Version + '. By U L T R A.');
      WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
      WriteLn('Ran For: ' + TimeRunning + '.');
      WriteLn('Attacked: ' + IntToStr(TotalKills) + ' Monks.');
      WriteLn('Ate: ' + IntToStr(CabbagesEaten) + ' Cabbages.');
      WriteLn('Ate: ' + IntToStr(FoodEaten) + ' Foods.');
      WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
    end;
     
    procedure MainLoop;
    begin
      SolveHP;
      FindNormalRandoms;
      Wait(500+random(500));
      KillMonk;
      FindNormalRandoms;
      Wait(500+random(1000));
      TotalKills := TotalKills + 1;
      Report;
      Wait(100+random(400));
      AntiBan;
      FindNormalRandoms;
    end;
     
    begin
      SetUpSRL;
      DeclarePlayers;
      if(not(LoggedIn))then LogInPlayer;
      Version := '1.0'
      LoadDTMs;
      begin
        repeat
          repeat
            MainLoop;
          until(Players[CurrentPlayer].Active = False)or(TotallyLost);
         if(Players[CurrentPlayer].Active = False)then
         begin
           LogOut;
           Report;
           NextPlayer(False);
         end;
         until(TotalKills >= KillInTotal)or(AllPlayersFalse);
      end;
    end.

    Thanks.
    -Ultra.
    Woot woot.

  2. #2
    Join Date
    Jan 2008
    Location
    Alberta
    Posts
    727
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think your standards are off, heres one with standards, I think I missed a few though.

    SCAR Code:
    program Monk_Killer;
    {.Include SRL/SRL.Scar}
    {.Include SRL/SRL/Skill/Fighting.Scar}

    {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~INSTRUCTIONS~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
    {1. Low-Detail, Highest Brightness, Scar 3.14, SRL Revision 14.                }
    {2. Start Player(s) At The Monastery Logged Out, Have Food If Needed.          }
    {3. Fill Out Declare Players & Const.                                          }
    {4. Drag The Cross-Hair Onto The Runescape Window And Hit Run.                 }
    {5. Enjoy!                                                                     }
    ////////////////////////////////////////////////////////////////////////////////
    {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~FEATURES~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
    {1. Anti-Ban.                                                                  }
    {2. Anti-Randoms.                                                              }
    {3. Multi-Player.                                                              }
    {4. Neatness.                                                                  }
    {5. Heals Using Cabbage Way Or Food Way.                                       }
    {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~NOTES~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
    {NOTE 1: Pick The Color Of The Food That You Are Using, Make Sure That You Dont}
    {Have No Other Colors That Are Similiar To The Color Of Your Food.             }
    {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
    {NOTE 2: Choose One Of The Healing Way's.                                      }
    {Way 1 (Cabbage): The Script Will Walk Your Charecter To The Cabbages At North,}
    {Then, It Will Pick And Eat The Cabbages Until You Have Full HP, Then Go Back. }
    {Way 2 (Food): The Script Will Eat Your Food That You Have On Your Charecter   }
    {Until Your HP Is Full.                                                        }
    {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
    ////////////////////////////////////////////////////////////////////////////////
    {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~TO BE ADDED~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
    {1. Monk - Healing.                                                   }
    {2. More Fail-Safes.                                                           }
    {3. Bug-Fixes.                                                                 }
    ////////////////////////////////////////////////////////////////////////////////

    const
      KillInTotal = 50;//How Many Monks To Try And Kill By Using All Of The Players That Are Active?

    procedure DeclarePlayers;
    begin

      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := ''; //UserName (EXAMPLE: Deathdoom1112) [THIS IS NOT REAL, WONT WORK]
      Players[0].Pass := ''; //PassWord (EXAMPLE: 313we2ewewrwr) [THIS IS NOT REAL, WONT WORK]
      Players[0].Nick := ''; //3-4 Letters From Your UserName (EXAMPLE: eath) [THIS IS NOT REAL, WONT WORK]
      Players[0].Active := True;//True/False If You Want To Use This Player Or Not.
      Players[0].Strings[0] := 'Cabbage';//Which Healing Way To Use, SEE NOTE 2.
      Players[0].Integers[0] := 0;//If Using Food SEE NOTE 1.

      {
      Players[1].Name := ''; //UserName (EXAMPLE: Deathdoom1112) [THIS IS NOT REAL, WONT WORK]
      Players[1].Pass := ''; //PassWord (EXAMPLE: 313we2ewewrwr) [THIS IS NOT REAL, WONT WORK]
      Players[1].Nick := ''; //3-4 Letters From Your UserName (EXAMPLE: eath) [THIS IS NOT REAL, WONT WORK]
      Players[1].Active := True;//True/False If You Want To Use This Player Or Not.
      Players[1].Strings[0] := '';//Which Healing Way To Use, SEE NOTE 2.
      Players[1].Integers[0] := 0;//If Using Food SEE NOTE 1.
      }


    end;

    var
      X, Y, MMCabbage : Integer;
      TotalKills, CabbagesEaten, FoodEaten : Integer;
      Version : String;

    procedure LoadDTMs;
    begin

      MMCabbage := DTMFromString('78DA63E46660606067400112160C0CFF81342' +
           '310FF0702461E208305554D6B990F986684F21939B19B83A20664' +
           '0E07AA1A4D7716143500F73907A5');

    end;

    procedure AntiBan;
    begin
      case Random(12) of

        0: MMouse(200+random(50), 200+random(100), 50, 50);

        1: begin
             GameTab(2);
             HoverSkill('random', false);
             GameTab(4);
           end;

        2: begin
             GameTab(random(14));
             Wait(1000+random(4000));
             GameTab(4);
           end;

        3: RandomRClick;

        4: BoredHuman;

        5: AlmostLogOut;

        6: PickUpMouse;

      end;
    end;

    function TotallyLost : Boolean;
    begin
      if(not(FindColorSpiralTolerance(X, Y, 7642572, MSX1, MSY1, MSX2, MSY2, 3)))and
      (not(FindSymbol(X, Y, 'water')))then
      begin
        LogOut;
        NextPlayer(False);
        WriteLn('Account Was Lost, Next Player.');
        Result:=True;
      end else
      Result:=False;
    end;

    function AllPlayersFalse : Boolean;//TOOK FROMM Mickaliscious CREDITS TO HIM.
    var ActivePlayers, i : Byte;
    begin
      for i := 0 to High(Players) do
      if Players[i].Active then Inc(ActivePlayers);
      if ActivePlayers = 0 then Result := True;
    end;

    function TheHpPercent : Integer;{Took From Narcle's Auto-Fighter, CREDITS TO HIM}
    var S : String;
    begin
      Result:=(GetMMLevels('hp',S)*100)/Players[CurrentPlayer].Level[8];
    end;

    procedure Heal;
    begin
      if(Players[CurrentPlayer].Strings[0] = 'Food')then
      begin
       GameTab(4);
       if(FindColorTolerance(X, Y, Players[CurrentPlayer].Integers[0], MIX1, MIY1, MIX2, MIY2, 5))then
       begin
         Mouse(X, Y, 2, 2, True);
         Wait(3000+random(650));
       end;
      end;
    end;


    procedure SolveHP;
    var
      AG : Extended;
    begin
      if(HpPercent < 65)then
      begin
        if(Players[CurrentPlayer].Strings[0] = 'Food')then
        begin
          repeat
            Heal;
            FindNormalRandoms;
            FoodEaten := FoodEaten + 1;
          until(HpPercent >= 80);
        end else
        if(Players[CurrentPlayer].Strings[0] = 'Cabbage')then
        begin
          if(FindDTMRotated(MMCabbage, X, Y, MMX1, MMY1, MMX2, MMY2, 270, 90, 0.8, AG))then
          begin
            Mouse(X, Y, 1, 1, True);
            FFlag(0);
          end;
          repeat
            if(FindObj(X, Y, 'ick', 1014102, 5))then
            begin
              Mouse(X, Y, 2, 2, True);
              Wait(1500+random(500));
              GameTab(4);
              if(FindColorTolerance(X, Y, 5485197, MIX1, MIY1, MIX2, MIY2, 5))then
              begin
                Mouse(X, Y, 1, 1, True);
                Wait(1000 + random(500));
                CabbagesEaten := CabbagesEaten + 1;
              end;
            end;
            until(HpPercent >= 80);
            if(FindSymbol(X, Y, 'water'))then
            begin
              Mouse(X, Y, 2, 2, True);
              FFlag(0);
            end;
            if(HpPercent < 40)then
            begin
              SetRun(True);
              MakeCompass('n');
              RunAway('n', True, 1, 1000+random(4000));
            end;
        end;
      end;
    end;

    procedure Report;
    begin
      ClearDebug;
      WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
      WriteLn('Monastery Killer Version: ' + Version + '. By U L T R A.');
      WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
      WriteLn('Ran For: ' + TimeRunning + '.');
      WriteLn('Attacked: ' + IntToStr(TotalKills) + ' Monks.');
      WriteLn('Ate: ' + IntToStr(CabbagesEaten) + ' Cabbages.');
      WriteLn('Ate: ' + IntToStr(FoodEaten) + ' Foods.');
      WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
    end;

    procedure MainLoop;
    begin
      SolveHP;
      FindNormalRandoms;
      Wait(500+random(500));
      KillMonk;
      FindNormalRandoms;
      Wait(500+random(1000));
      TotalKills := TotalKills + 1;
      Report;
      Wait(100+random(400));
      AntiBan;
      FindNormalRandoms;
    end;

    begin
      SetUpSRL;
      DeclarePlayers;
      if(not(LoggedIn))then LogInPlayer;
      Version := '1.0'
      LoadDTMs;
      begin
        repeat
          repeat
            MainLoop;
          until(Players[CurrentPlayer].Active = False)or(TotallyLost);
         if(Players[CurrentPlayer].Active = False)then
         begin
           LogOut;
           Report;
           NextPlayer(False);
         end;
         until(TotalKills >= KillInTotal)or(AllPlayersFalse);
      end;
    end.

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

    Default

    hmm..not really a bug, but could help the script a lot if i'm correct,

    SCAR Code:
    function TheHpPercent : Integer;{Took From Narcle's Auto-Fighter, CREDITS TO HIM}
    var S : String;
    begin
      Result:=(GetMMLevels('hp',S)*100)/Players[CurrentPlayer].Level[8];
    end;

    i think GetHPpercent or HpPercent is already a function in SRL, so it could shorten that up...
    or does HPpercent still go to the stats tab?

    also, one of the biggest conviences of training at the monestary is the monks can heal you. i'm pretty sure you were going too anyway, but i'd definately add it if you hadn't thought of it
    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

  4. #4
    Join Date
    Oct 2007
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hmm..not really a bug, but could help the script a lot if i'm correct,

    ScarScript: By Drunkenoldma

    function TheHpPercent : Integer;{Took From Narcle's Auto-Fighter, CREDITS TO HIM}
    var S : String;
    begin
    Result:=(GetMMLevels('hp',S)*100)/Players[CurrentPlayer].Level[8];
    end;


    i think GetHPpercent or HpPercent is already a function in SRL, so it could shorten that up...
    or does HPpercent still go to the stats tab?

    also, one of the biggest conviences of training at the monestary is the monks can heal you. i'm pretty sure you were going too anyway, but i'd definately add it if you hadn't thought of it
    Yes i have thought about it, look at the: TO BE ADDED.


    I think your standards are off, heres one with standards, I think I missed a few though.
    Thanks for fixing my standarts :P.
    Woot woot.

  5. #5
    Join Date
    Feb 2008
    Location
    Pennsylvania
    Posts
    129
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Cant wait until this script is completed. Ashur2good's version is not very good or reliable.
    A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.

    http://www.stats.srl-forums.com/sigs/4360.png

  6. #6
    Join Date
    Jul 2007
    Posts
    1,431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You forgot to show us Killmonk;
    Also you should add something FtWait(1) after every mainscreen click since they can cause randoms.
    [CENTER][SIZE="4"]Inactive[/SIZE]I forgot my password[/CENTER]

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. this could be a challange for somone
    By ben600006 in forum RS3 Outdated / Broken Scripts
    Replies: 7
    Last Post: 06-02-2008, 06:56 PM
  2. Somone make a pc script plz!
    By bomanred7 in forum RS3 Outdated / Broken Scripts
    Replies: 0
    Last Post: 05-28-2008, 01:49 AM
  3. Please somone help me!
    By avex77 in forum OSR Help
    Replies: 2
    Last Post: 12-11-2007, 09:03 PM
  4. Could somone give me a good script to get fishing to 70
    By dertykid555 in forum RS3 Outdated / Broken Scripts
    Replies: 2
    Last Post: 03-15-2007, 07:51 PM

Posting Permissions

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