Results 1 to 17 of 17

Thread: Proofreading please!

  1. #1
    Join Date
    Oct 2006
    Posts
    517
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Proofreading please!

    This is my ManKiller Script currently:
    SCAR Code:
    {.Script Info:
    # ScriptName  = ManKiller
    # Author      = I Karma I
    # Description = Kills the Men at Edgeville
    # Version     = 1.00
    # Date        = 5 May
    Script Info}


    program ManKiller;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Magic.scar}
    {.include SRL/SRL/Skill/Fighting.scar}

    {==================================================================}

    var
      MenKilled, StartTime, PR : integer;

    {==================================================================}

    const PlayerTime         = 30;
    const Version            = '1.00';

    {==================================================================}

    Procedure DeclarePlayers;
    begin
      HowManyPlayers:=4;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Active := True;
      Players[0].Skill := 'strength';
      Players[0].Integer1 := 5

       Players[1].Name :='';
       Players[1].Pass :='';
       Players[1].Nick :='';
       Players[1].Active :=True;
       Players[1].Skill := 'strength';
       Players[1].Integer1 := 5

       Players[2].Name :='';
       Players[2].Pass :='';
       Players[2].Nick :='';
       Players[2].Active := True;
       Players[2].Skill := 'strength';
       Players[2].Integer1 := 5

       Players[3].Name :='';
       Players[3].Pass :='';
       Players[3].Nick :='';
       Players[3].Active :=False;
       Players[3].Skill := '';
       Players[3].Integer1 := 5

    end;

    {===================================================================}

    Procedure ProgressReport;

    begin
      WriteLn('Edgeville ManKiller version '+Version+' created by I Karma I');
      WriteLn('Worked for' + TimeRunning);
      WriteLn('Attempted to attack '+inttostr(MenKilled)+' Men.');
      WriteLn('Died' +inttostr(Deaths)+' times.');
      SRLRandomsReport;
      MarkTime(PR);
    end;

    {==================================================================}

    procedure SetPlayerStats;
    begin
      if ( not ( LoggedIn )) then Exit;

      GameTab(1);
        begin
          if Players[CurrentPlayer].Skill = 'attack'  then SetFightMode(1);
          if Players[CurrentPlayer].Skill = 'strength' then SetFightMode(2);
          if Players[CurrentPlayer].Skill = 'defence' then SetFightMode(4);
          LampSkill := LowerCase ( Players[CurrentPlayer].Skill );
        end;
      Wait(1000 + Random(1263));
      FindTalk;
    end;

    {==================================================================}
    Procedure ScriptSetup;
    begin
      SetupSRL;
      MarkTime(PR);
      DeclarePlayers;
      BenMouse       := False;
      MouseSpeed     := 12;
      LoginPlayer;
      SetPlayerStats;

    end;

    {==================================================================}
    Procedure AntiBan;
    begin
      case Random(15) of
      1: MouseBox(MSx1, MSy1, MSx2, MSy2, 3);
      2: PickupMouse;
      4: HoverSkill('Attack', False);
      5: HoverSkill('Strength', False);
      7: MouseBox(MIx1, MIy1, MIx2, MIy2, 3);
      9: BoredHuman;
     end;
    end;

    {==================================================================}

    Procedure ManClick;
    begin
      repeat
      if TimeFromMark (PR) > 60*1000*5 then
      ProgressReport;
      if FindObj(x, y, 'Man', 2116697, 10) then
      begin
      Mouse(x, y, 0, 0, True);
      FFlag(2);
      end else
      if FindObj(x, y, 'Man', 2307381, 10)then
      begin
      Mouse(x, y, 0, 0, True);
      FFlag(2);
      end else
      if FindObj(x, y, 'Man', 1785937, 10)then
      begin
      Mouse(x, y, 0, 0, True);
      FFlag(2);
      end else
      if FindObj(x, y, 'Man', 13995395, 10)then
      begin
      Mouse(x, y, 0, 0, True);
      FFlag(2);
      end else
      if FindObj(x, y, 'Man', 6311245, 10)then
      begin
      Mouse(x, y, 0, 0, True);
      FFlag(2);
      end;
      Wait(1000+random(500));
      Until (FindFight);

      Repeat
      FindNormalRandoms;
      AntiBan;
      Wait(20+random(50))
      Until(not(InFight))
      MenKilled := MenKilled + 1
    end;

    {==================================================================}

    Procedure IntroText;
    begin
      ClearDebug;
      WriteLn('[      ManKiller By I Karma I      ]');
      Wait(200);
      WriteLn(' [     ManKiller By I Karma I     ]');
      Wait(200);
      WriteLn('  [    ManKiller By I Karma I    ]');
      Wait(200);
      WriteLn('   [   ManKiller By I Karma I   ]');
      Wait(200);
      WriteLn('    [  ManKiller By I Karma I  ]');
      Wait(200);
      WriteLn('     [ ManKiller By I Karma I ]');
      Wait(200);
      WriteLn('      [ManKiller By I Karma I]');
      Wait(1000);
      WriteLn('Thank you for using ManKiller by I Karma I!')
      WriteLn('Please post Progress Reports in the forum!')
      WriteLn('NOTE: I am not responsible for banned accounts.')
      WriteLn('             ENJOY!                        ')
      Wait(500);
    end;

    {==================================================================}

    Begin
      IntroText;
      ScriptSetup;
        NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
      repeat
      ManClick;

      if(not(LoggedIn))then
       NextPlayer(False)
      if(PlayerStartTime>=Players[CurrentPlayer].Integer1/60)then
       NextPlayer(True)
        Until(ScriptTime(1)>=24)
    End.


    Is there anything I could do better/improve?
    Also, there we're two errors last night when I ran it:

    1.) It searched for Men whilst in fight.
    2.) When it was in a fight, it clicked the inventory tab, then the stats tab, and back to inventory, clicked the man and repeated.

    Can anyone help me here?

  2. #2
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    umm, you should create ur own man finding functions, OR i could even create one for you.

    SCAR Code:
    function BrutalFindMSColorTolerance(dx,dy,Color,EndTolerance: integer): boolean;
    var toler: integer;
    begin
      for toler := 0 to endtolerance do
        begin
          repeat
            Status(inttostr(toler));
            wait(50);
            if findcolorspiraltolerance(dx,dy,Color,MSX1,MSY1,MSX2,MSY2,Toler)then
              break
            else
              Toler := Toler + 5;
          until(Toler>endtolerance);
          if(Toler > endtolerance)then exit;
          if findcolorspiraltolerance(x,y,Color,dx-10,dy-10,dx+10,dy+10,toler)then
            begin
              result := true;
              Status(inttostr(toler));
              exit; //we can safely exit now.
            end;
        end;
    end;

    const MissedColor           = 16728128;
    const HitColor              = 192;

    Function InFightAt(x, y: Integer):Boolean;
    var
      dx, dy: Integer;
    begin
      Result:= (FindColor(dx, dy, GreenStatusColor, x - 20, y - 10, x + 20, y + 10) or
      FindColor(dx, dy, RedStatusColor, x - 20, y - 10, x + 20, y + 10)   or
      FindColor(dx, dy, MissedColor, x - 20, y , x + 20, y + 20)   or
      FindColor(dx, dy, HitColor, x - 20, y, x + 20, y + 20));
    end;

    Procedure ManClick;
    var
      ManColor: array[0..4] of integer;
    var
      I: Integer;
    begin
      if not loggedin then exit;
      ManColor[0] := 2116697;
      ManColor[1] := 2307381;
      ManColor[2] := 1785937;
      ManColor[3] := 13995395;
      ManColor[4] := 6311245;
        repeat
          if not loggedin then break;
          if TimeFromMark (PR) > 60*1000*5 then
            ProgressReport;
          for i := 0 to 4 do
            begin
              if(BrutalFindMSColorTolerance(x,y,ManColor[i],15))then
                begin
                  if InFightAt(x,y)then exit;
                  MMouse(x,y,5,5)
                  WWait(50+random(25));
                  if isuptext('Man')then
                    begin
                      Getmousepos(x,y)
                        case 1+random(2) of
                          1: begin
                               Mouse(x,y,0,0,true);
                             end;
                             
                          2: begin
                               Mouse(x,y,0,0,false);
                               WWait(50+random(25));
                               Chooseoption(x,y,'ttack');
                             end;
                        end
                      FFlag(2);
                      Wait(500+random(500));
                    end;
                end;
            end;
        until(InFight);
       
      if InFight then
        begin
          Status('In Fight');
            repeat
              if not loggedin then break;
              FindNormalRandoms;
              AntiBan;
              Wait(20+random(50))
            Until(not(InFight))
          Status('Not In Fight');
          MenKilled := MenKilled + 1;
        end;
    end;

    here this shouldnt check for men that are in fight

    SCAR Code:
    {.Script Info:
    # ScriptName  = ManKiller
    # Author      = I Karma I
    # Description = Kills the Men at Edgeville
    # Version     = 1.00
    # Date        = 5 May
    Script Info}


    program ManKiller;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Magic.scar}
    {.include SRL/SRL/Skill/Fighting.scar}

    {==================================================================}

    var
      MenKilled, StartTime, PR : integer;

    {==================================================================}

    const PlayerTime         = 30;
    const Version            = '1.00';

    {==================================================================}

    Procedure DeclarePlayers;
    begin
      HowManyPlayers:=4;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
     
      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Active := True;
      Players[0].Skill := 'strength';
      Players[0].Integer1 := 5
    end;

    {===================================================================}

    Procedure ProgressReport;

    begin
      WriteLn('Edgeville ManKiller version '+Version+' created by I Karma I');
      WriteLn('Worked for: ' + TimeRunning);
      WriteLn('Attempted to attack: '+inttostr(MenKilled)+' Men.');
      WriteLn('Died: ' +inttostr(Deaths)+' times.');
      SRLRandomsReport;
      MarkTime(PR);
    end;

    {==================================================================}

    procedure SetPlayerStats;
    begin
      if ( not ( LoggedIn )) then Exit;

      GameTab(1);
        begin
          if Players[CurrentPlayer].Skill = 'attack'  then SetFightMode(1);
          if Players[CurrentPlayer].Skill = 'strength' then SetFightMode(2);
          if Players[CurrentPlayer].Skill = 'defence' then SetFightMode(4);
          LampSkill := LowerCase ( Players[CurrentPlayer].Skill );
        end;
      Wait(1000 + Random(1263));
      FindTalk;
    end;

    {==================================================================}
    Procedure ScriptSetup;
    begin
      SetupSRL;
      MarkTime(PR);
      DeclarePlayers;
      BenMouse       := False;
      MouseSpeed     := 12;
      LoginPlayer;
      SetPlayerStats;
    end;

    {==================================================================}

    function BrutalFindMSColorTolerance(dx,dy,Color,EndTolerance: integer): boolean;
    var toler: integer;
    begin
      for toler := 0 to endtolerance do
        begin
          repeat
            Status(inttostr(toler));
            wait(50);
            if findcolorspiraltolerance(dx,dy,Color,MSX1,MSY1,MSX2,MSY2,Toler)then
              break
            else
              Toler := Toler + 5;
          until(Toler>endtolerance);
          if(Toler > endtolerance)then exit;
          if findcolorspiraltolerance(x,y,Color,dx-10,dy-10,dx+10,dy+10,toler)then
            begin
              result := true;
              Status(inttostr(toler));
              exit; //we can safely exit now.
            end;
        end;
    end;

    const MissedColor           = 16728128;
    const HitColor              = 192;

    Function InFightAt(x, y: Integer):Boolean;
    var
      dx, dy: Integer;
    begin
      Result:= (FindColor(dx, dy, GreenStatusColor, x - 20, y - 10, x + 20, y + 10) or
      FindColor(dx, dy, RedStatusColor, x - 20, y - 10, x + 20, y + 10)   or
      FindColor(dx, dy, MissedColor, x - 20, y , x + 20, y + 20)   or
      FindColor(dx, dy, HitColor, x - 20, y, x + 20, y + 20));
    end;

    Procedure ManClick;
    var
      ManColor: array[0..4] of integer;
    var
      I: Integer;
    begin
      if not loggedin then exit;
      ManColor[0] := 6325164;
      ManColor[1] := 2702910;
      ManColor[2] := 1257530;
      ManColor[3] := 2771553;
      ManColor[4] := 13995909;
        repeat
          if not loggedin then break;
          if InFight then break;
          if TimeFromMark (PR) > 60*1000*5 then
            ProgressReport;
          for i := 0 to 4 do
            begin
              if(BrutalFindMSColorTolerance(x,y,ManColor[i],15))then
                begin
                  if InFightAt(x,y)then exit;
                  MMouse(x,y,5,5)
                  WWait(50+random(25));
                  if isuptext('Man')then
                    begin
                      Getmousepos(x,y)
                        case 1+random(2) of
                          1: begin
                               Mouse(x,y,0,0,true);
                             end;

                          2: begin
                               Mouse(x,y,0,0,false);
                               WWait(50+random(25));
                               Chooseoption(x,y,'ttack');
                             end;
                        end
                      Flag;
                      Wait(1000+random(500));
                    end;
                end;
            end;
        until(InFight);

      if InFight then
        begin
          Status('In Fight');
            repeat
              if not loggedin then break;
              FindNormalRandoms;
              Wait(250+random(250));
            Until(not(InFight))
          Status('Not In Fight');
          MenKilled := MenKilled + 1;
        end;
    end;

    {==================================================================}

    Procedure IntroText;
    begin
      ClearDebug;
      WriteLn('[      ManKiller By I Karma I      ]');
      Wait(200);
      WriteLn(' [     ManKiller By I Karma I     ]');
      Wait(200);
      WriteLn('  [    ManKiller By I Karma I    ]');
      Wait(200);
      WriteLn('   [   ManKiller By I Karma I   ]');
      Wait(200);
      WriteLn('    [  ManKiller By I Karma I  ]');
      Wait(200);
      WriteLn('     [ ManKiller By I Karma I ]');
      Wait(200);
      WriteLn('      [ManKiller By I Karma I]');
      Wait(1000);
      WriteLn('Thank you for using ManKiller by I Karma I!')
      WriteLn('Please post Progress Reports in the forum!')
      WriteLn('NOTE: I am not responsible for banned accounts.')
      WriteLn('             ENJOY!                        ')
      Wait(500);
    end;

    {==================================================================}

    Begin
      IntroText;
      ScriptSetup;
      NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
        repeat
          ManClick;

          if(not(LoggedIn))then
            NextPlayer(False)
        Until(ScriptTime(1)>=24)
    End.

    theres the whole script, i removed the antiban it wasent very good.
    u should try to make a door opening procedure just incase someone closes it.

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  3. #3
    Join Date
    Oct 2006
    Posts
    517
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Idk if this was purpose, but I'll post anyway because you typed it twice. WWait is an unknown identifier, is WWait a special wait or did you mistype Wait? I think you may have mistyped, because I can compile it when I change to Wait; I just want to make sure, though.

  4. #4
    Join Date
    Oct 2006
    Posts
    517
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

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

    Default

    Having :
    Const 1 = 123;
    Const 2 = 123;
    Const 3 = 123;
    Is not necessary.

    You can just have :
    const
    1 = 123;
    2 = 123;
    3 = 123;
    Ect.

    Also Fix your standards.
    Things which appear in bold are not capitalized.
    I like cats.
    Narcle's AK Smelter 1.1.6
    Run Time : 7 Hr 53 Min 5 Sec
    Total Bars : 3371
    Total XP : 58995

  6. #6
    Join Date
    Oct 2006
    Posts
    517
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You mean I should change all the ones in bold from capitalized to normal?

  7. #7
    Join Date
    May 2007
    Location
    Canada eh :p
    Posts
    51
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yup thats what he means

  8. #8
    Join Date
    Oct 2006
    Posts
    517
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  9. #9
    Join Date
    Jan 2007
    Location
    Skaville, Jamaica
    Posts
    1,117
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by jahuro View Post
    Having :
    Const 1 = 123;
    Const 2 = 123;
    Const 3 = 123;
    Is not necessary.

    You can just have :
    const
    1 = 123;
    2 = 123;
    3 = 123;
    Ect.
    But at the same time, it's not going to cost him either...
    Just make sure that when you are like "FindingColorSpiral", don't put down x, y , Const 1, MSX1, MXY1, MSX2, MSY2); Just put down 1...might get confusing though =\

  10. #10
    Join Date
    Oct 2006
    Posts
    517
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    OK, if I have Integer like on 5 minutes, it attacks one man, then logs out. You have to set integer to like 99999. It still searches for men whilst in fight as well. I want to fix both of these errors please then I can get started on a door finding procedure

    Test it:
    SCAR Code:
    {.Script Info:
    # ScriptName  = ManKiller
    # Author      = I Karma I
    # Description = Kills the Men at Edgeville
    # Version     = 1.00
    # Date        = 5 May
    Script Info}


    program ManKiller;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Magic.scar}
    {.include SRL/SRL/Skill/Fighting.scar}

    {==================================================================}

    var
      MenKilled, StartTime, PR : integer;

    {==================================================================}

    const Version            = '1.00';

    {==================================================================}

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

      Players[0].Name := '';
      Players[0].Pass := '';
      Players[0].Nick := '';
      Players[0].Active := True;
      Players[0].Skill := 'strength';
      Players[0].Integer1 := 5

      Players[1].Name := '';
      Players[1].Pass := '';
      Players[1].Nick := '';
      Players[1].Active := True;
      Players[1].Skill := 'strength';
      Players[1].Integer1 := 5

      Players[2].Name := '';
      Players[2].Pass := '';
      Players[2].Nick := '';
      Players[2].Active := True;
      Players[2].Skill := 'strength';
      Players[2].Integer1 := 5

      Players[3].Name :='';
      Players[3].Pass :='';
      Players[3].Nick :='';
      Players[3].Active := False;
      Players[3].Skill := 'strength';
      Players[3].Integer1 := 5
    end;

    {===================================================================}

    Procedure ProgressReport;

    begin
      WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
      WriteLn('Edgeville ManKiller version '+Version);
      WriteLn('created by I Karma I');
      WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
      WriteLn('Worked for: ' + TimeRunning);
      WriteLn('Attempted to attack: '+inttostr(MenKilled)+' Men.');
      WriteLn('Died: ' +inttostr(Deaths)+' times.');
      WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
      SRLRandomsReport;
      MarkTime(PR);
    end;

    {==================================================================}

    procedure SetPlayerStats;
    begin
      if ( not ( LoggedIn )) then Exit;

      GameTab(1);
        begin
          if Players[CurrentPlayer].Skill = 'attack'  then SetFightMode(1);
          if Players[CurrentPlayer].Skill = 'strength' then SetFightMode(2);
          if Players[CurrentPlayer].Skill = 'defence' then SetFightMode(4);
          LampSkill := LowerCase ( Players[CurrentPlayer].Skill );
        end;
      Wait(1000 + Random(1263));
      FindTalk;
    end;

    {==================================================================}
    Procedure ScriptSetup;
    begin
      SetupSRL;
      MarkTime(PR);
      DeclarePlayers;
      BenMouse       := False;
      MouseSpeed     := 12;
      LoginPlayer;
      SetPlayerStats;
    end;

    {==================================================================}

    Function BrutalFindMSColorTolerance(dx,dy,Color,EndTolerance: integer): boolean;
    var toler: integer;
    begin
      for toler := 0 to endtolerance do
        begin
          repeat
            Status(inttostr(toler));
            wait(50);
            if findcolorspiraltolerance(dx,dy,Color,MSX1,MSY1,MSX2,MSY2,Toler)then
              break
            else
              Toler := Toler + 5;
          until(Toler>endtolerance);
          if(Toler > endtolerance)then exit;
          if findcolorspiraltolerance(x,y,Color,dx-10,dy-10,dx+10,dy+10,toler)then
            begin
              result := true;
              Status(inttostr(toler));
              exit; //we can safely exit now.
            end;
        end;
    end;

    const MissedColor           = 16728128;
    const HitColor              = 192;

    Function InFightAt(x, y: Integer):Boolean;
    var
      dx, dy: Integer;
    begin
      Result:= (FindColor(dx, dy, GreenStatusColor, x - 20, y - 10, x + 20, y + 10) or
      FindColor(dx, dy, RedStatusColor, x - 20, y - 10, x + 20, y + 10)   or
      FindColor(dx, dy, MissedColor, x - 20, y , x + 20, y + 20)   or
      FindColor(dx, dy, HitColor, x - 20, y, x + 20, y + 20));
    end;

    Procedure ManClick;
    var
      ManColor: array[0..4] of integer;
    var
      I: Integer;
    begin
      if not loggedin then exit;
      ManColor[0] := 6325164;
      ManColor[1] := 2702910;
      ManColor[2] := 1257530;
      ManColor[3] := 2771553;
      ManColor[4] := 13995909;
        repeat
          if not loggedin then break;
          if InFight then break;
          if TimeFromMark (PR) > 60*1000*1 then
            ProgressReport;
          for i := 0 to 4 do
            begin
              if(BrutalFindMSColorTolerance(x,y,ManColor[i],15))then
                begin
                  if InFightAt(x,y)then exit;
                  MMouse(x,y,5,5)
                  Wait(50+random(25));
                  if isuptext('Man')then
                    begin
                      Getmousepos(x,y)
                        case 1+random(2) of
                          1: begin
                               Mouse(x,y,0,0,true);
                             end;

                          2: begin
                               Mouse(x,y,0,0,false);
                               Wait(50+random(25));
                               Chooseoption(x,y,'ttack');
                             end;
                        end
                      Flag;
                      Wait(1000+random(500));
                    end;
                end;
            end;
        until(InFight);

      if InFight then
        begin
          Status('In Fight');
            repeat
              if not loggedin then break;
              FindNormalRandoms;
              Wait(250+random(250));
            until(not(InFight))
          Status('Not In Fight');
          MenKilled := MenKilled + 1;
        end;
    end;

    {==================================================================}

    Procedure IntroText;
    begin
      ClearDebug;
      WriteLn('[      ManKiller By I Karma I      ]');
      Wait(200);
      WriteLn(' [     ManKiller By I Karma I     ]');
      Wait(200);
      WriteLn('  [    ManKiller By I Karma I    ]');
      Wait(200);
      WriteLn('   [   ManKiller By I Karma I   ]');
      Wait(200);
      WriteLn('    [  ManKiller By I Karma I  ]');
      Wait(200);
      WriteLn('     [ ManKiller By I Karma I ]');
      Wait(200);
      WriteLn('      [ManKiller By I Karma I]');
      Wait(1000);
      WriteLn('Thank you for using ManKiller by I Karma I!')
      WriteLn('Please post Progress Reports in the forum!')
      WriteLn('NOTE: I am not responsible for banned accounts.')
      WriteLn('             ENJOY!                        ')
      Wait(500);
    end;

    {==================================================================}

    begin
      IntroText;
      ScriptSetup;
        NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
      repeat
      ManClick;

      if(not(LoggedIn))then
       NextPlayer(False)
      if(PlayerStartTime>=Players[CurrentPlayer].Integer1/60000)then
       NextPlayer(True)
        until(ScriptTime(1)>=24)
    end.

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

    Default

    There. I fixed your standards.

    Edit: Sorry , fixed wrong script. Heres is the new one:
    SCAR Code:
    {.Script Info:
    # ScriptName  = ManKiller
    # Author      = I Karma I
    # Description = Kills the Men at Edgeville
    # Version     = 1.00
    # Date        = 5 May
    Script Info}


    program ManKiller;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Magic.scar}
    {.include SRL/SRL/Skill/Fighting.scar}

    {==================================================================}

    var
      MenKilled, PR: integer; { You had start time in here? Why? It dosent appear in any other part of the script}

    {==================================================================}

    const
      Version = '1.00';

    {==================================================================}

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

      Players[0].Name := '';
      Players[0].Pass := '';
      Players[0].Nick := '';
      Players[0].Active := True;
      Players[0].Skill := 'strength';
      Players[0].Integer1 := 5

      Players[1].Name := '';
      Players[1].Pass := '';
      Players[1].Nick := '';
      Players[1].Active := True;
      Players[1].Skill := 'strength';
      Players[1].Integer1 := 5

      Players[2].Name := '';
      Players[2].Pass := '';
      Players[2].Nick := '';
      Players[2].Active := True;
      Players[2].Skill := 'strength';
      Players[2].Integer1 := 5

      Players[3].Name := '';
      Players[3].Pass := '';
      Players[3].Nick := '';
      Players[3].Active := False;
      Players[3].Skill := 'strength';
      Players[3].Integer1 := 5
    end;

    {===================================================================}

    procedure ProgressReport;

    begin
      WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
      WriteLn('Edgeville ManKiller version ' + Version);
      WriteLn('created by I Karma I');
      WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
      WriteLn('Worked for: ' + TimeRunning);
      WriteLn('Attempted to attack: ' + inttostr(MenKilled) + ' Men.');
      WriteLn('Died: ' + inttostr(Deaths) + ' times.');
      WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
      SRLRandomsReport;
      MarkTime(PR);
    end;

    {==================================================================}

    procedure SetPlayerStats;
    begin
      if (not (LoggedIn)) then Exit;

      GameTab(1);
      begin
        if Players[CurrentPlayer].Skill = 'attack' then SetFightMode(1);
        if Players[CurrentPlayer].Skill = 'strength' then SetFightMode(2);
        if Players[CurrentPlayer].Skill = 'defence' then SetFightMode(4);
        LampSkill := LowerCase(Players[CurrentPlayer].Skill);
      end;
      Wait(1000 + Random(1263));
      FindTalk;
    end;

    {==================================================================}

    procedure ScriptSetup;
    begin
      SetupSRL;
      MarkTime(PR);
      DeclarePlayers;
      BenMouse := False;
      MouseSpeed := 12;
      LoginPlayer;
      SetPlayerStats;
    end;

    {==================================================================}

    function BrutalFindMSColorTolerance(dx, dy, Color, EndTolerance: integer): boolean;
    var toler: integer;
    begin
      for toler := 0 to endtolerance do
      begin
        repeat
          Status(inttostr(toler));
          wait(50);
          if findcolorspiraltolerance(dx, dy, Color, MSX1, MSY1, MSX2, MSY2, Toler) then
            break
          else
            Toler := Toler + 5;
        until (Toler > endtolerance);
        if (Toler > endtolerance) then exit;
        if findcolorspiraltolerance(x, y, Color, dx - 10, dy - 10, dx + 10, dy + 10, toler) then
        begin
          result := true;
          Status(inttostr(toler));
          exit; //we can safely exit now.
        end;
      end;
    end;

    const MissedColor = 16728128;
    const HitColor = 192;

    function InFightAt(x, y: Integer): Boolean;
    var
      dx, dy: Integer;
    begin
      Result := (FindColor(dx, dy, GreenStatusColor, x - 20, y - 10, x + 20, y + 10) or
        FindColor(dx, dy, RedStatusColor, x - 20, y - 10, x + 20, y + 10) or
        FindColor(dx, dy, MissedColor, x - 20, y, x + 20, y + 20) or
        FindColor(dx, dy, HitColor, x - 20, y, x + 20, y + 20));
    end;

    procedure ManClick;
    var
      ManColor: array[0..4] of integer;
    var
      I: Integer;
    begin
      if not loggedin then exit;
      ManColor[0] := 6325164;
      ManColor[1] := 2702910;
      ManColor[2] := 1257530;
      ManColor[3] := 2771553;
      ManColor[4] := 13995909;
      repeat
        if not loggedin then break;
        if InFight then break;
        if TimeFromMark(PR) > 60 * 1000 * 1 then
          ProgressReport;
        for i := 0 to 4 do
        begin
          if (BrutalFindMSColorTolerance(x, y, ManColor[i], 15)) then
          begin
            if InFightAt(x, y) then exit;
            MMouse(x, y, 5, 5)
              Wait(50 + random(25));
            if isuptext('Man') then
            begin
              Getmousepos(x, y)
                case 1 + random(2) of
                1: begin
                    Mouse(x, y, 0, 0, true);
                  end;

                2: begin
                    Mouse(x, y, 0, 0, false);
                    Wait(50 + random(25));
                    Chooseoption(x, y, 'ttack');
                  end;
              end
              Flag;
              Wait(1000 + random(500));
            end;
          end;
        end;
      until (InFight);

      if InFight then
      begin
        Status('In Fight');
        repeat
          if not loggedin then break;
          FindNormalRandoms;
          Wait(250 + random(250));
        until (not (InFight))
          Status('Not In Fight');
        MenKilled := MenKilled + 1;
      end;
    end;

    {==================================================================}

    procedure IntroText;
    begin
      ClearDebug;
      WriteLn('[      ManKiller By I Karma I      ]');
      Wait(200);
      WriteLn(' [     ManKiller By I Karma I     ]');
      Wait(200);
      WriteLn('  [    ManKiller By I Karma I    ]');
      Wait(200);
      WriteLn('   [   ManKiller By I Karma I   ]');
      Wait(200);
      WriteLn('    [  ManKiller By I Karma I  ]');
      Wait(200);
      WriteLn('     [ ManKiller By I Karma I ]');
      Wait(200);
      WriteLn('      [ManKiller By I Karma I]');
      Wait(1000);
      WriteLn('Thank you for using ManKiller by I Karma I!');
      WriteLn('Please post Progress Reports in the forum!'); {Forgot a few semi-colons ?}
      WriteLn('NOTE: I am not responsible for banned accounts.');
      WriteLn('             ENJOY!                        ');
      Wait(500);
    end;

    {==================================================================}

    begin
      IntroText;
      ScriptSetup;
      NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
      repeat
        ManClick;

        if (not (LoggedIn)) then
          NextPlayer(False)
            if (PlayerStartTime >= Players[CurrentPlayer].Integer1 / 60000) then
            NextPlayer(True)
      until (ScriptTime(1) >= 24)
    end.

    I put in comments for where you went wrong and fixed your standards. Apart from that good work.
    I like cats.
    Narcle's AK Smelter 1.1.6
    Run Time : 7 Hr 53 Min 5 Sec
    Total Bars : 3371
    Total XP : 58995

  12. #12
    Join Date
    Oct 2006
    Posts
    517
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

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

    Default

    Quote Originally Posted by I Karma I View Post
    Yeah, but thats my old script, can you fix the one above that?
    Whoops, Sorry i edited my post. See above.
    I like cats.
    Narcle's AK Smelter 1.1.6
    Run Time : 7 Hr 53 Min 5 Sec
    Total Bars : 3371
    Total XP : 58995

  14. #14
    Join Date
    Oct 2006
    Posts
    517
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    OK, thanks.

    The Integer1 is 5, which means it should wait 5 minutes before it Logs Out. It attacks one Man and Logs Out.... Any help?

  15. #15
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    i think it was when u divided by 60000 where you are supposed to multiply

  16. #16
    Join Date
    Oct 2006
    Posts
    161
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    [quote]
    1.) It searched for Men whilst in fight.
    2.) When it was in a fight, it clicked the inventory tab, then the stats tab, and back to inventory, clicked the man and repeated.
    [quote]


    Number two is probably the findnormalrandoms, checking for boxes.

  17. #17
    Join Date
    Oct 2006
    Posts
    517
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. the impotence of proofreading by taylor mali
    By Killerdou in forum Misc. Links and Programs
    Replies: 0
    Last Post: 08-23-2007, 09:10 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
  •