Results 1 to 2 of 2

Thread: Fast Fighter v2.70

  1. #1
    Join Date
    Jul 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Fast Fighter v2.70

    Ok heres I keep getting this error.

    Signature call; in report box
    Form setup
    [Runtime Error] : Exception: Access violation at address 006165B1 in module 'scar.exe'. Read of address 00000000 in line 330 in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Core/Login.scar



    Heres the script.

    SCAR Code:
    {------------------------------Script Info-------------------------------------|
    | ScriptName   = Fast Fighter                                                  |
    | Author       = Narcle                                                        |
    | Description  = Fights any monster, food eating and HP regen.                 |
    | Version      = 2.70                                                          |
    | SRL Version  = 4.0 Rev 16                                                    |
    | SCAR Version = 3.15                                                          |
    | Date         = 5/22/08                                                       |
    | Comments     = XP based! Advance Ranging                                     |
    |______________________________________________________________________________|
    |----------------------Instructions, Credits & Help info-----=-----------------|
    |                                                                              |
    | Instructions:                                                                |
    |   Setup: 1. Select form or no form [In constants - true/false]               |
    |          2. Input SRL-stats ID & Password [In constants]                     |
    |          3. Get a HP count of monster for form.                              |
    |          4. Make sure you use the Color picker and select 3 colors           |
    |               from monster, and copy/paste them into notepad.                |
    |          5. Read the "Need to knows" below.                                  |
    |          6. Push play!                                                       |
    |                                                                              |
    |          Need to knows:                                                      |
    |          -In the player form; (default) is next to each option, meaning      |
    |             you can leave it blank if you want it to use default settings.   |
    |          -Options for "Skill to train" are > strength, attack, defence,      |
    |             even, pure, accurate, rapid or longrange <                       |
    |          -Options for "Run Direction" are > n, e, s, w <                     |
    |                                                                              |
    | Credits:                                                                     |
    |  -HyperSecret for posting his SecretFighter (v0.50) script                   |
    |  -Chitin & Cruel100 for Testing and Suggestions                              |
    |______________________________________________________________________________}

    {.include srl/srl.scar}
    {.include srl/srl/skill/fighting.scar}
    {.include SRL/SRL/misc/Users.scar}
    Const
    {------------------------------------------------------------------------------}
    {===============================Player Setup===================================}
    {------------------------------------------------------------------------------}

    MySRLID       = 'myac';//example: '9999'
    MySRLPassword = 'myac';//example: 'password'

    UseForm     = true;//Use form? [true/false] False uses DeclarePlayers
    HaveReport  = true;//Puts some information in Report box
    PublicChat  = 'off';//Public chat on or off?
    LogoutEvery = 10;//Logout and back in every ? minutes. (9-14 is best)

    {==============================================================================}
    {!!!!!       If UseForm = true then DeclarePlayers does not APPLY!        !!!!!}
    {==============================================================================}
    procedure DeclarePlayers;
    begin
      if not(UseForm) then
      begin
        HowManyPlayers := 1;//Change this accordinly
        NumberOfPlayers(HowManyPlayers);
        CurrentPlayer := 0;
     
        Players[0].Name :='myac'; //Character Name
        Players[0].Pass :='myac'; //Character Pass
        Players[0].Nick :='RPS'; //Nickname 3 - 4 Letter's of char name
        Players[0].Active:=True; //True if you want this player to be ran in the script, false if not
        Players[0].Booleans[0] := True;//Eat food? true/false
        Players[0].Booleans[1] := false;//Ranging?
        Players[0].Integers[0] := 5274169;//1st color of monster
        Players[0].Integers[1] := 7307403;//2nd color of monster
        Players[0].Integers[2] := 3643538;//3rd color of monster
        Players[0].Integers[3] := 32;//hitpoints
        Players[0].Strings[0] := 'Goblin';//monster name
        Players[0].Strings[1] := 'strength'; //the skill you want to train > strength, attack, defence, pure, even, accurate, rapid or longrange <
        Players[0].Strings[2] := 's';//Player run direction > n, e, s, w <

      {
        Players[1].Name :=''; //Character Name
        Players[1].Pass :=''; //Character Pass
        Players[1].Nick :=''; //Nickname 3 - 4 Letter's of char name
        Players[1].Active:=True; //True if you want this player to be ran in the script, false if not
        Players[1].Booleans[0] := false;//Eat food? true/false
        Players[1].Booleans[1] := false;//Ranging?
        Players[1].Integers[0] := 0;//1st color of monster
        Players[1].Integers[1] := 0;//2nd color of monster
        Players[1].Integers[2] := 0;//3rd color of monster
        Players[1].Integers[3] := 0;//hitpoints
        Players[1].Strings[0] := '';//monster name
        Players[1].Strings[1] := 'even'; //the skill you want to train > strength, attack, defence, pure, even, accurate, rapid or longrange <
        Players[1].Strings[2] := 's';//Player run direction > n, e, s, w <
      }

      {
        Players[2].Name :=''; //Character Name
        Players[2].Pass :=''; //Character Pass
        Players[2].Nick :=''; //Nickname 3 - 4 Letter's of char name
        Players[2].Active:=True; //True if you want this player to be ran in the script, false if not
        Players[2].Booleans[0] := false;//Eat food? true/false
        Players[2].Booleans[1] := false;//Ranging?
        Players[2].Integers[0] := 0;//1st color of monster
        Players[2].Integers[1] := 0;//2nd color of monster
        Players[2].Integers[2] := 0;//3rd color of monster
        Players[2].Integers[3] := 0;//hitpoints
        Players[2].Strings[0] := '';//monster name
        Players[2].Strings[1] := 'even'; //the skill you want to train > strength, attack, defence, pure, even, accurate, rapid or longrange <
        Players[2].Strings[2] := 's';//Player run direction > n, e, s, w <
      }

      {
        Players[3].Name :=''; //Character Name
        Players[3].Pass :=''; //Character Pass
        Players[3].Nick :=''; //Nickname 3 - 4 Letter's of char name
        Players[3].Active:=True; //True if you want this player to be ran in the script, false if not
        Players[3].Booleans[0] := false;//Eat food? true/false
        Players[3].Booleans[1] := false;//Ranging?
        Players[3].Integers[0] := 0;//1st color of monster
        Players[3].Integers[1] := 0;//2nd color of monster
        Players[3].Integers[2] := 0;//3rd color of monster
        Players[3].Integers[3] := 0;//hitpoints
        Players[3].Strings[0] := '';//monster name
        Players[3].Strings[1] := 'even'; //the skill you want to train > strength, attack, defence, pure, even, accurate, rapid or longrange <
        Players[3].Strings[2] := 's';//Player run direction > n, e, s, w <
      }

      {
        Players[4].Name :=''; //Character Name
        Players[4].Pass :=''; //Character Pass
        Players[4].Nick :=''; //Nickname 3 - 4 Letter's of char name
        Players[4].Active:=True; //True if you want this player to be ran in the script, false if not
        Players[4].Booleans[0] := false;//Eat food? true/false
        Players[4].Booleans[1] := false;//Ranging?
        Players[4].Integers[0] := 0;//1st color of monster
        Players[4].Integers[1] := 0;//2nd color of monster
        Players[4].Integers[2] := 0;//3rd color of monster
        Players[4].Integers[3] := 0;//hitpoints
        Players[4].Strings[0] := '';//monster name
        Players[4].Strings[1] := 'even'; //the skill you want to train > strength, attack, defence, pure, even, accurate, rapid or longrange <
        Players[4].Strings[2] := 's';//Player run direction > n, e, s, w <
      }


    {------------------------------------------------------------------------------}
    {========================Don't edit below this!===============================}
    {------------------------------------------------------------------------------}
      Writeln('No-form setup');
      end else
      begin
        Writeln('Form setup');
        SRLPlayerForm(True, ['Eat Food','Ranging'], ['Color 1','Color 2','Color 3','Monster Hitpoints'], ['Monster Name', 'Skill to train (even)','Run Direction (s)'], []);
      end;
      CheckUserNicks;
      SRLid:= MySRLId;
      SRLpassword:= MySRLPassword;
      ScriptID := '424';
      If (HowManyPlayers = 1) then Writeln('Single-Player Mode') else Writeln('Multi-Player mode; '+IntToStr(HowManyPlayers)+' Players');
    end;

    const
      Version = '2.70';
      ScriptName = 'Fast Fighter';
    var
      CharStartTime, TKilled, Txp, Startxp, foodate, RoundTimer, FailTimer, TFoodate,
      ArrowStartAmount, TArrowAmount, CurrentMonsterHP:integer;
      Hoverskillis,CurrentMonsterName,CurrentRunDir,CurrentStyle,StartTime:string;
      CurrentColors: array of integer;
    procedure LogoutSeq(reason:string); forward;

    function ActiveCount:integer;
    var i:integer;
    begin
      for i := 0 to HowManyPlayers-1 do
      begin
        if Players[i].Active then
          result := result+1;
      end;
    end;

    procedure SigEffect(ln:string);
    var
     I:integer;
    begin
      clearreport;
      for I := 0 to 5 do
       Addtoreport(ln+'||');
      wait(30);
    end;

    procedure NarcSig;
    var
      I,n:integer;
      s, Sig1, Sig2, Sig3, Sig4, Sig5, Sig6:string;
    begin
      Disguise('Sig Call');
      ChangeReportWidth(255);
      Status('Signature call; Watch the report box!');
      Writeln('Signature call; in report box');
      for I := 0 to 28 do
      begin
        SigEffect(s);
        s := s + ' ';
      end;
      for I := 0 to 29 do
      begin
        SigEffect(s);
        delete(s, Length(s), 1)
      end;
      Sig1 := ' _   _                _      ';
      Sig2 := '| \ | |  made by     | |     ';
      Sig3 := '|  \| | __ _ _ __ ___| | ___ ';
      Sig4 := '| . ` |/ _` |  __/ __| |/ _ \';
      Sig5 := '| |\  | (_| | | | (__| |  __/';
      Sig6 := '|_| \_|\__,_|_|  \___|_|\___|';
      for I := 1 to Length(Sig1) do
      begin
        ClearReport;
        AddtoReport(Left(Sig1, I));
        AddtoReport(Left(Sig2, I));
        AddtoReport(Left(Sig3, I));
        AddtoReport(Left(Sig4, I));
        AddtoReport(Left(Sig5, I));
        AddtoReport(Left(Sig6, I));
        wait(50);
      end;
      AddtoReport(ScriptName+' v'+Version);
      if (MySRLID = '') or (MySRLPassword = '') then
      begin
        Disguise('Leecher! :P');
        Writeln('Please register at SRL-stats in the future');
        Writeln('to remove this message and the time delay.');
        Writeln('  -Regards Narcle');
        n := 15;
        repeat
          n := n-1;
          wait(999);
          Status(inttostr(n)+' Seconds to start.');
        until (n=0)
      end;
      Status('Start '+ScriptName);
      Disguise(ScriptName+' v'+Version);
      StartTime := TheTime;
      AddtoReport('Start time: '+StartTime);
    end;


    procedure HighestBrightness;
    var
      x,y,SlideButton:integer;
    begin
      GameTab(11);
      SlideButton := DTMFromString('78DA633CC6C4C0F0920105083ACE673002D28' +
           'C40FC1F08180F01D5BC4155A3A0610957030260358FD1D4683BA0' +
           'AA398DA9465CC516530D9A5D920A3A286A003116104C');
      x:= 707;
      y:= 228;
      If (not FindDTM(SlideButton,x,y,x-25,y-25,x+25,y+25)) then
      begin
        Mouse(711,233,2,2,true);
        writeln('You brightness wasn''t set to highest, check your colors.');
      end;
      FreeDTM(SlideButton);
    end;

    Function RandomsCheck(Time: Integer): Boolean;
    var
      ti,t: Integer;
    begin
      if not(loggedin) then exit;
      if time = 0 then Ti := 1 else Ti := time;
      begin
        for T := 1 to Ti do
        begin
           if FindNormalRandoms then
           begin
             FindInventoryRandoms;
             result := true;
           end;
          if FindTalk then
            Result := True;
          if time = 0 then exit else Wait(200 + Random(50));
        end;
      end;
    end;

    procedure Stopban;
    begin
      if(not(LoggedIn))then Exit;
      begin
        case Random(120) of
          0,1,2,3,4,5: Status('Antiban...');
          0: wait(500+random(10000));
          1: begin
               RandomMovement;
               SetAngle(true);
             end;
          2: HoverSkill(Hoverskillis ,false);
          3: PickUpMouse;
          4: gametab(4);
          5: begin
               RandomMovement;
               SetAngle(true);
             end;
        end;
      end;
    end;

    function InFightNotAttacking: Boolean;//made for my fighters :D very effective
    var
      x, y : Integer;
    begin
    Result := ( (FindColor(x, y, 65280, 230, 130, 280, 180) or FindColor(x, y, 255, 230, 130, 280, 180)) and
        (not(FindColor(x, y, 65280, 12, 24, 212, 328) or FindColor(x, y, 255, 12, 24, 212, 328))) and
        (not(FindColor(x, y, 65280, 290, 12, 509, 328) or FindColor(x, y, 255, 290, 12, 509, 328))) and
        (not(FindColor(x, y, 65280, 197, 15, 303, 117) or FindColor(x, y, 255, 197, 15, 303, 117))) and
        (not(FindColor(x, y, 65280, 179, 180, 330, 332) or FindColor(x, y, 255, 179, 180, 330, 332))) );
    end;

    function GetArrowCount:integer;
    //creds to masquerader | Freddy1990 | Boreas | Mr. Freeweed
    //for the "GetAmount" parts I used
    var
      amountstr: string;
    begin
      gametab(5);
      wait(50);
      amountstr := TrimOthers(GetTextAtEx(667, 249, 0, StatChars, False, False, 0, 2, -1, 5, True, tr_AlphaNumericChars));
      if (Length(amountstr) > 0) then
      begin
        if (Pos('K', amountstr) > 0) then
        begin
          Delete(amountstr, Length(amountstr), Length(amountstr));
          Result := StrToInt(amountstr) * 1000;
        end else
          if (Pos('M', amountstr) > 0) then
          begin
            Delete(amountstr, Length(amountstr), Length(amountstr));
            Result := StrToInt(amountstr) * 1000000;
          end else
            Result := StrToInt(amountstr);
      end else
        Result := 0;
    end;

    function GetXPof(skill: string; t:integer): integer;
    var
      p: TPoint;
      i, tx, ty, x, y, l, II, WaitT: Integer;
      xp, Nums, text2, xpis, typeis : string;
    begin
      Result := -1;
      case t of
        1: typeis := 'urrent';
        2: typeis := 'level';
        3: typeis := 'ainder';
      end;
      if (not LoggedIn) or (not TabExists(2)) then Exit;
      GameTab(2);
      if (GetCurrentTab <> 2) then Exit;
      p := SkillToCoords(True, Skill);
      if (p.x < 1) then Exit;
      MMouse(p.x, p.y+7, 12, 4);
      repeat
        WaitT := WaitT+1;
        wait(100);
        if WaitT >= 300 then exit;
      until findcolor(x, y, 10551295, 554, 205, 743, 465);
      wait(300 + Random(100))
      if (not FindColor(x, y, 10551295, MIX1, MIY1, MIX2, MIY2)) then Exit;
      if IsTextInAreaEx(x, y, x + 60, y + 60, tx, ty, typeis, 0, SmallChars, False, False, 0, 1, 0) then
        xp := GetTextAtEx(tx, ty, 0, SmallChars, False, True, 0, 1, 0, 50, False, tr_AllChars);
        for l := 1 to Length(xp) do
        begin //replace O's with 0's
          if (xp[l] = 'O') then text2 := text2 + '0' else text2 := text2+ xp[l];
        end;
        Nums := '01234567890';//clear spaces
        for I := 1 to Length(Text2) do
        begin
        for II := 1 to 10 do
          begin
            if (Copy(text2, I, 1) = Copy(Nums, II, 1)) then
            xpis := xpis + Copy(Text2, I, 1);
          end;
        end;
      result := strtoint(xpis);
      Status(skill+' T:'+inttostr(t)+' = ' +xpis);
    end;


    procedure OptionsAre;
    begin
      if Players[CurrentPlayer].Strings[2] = '' then CurrentRunDir := 's' else CurrentRunDir := lowercase(Players[CurrentPlayer].Strings[2]);
      if Players[CurrentPlayer].Strings[1] = '' then CurrentStyle := 'even' else CurrentStyle := lowercase(Players[CurrentPlayer].Strings[1]);
      CurrentColors := [Players[CurrentPlayer].Integers[0], Players[CurrentPlayer].Integers[1], Players[CurrentPlayer].Integers[2]];
      if (Players[CurrentPlayer].Integers[3]<3) then CurrentMonsterHP := 3 else CurrentMonsterHP := Players[CurrentPlayer].Integers[3];
      CurrentMonsterName := Players[CurrentPlayer].Strings[0];
      If (CurrentPlayer > 0) and (Players[CurrentPlayer].Integers[0]=0) then
      begin
        CurrentColors := [Players[0].Integers[0], Players[0].Integers[1], Players[0].Integers[2]];
        CurrentMonsterName := Players[0].Strings[0];
        CurrentMonsterHP := Players[0].Integers[3];
      end;
    end;

    Procedure HPNameColorCheck;
    var
      i:integer;
    begin
      if (CurrentColors[0] = 0) or (CurrentColors[1] = 0) or (CurrentColors[2] = 0) then
      begin
        Logout;
        Writeln('Error: Please enter 3 monster colors for player(s).');
        terminatescript;
      end;
      if CurrentMonsterName = '' then
      begin
        Logout;
        Writeln('Error: Please enter monster name(s) for player(s).');
        terminatescript;
      end;
      if CurrentMonsterHP = 0 then
      begin
        Logout;
        Writeln('Error: Please enter monster HP(s) for player(s).');
        terminatescript;
      end;
      for i := 0 to HowManyPlayers-1 do
        Players[i].Booleans[10] := false;//Out of food = false;
    end;

    procedure FFOutFight;
    begin
      flag;
      if (Players[CurrentPlayer].Booleans[0]) then RandomsCheck(8)
         else RandomsCheck(5);
      if (InFight) then
      begin
        Status('Killing Monster...');
        repeat
          if (not (LoggedIn)) then exit;
          Wait(100);
          RandomsCheck(0);
          if infightnotattacking then
          begin
            if (Players[CurrentPlayer].Booleans[0]) then RandomsCheck(8) else RandomsCheck(4);
            if infightnotattacking then exit;
          end;
        until (not(InFight))
      end else
      Wait(300);
    end;

    procedure PReport;
    Var
      CurRemXP, XPpH, Tlm, CurXP, CurAU, XPn, Killed, I,H,M,S:integer;
      Active:string;
    begin
      if not(loggedin) then loginplayer;
      FFoutfight;
      ConvertTime(gettimerunning, H, M, S);
      GetAllLevels;
      CurXP := GetXPof(Hoverskillis,1);
      if (HowManyPlayers = 1) then CurRemXP := GetXPof(Hoverskillis,3);
      if (CurXP > Startxp) and (CurXP > 0) and (Startxp > 0) then XPn := CurXP-Startxp else XPn := 0;
      If (XPn > 0) and (CurrentMonsterHP > 0) then Killed := (XPn/(4*CurrentMonsterHP)) else Killed := 0;
      TKilled := TKilled+killed;
      Txp := (Txp+XPn);
      TFoodate := TFoodate + foodate;
      if (HowManyPlayers = 1) and (CurRemXP>0) and (Txp > 0) then TLm := (CurRemXP)/(Txp/(H*60+m)) else TLm := 1;
      if (HowManyPlayers = 1) and (txp>0) then XPpH := (Txp*60)/(H*60+m) else XPpH := 0;
      if (Players[CurrentPlayer].Booleans[0]) then if (ArrowStartAmount > GetArrowCount) and (GetArrowCount > 0) then CurAU := ArrowStartAmount - GetArrowCount else CurAU := 0;
      if (Players[CurrentPlayer].Booleans[0]) then TArrowAmount := TArrowAmount+CurAU;
      if (HowManyPlayers = 1) then
      begin
        Cleardebug;
        Writeln('|_Single Player__Narcle''s Fast Fighter v'+Version+' by Narcle___|');
        Writeln('| Ran: ' + inttostr(H) + 'h:' + inttostr(M) + 'm:' + inttostr(S)+'s Current Time: '+TheTime+' Start Time: '+StartTime+' |');
        WriteLn('| A:'+IntToStr(Players[currentplayer].level[1])+', S:'+IntToStr(Players[currentplayer].level[2])+', D:'+
                +IntToStr(Players[currentplayer].level[3])+', R:'+IntToStr(Players[currentplayer].level[4])+
                +' Total Kills: '+ inttostr(TKilled)+', Total XP Gained: '+ inttostr(Txp));
        WriteLn('| '+', Kills Round: '+ inttostr(Killed)+', XP Round: '+ inttostr(XPn)+' XP/hour: '+inttostr(XPpH));
        try
          If (Players[CurrentPlayer].Booleans[0]) then writeln('| Ammo remaining: '+inttostr(GetArrowCount)+', Total Ammo used: '+inttostr(TArrowAmount)+', Ammo Used/hour: '+inttostr((TArrowAmount*60)/(H*60+m))+' |');
        except end;
        try
          If (Players[CurrentPlayer].Booleans[0]) and (txp>0) then writeln('| XP/ammo:'+inttostr(Txp/TArrowAmount)+', Estimated Ammo Time Remaining: '+ inttostr(GetArrowCount/((TArrowAmount*60)/(H*60+m)))+' Hour(s) & '+
           +inttostr( ((GetArrowCount*60)/((TArrowAmount*60)/(H*60+m)))-((GetArrowCount/((TArrowAmount*60)/(H*60+m)))*60) )+' Minutes |'); //Think I could make this equation bigger? lol
        except end;
      end;
      if (HowManyPlayers > 1) then
      begin
        Players[currentplayer].Integers[11] := Players[currentplayer].Integers[11] + XPn;
        Players[currentplayer].Integers[12] := Players[currentplayer].Integers[12] + killed;
        Players[currentplayer].Integers[13] := Players[currentplayer].Integers[13] + CurAU;
        Players[currentplayer].Integers[15] := Players[currentplayer].Integers[15] + foodate;
        Players[currentplayer].Integers[31] := Players[currentplayer].Integers[31] + TimeFromMark(RoundTimer);
        if (Players[currentplayer].Integers[11]>0) and (Players[currentplayer].Integers[31]>0) then
        try Players[currentplayer].Integers[32] := ((Players[currentplayer].Integers[11]*3600)/(Players[currentplayer].Integers[31]/1000)) except Players[currentplayer].Integers[32] := 0; end;
        ClearDebug;
        Writeln('|_Multi-Player__Fast Fighter v'+Version+' by Narcle___|');
        Writeln('| Ran: ' + inttostr(H) + 'h:' + inttostr(M) + 'm:' + inttostr(S)+'s Current Time: '+TheTime+' Start Time: '+StartTime+' |');
        WriteLn('| Totals: XP Gained; '+ inttostr(Txp)+', Kills; '+ inttostr(TKilled)+', Food ate; '+inttostr(TFoodate)+', Ammo used; '+inttostr(TArrowAmount)+' |');
        writeln(' _____________________________________________________________________________________');
        Writeln('| # | Nick | Active | A  S  D  R | XP gained | Kills | XP/hour | Food ate | Ammo Used |');
        For I := 0 to HowManyPlayers - 1 do
        begin
          if Players[i].Active=True then Active := 'True' else Active := 'False';
          Writeln('| '+IntToStr(I)+' | '+Players[i].Nick+' | '+Active+' | '+IntToStr(Players[i].level[1])+' '+IntToStr(Players[i].level[2])+' '+
          +IntToStr(Players[i].level[3])+' '+IntToStr(Players[i].level[4])+' | XP: '+IntToStr(Players[i].Integers[11])+' | K: '+
          +IntToStr(Players[i].Integers[12])+' | XP/h: '+IntToStr(Players[i].Integers[32])+' | Ate: '+IntToStr(Players[i].Integers[15])+
          +' | AU: '+IntToStr(Players[i].Integers[13])+' |');
        end;
      end;
      begin//stat updates
        ReportVars[0] := Killed;
        ReportVars[1] := XPn;
        ReportVars[2] := FoodAte;
        SendSRLReport;
      end;
      foodate := 0;
      Killed := 0;
    end;

    {*******************************************************************************
    procedure CombatLookup;
    By: Narcle
    Description: Records weapon data: Attack, Strength, Defence, Shared, Ranged
    *******************************************************************************}

    procedure CombatLookup;
    var
      x, y, i, WaitT:integer;
      Xarr, Yarr:array of integer;
      TB: TBox;
      TP: TPointArray;
    begin
      Xarr := [600, 685, 600, 685];
      Yarr := [275, 275, 330, 330];
      GameTab(1);
      for i := 0 to 3 do
      begin
        MMouse(Xarr[i], Yarr[i], 7, 7);
        repeat
          WaitT := WaitT+1;
          wait(100);
          if WaitT >= 30 then exit;
        until findcolor(x, y, 10551295, 540, 205, 750, 465);
        GetClientDimensions(TB.X2, TB.Y2);
        TB.X1 := 0;
        TB.Y1 := 0;
        FindColorsTolerance(TP, 10551295, TB.X1, TB.Y1, TB.X2, TB.Y2, 0);
        If Length(TP) = 0 Then Exit;
        TB := GetTPABounds(TP);
        Players[currentplayer].Strings[i+50] := Lowercase(Between('(', ' XP',
         GetTextAtEx(TB.X1+2, TB.Y1+27, 0, SmallChars, False, True, 0, 1, 0, 20, False, tr_AllChars)));
        if Players[currentplayer].Strings[i+50] = '' then
        begin
          Players[currentplayer].Strings[i+50] := Lowercase(Between('(', ' XP',
           GetTextAtEx(TB.X1+2, TB.Y1+14, 0, SmallChars, False, True, 0, 1, 0, 20, False, tr_AllChars)));
        end;
        Writeln(Players[currentplayer].Strings[i+50]);
      end;
    end;

    {*******************************************************************************
    function CombatSelect(kind: string): boolean;
    By: Narcle
    Description: Selects combat from combat data recorded.
    *******************************************************************************}

    function CombatSelect(kind: string): boolean;
    var
      i:integer;
    begin
      for i := 0 to 3 do
      if Lowercase(kind) = Players[currentplayer].Strings[i+50] then
      begin
        SetFightMode(i+1);
        Hoverskillis := kind;
        result := true;
        exit;
      end;
    end;

    procedure FFset;
    Var
      Mode:integer;
    begin
      if (not(LoggedIn)) then Exit;
      Status('Setting up player: '+Players[CurrentPlayer].Name+'...');
      MouseSpeed := 14+random(5);
      OptionsAre;
      HPNameColorCheck;
      GetAllLevels;
      GameTab(1);
      mode := 0;
      if Players[currentplayer].Strings[50] = '' then CombatLookup;
      case CurrentStyle of
        'attack': mode := 1;
        'strength': mode := 2;
        'defence': mode := 3;
        'accurate' : SetFightMode(1);
        'rapid' : Setfightmode(2);
        'longrange': Setfightmode(3);
        'even': begin
                  if (Players[CurrentPlayer].level[3] <= Players[CurrentPlayer].level[1]) and
                    (Players[CurrentPlayer].level[3] <= Players[CurrentPlayer].level[2]) then mode := 3;
                  if (Players[CurrentPlayer].level[1] <= Players[CurrentPlayer].level[3]) and
                    (Players[CurrentPlayer].level[1] <= Players[CurrentPlayer].level[2]) then mode := 1;
                  if (Players[CurrentPlayer].level[2] <= Players[CurrentPlayer].level[1]) and
                    (Players[CurrentPlayer].level[2] <= Players[CurrentPlayer].level[3]) then mode := 2;
                end;
        'pure': begin
                  if Players[CurrentPlayer].level[2]<15 then mode := 2 else
                  if Players[CurrentPlayer].level[1]<30 then mode := 1 else
                  if Players[CurrentPlayer].level[2]<25 then mode := 2 else
                  if Players[CurrentPlayer].level[1]<40 then mode := 1 else mode := 2;
                end;
      end;
      Case mode of
        1: begin
             if not CombatSelect('attack') then
              if not CombatSelect('strength') then
              CombatSelect('defence');
           end;
        2: begin
             if not CombatSelect('strength') then
              if not CombatSelect('attack') then
              CombatSelect('defence');
           end;
        3: begin
             if not CombatSelect('defence') then
              if not CombatSelect('strength') then
               CombatSelect('attack');
           end;
      end;
      Retaliate(True);
      SetChat(PublicChat, 1);
      SetChat('off', 2);
      SetChat('off', 3);
      SetChat('off', 4);
      SetChat('off', 5);
      gametab(11);
      SetRun(True);
      HighestBrightness;
      if (Players[CurrentPlayer].Booleans[1]) then
      begin
        Hoverskillis := 'range';
        ArrowStartAmount:=GetArrowCount;
        If (ArrowStartAmount < 200) then
          LogoutSeq('Low ammo count! (below 200)');
      end;
      SetAngle(true);
      Startxp := GetXPof(Hoverskillis,1);
      CharStartTime := Getsystemtime+random(30000);
      MarkTime(RoundTimer);
      MarkTime(FailTimer);
      If HaveReport then
      begin
        ClearReport;
        ChangeReportWidth(284);
        AddtoReport('/~~~~~~ Fast Fighter v'+Version+' ~~~~~~\');
        AddtoReport('|________Made by Narcle_________|');
        AddtoReport('| Active Players: '+inttostr(ActiveCount)+'  False: '+inttostr(HowManyPlayers-ActiveCount)+'   |');
        AddtoReport('Current Player: '+Players[Currentplayer].Name);
      end;
    end;

    procedure LogoutSeq(reason:string);
    begin
      if(not(loggedin))then exit;
      FFoutfight;
      Status('Logout sequence...');
      PReport;
      Stopban;
      if (reason = '') then nextplayer(true) else
      begin
        Writeln(reason+' '+Players[Currentplayer].Name+' is now inactive.');
        nextplayer(false);
      end;
      FFset;
    end;

    function MyEatFood:boolean;
    var
      i,x,y:integer;
    begin
      gametab(4);
      for i := 0 to 27 do
      if ExistsItem(i+1) then
      begin
        MMouseItem(i+1);
        GetMousePos(x, y);
        wait(150+random(50));
        if (pos('Eat', rs_GetUpText) > 0) then
        begin
          Mouse(x,y,0,0,false);
          if chooseoption('Eat') then
          begin
            result := true;
            wait(300+random(200));
            exit;
          end;
        end;
      end;
    end;

    procedure FFhpcheck;//The new and improved! 3/25/08
    var
      c:Integer;
    begin
      if (not(loggedin)) or (HPPercent > 64) then exit;
      if (HPPercent < 30) then
      begin
        Status('Running away HP% < 30...');
        RunAway(CurrentRunDir, true, 1, 5000+random(5000) );
      end;
      if (HPPercent < 65) then
      begin
        Status('HP low doing HP checks...');
        if (Players[CurrentPlayer].Booleans[0]) then
        if not(InvEmpty) then
        for c := 0 to 2 do
        begin
          if MyEatFood then foodate := foodate+1;
          if (not(loggedin)) or (HPPercent > 64) then exit;
        end;
        repeat
          RandomsCheck(4);
          Case random(20) of
            0: RandomMovement;
          end;
          if infight then
          begin
            RunAway(CurrentRunDir, true, 1, 10000+random(2000) );
            if (HPPercent < 50) and infight then
            begin
              Status('Waiting to auto-logout...');
              repeat
                FTwait(4);
              until(not(loggedin))
              LogoutSeq('');
            end;
          end;
          if ( (Getsystemtime-CharStartTime) > (LogoutEvery * 60000) ) then LogoutSeq('');
          if not LoggedIn then exit;
        until(HPPercent > 64);
        SetAngle(true);
      end;
    end;

    var
      MobColorFail:integer;
    function FFfight(option, Mname: string; Ranging:boolean; Colors:TintegerArray; tol: integer): boolean;//Derived from Hypersecrets
    var
      c, i, x, y, xx, yy: integer;
      dir:string;
    begin
      result := false;
      for c := 0 to High(Colors) do
      begin
        x:=MSCX;
        y:=MSCY;
        if FindColorSpiralTolerance(x, y, Colors[c], MSX1, MSY1, MSX2, MSY2, Tol) then
        begin
          MMouse(x, y, 3, 3);
          if FindColorSpiral(xx, yy, 65280, x - 50, y - 50, x + 50, y+ 50) then exit;
          wait(150+random(50));
          if (pos(Mname, rs_GetUpText) > 0) then
          begin
            result := true;
            MarkTime(FailTimer);
            MobColorFail := 0;
            Status('Attacking...');
            GetMousePos(x, y);
            case Random(2) of
              0: begin
                   Mouse(x, y, 0, 0, false);
                   if not(ChooseOption(option)) then
                     result := false;
                 end;
              1: Mouse(x, y, 0, 0, true);
            end;
            Flag;
            if ranging then FTwait(8) else FTwait(5);
            if result then exit;//key to color fail
          end;
          if not result then MobColorFail := MobColorFail+1;
        end;
      end;
      if (MobColorFail >= 5) then
      begin
        case Random(4) of
          0: dir := 'nswe';
          1: dir := 'wens';
          2: dir := 'sewn';
          3: dir := 'ewns';
        end;
        for i := 0 to 3 do
        for c := 0 to High(Colors) do
        begin
          if not (FindColorSpiralTolerance(x, y, Colors[c], MSX1, MSY1, MSX2, MSY2, Tol+3)) then
          begin
            if infight then exit;
            Status('Rotating camera...');
            MakeCompass(StrGet(dir, i+1));
          end else break;
        end;
      end;
    end;

    function FFattack:boolean;
    begin
      if (not (LoggedIn)) or (infight and (not(infightnotattacking))) then Exit;
      if FFfight('ttack', CurrentMonsterName, Players[CurrentPlayer].Booleans[1], CurrentColors, 3) then
      begin
        FFOutFight;
        result:=true;
        Players[CurrentPlayer].Integers[15] := 0;
      end;
    end;


    //=============================================Main Execution============================================\\

    begin
      SetupSRL;
      ClearDebug;
      NarcSig;
      DeclarePlayers;
      OptionsAre;
      HPNameColorCheck;
      if(not(loggedin))then loginplayer;
      FFset;
      repeat
        if(not(loggedin))then loginplayer;
        FFattack;
        FFhpcheck;
        RandomsCheck(0);
        if infightnotattacking then FFattack;
        if (infight and (not(infightnotattacking))) then FFOutFight;
        Stopban;
        if (TimeFromMark(FailTimer) > 240000) then
        begin
          Players[CurrentPlayer].Integers[15] := Players[CurrentPlayer].Integers[15]+1;
          MarkTime(FailTimer);
        end;
        if (Players[CurrentPlayer].Integers[15]>3) then LogoutSeq('Finding mob failed');
        if ( (Getsystemtime-CharStartTime) > (LogoutEvery * 60000) ) then LogoutSeq('');
      until(false);
    end.

  2. #2
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    Please post your problems in the scripts thread.
    http://www.villavu.com/forum/showthr...=20110?t=21963

    That way narcle can answer himself. He has already requested that you do this.
    STOP PM'ING ME

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Narcle's Fast Fighter!
    By Narcle in forum RS3 Outdated / Broken Scripts
    Replies: 5163
    Last Post: 04-20-2013, 02:29 AM
  2. fast fighter v3.02 help
    By yo123 in forum OSR Help
    Replies: 3
    Last Post: 03-07-2009, 09:44 PM
  3. My fast fighter stops? :S
    By eXiidus in forum News and General
    Replies: 1
    Last Post: 12-08-2008, 01:49 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
  •