Results 1 to 3 of 3

Thread: Fight Procedure help

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

    Default Fight Procedure help

    here's my procedure

    SCAR Code:
    Procedure KillDaCow;
    var
    p,z,highest,hp: integer;
    C: Tpoint;
    Cow: TPointArrayArray;
    Colors:TPointArray;
    Color: array[0..3] of integer;

    begin
      Color[0] := 3755605;
      Color[1] := 5331046;
      Color[2] := 8685966;
      Color[3] := 6321550
      repeat
      for p := 0 to 2 do
      begin
        FightSetup;
        if FindColorsTolerance(Colors,Color[p],MSX1,MSY1,MSX2,MSY2,8)then
        begin
          if length(Colors) > 0 then
          begin
            Cow := SplitTPAEx(Colors,50,50);
            Highest := High(cow);
            for p:=0 to highest do
            begin
              If Length(cow[p]) >= 12 then
              begin
                C := MiddleTPA(Cow[p]);
                if (not(UnderAttack(c.x,c.y))) then
                begin
                  if (c.x <> 0) and (c.y <> 0) then
                  begin
                    MMouse(c.x,c.y,10,10);
                    Wait(97 + random(100));
                    if isuptext('ttack Cow') then
                    begin
                      Mouse(c.x,c.y,10,10,false);
                      if ChooseOption('ttack') then
                      begin
                        FastFlag;
                        wait2(400+random(500),false);
                        markTime(z)
                        if InFight then
                        begin
                        repeat
                          if (not(loggedin)) then exit;
                          FindNormalRandoms;
                          AntiBan;
                          Hp:=HpPercent;
                          if (Hp > 0) and  (Hp < 50) then
                          begin
                            runaway('n',true,2,random(5000));
                            logout;
                            Proggy;
                            nextplayer(false);
                            Exit;
                          end;
                          If TimeFromMark(p) >= 15000 then break;
                        until(not(InFight));
                        while TimeFromMark(z) < 3000 + random(2000) do
                        begin
                          AntiBan;
                          FindNormalRandoms;
                        end;
                        CowsKilled := CowsKilled + 1;
                        Players[currentplayer].integers[5] := Players[currentplayer].integers[5] + 1;
                        Collecthide;
                        end;
                      end;
                    end;
                  end;
                end;
              end;
            end;
          end;
        end;
      end;
      Until(InvFull);
    end;

    okay, what i need help with is i also have this procedure called YellowDot;
    for when it doesn't find a cow it will click on the yellowDot on the minimap.

    but i don't know where to put it for it to only happen when it can't find any color, not just one of my four
    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

  2. #2
    Join Date
    Jun 2007
    Posts
    785
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Procedure KillDaCow;
    var
    p,z,highest,hp: integer;
    C: Tpoint;
    Cow: TPointArrayArray;
    Colors:TPointArray;
    Color: array[0..3] of integer;

    begin
      Color[0] := 3755605;
      Color[1] := 5331046;
      Color[2] := 8685966;
      Color[3] := 6321550
      repeat
      for p := 0 to 2 do
      begin
        FightSetup;
        if FindColorsTolerance(Colors,Color[p],MSX1,MSY1,MSX2,MSY2,8)then
        begin
          if length(Colors) > 0 then
          begin
            Cow := SplitTPAEx(Colors,50,50);
            Highest := High(cow);
            for p:=0 to highest do
            begin
              If Length(cow[p]) >= 12 then
              begin
                C := MiddleTPA(Cow[p]);
                if (not(UnderAttack(c.x,c.y))) then
                begin
                  if (c.x <> 0) and (c.y <> 0) then
                  begin
                    MMouse(c.x,c.y,10,10);
                    Wait(97 + random(100));
                    if isuptext('ttack Cow') then
                    begin
                      Mouse(c.x,c.y,10,10,false);
                      if ChooseOption('ttack') then
                      begin
                        FastFlag;
                        wait2(400+random(500),false);
                        markTime(z)
                        if InFight then
                        begin
                        repeat
                          if (not(loggedin)) then exit;
                          FindNormalRandoms;
                          AntiBan;
                          Hp:=HpPercent;
                          if (Hp > 0) and  (Hp < 50) then
                          begin
                            runaway('n',true,2,random(5000));
                            logout;
                            Proggy;
                            nextplayer(false);
                            Exit;
                          end;
                          If TimeFromMark(p) >= 15000 then break;
                        until(not(InFight));
                        while TimeFromMark(z) < 3000 + random(2000) do
                        begin
                          AntiBan;
                          FindNormalRandoms;
                        end;
                        CowsKilled := CowsKilled + 1;
                        Players[currentplayer].integers[5] := Players[currentplayer].integers[5] + 1;
                        Collecthide
                        end else         // here i think
                        YellowDot;
                        Otherstufff;
                      end;
                    end;
                  end;
                end;
              end;
            end;
          end;
        end;
      end;
      Until(InvFull);
    end;

    [22:20] <[-jesus-]> freddy, go uninstall yourself

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

    Default

    i don't think so dumpin, i think that would still require that it found it and Chose to attack, just didnt find a fight
    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

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help with my Fight procedure
    By Aser in forum OSR Help
    Replies: 3
    Last Post: 11-17-2008, 03:58 AM
  2. hlp wit fight
    By Lt Mays in forum OSR Help
    Replies: 4
    Last Post: 01-27-2008, 02:28 AM
  3. Procedure TypeSendRandom & Procedure AutoResponder!
    By Ultra in forum Research & Development Lounge
    Replies: 12
    Last Post: 01-08-2008, 07:04 PM
  4. Replies: 8
    Last Post: 05-24-2007, 11:57 PM
  5. Procedure that calls random procedure?
    By Secet in forum OSR Help
    Replies: 2
    Last Post: 03-03-2007, 03:56 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
  •