Results 1 to 4 of 4

Thread: [RS2] My first ok script, an autofighter.

  1. #1
    Join Date
    Feb 2006
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default [RS2]Autofighter[Version 6]

    Here goes it doesn't have a food eating option and is a nooby autofighter but anyway it works.
    Sorry I went straight from version 1 to wersion 6, I've been updating this fighter on mopars forums and forgot to update it on SRL.
    Code:
    {===========================================================]
                  AUTOFIGHTER BY BUMFLUFF120(SHORTY)
    [===========================================================}
     
    program BFAutoFighter;
    var x,y:integer;
    const
    username = '';
    password = '';
    MonsterColor = 7444676; //Monster color
    MonColTol = 15; //Tolerance level to find monster
    FightStyle = 1; //1=attack and so on
    AntiBan = true; //If true will move the mouse randomly while fighting
    YellowDot=true; //If true, when can't find monster will use yellow minimap dot to find npc
     
    function Fighting:Boolean;
    begin
    if(FindColorTolerance(x,y,65280,198,137,297,210,10)) then
    begin
    Result:=true;
    end
    if(not(FindColorTolerance(x,y,65280,198,137,297,210,10))) then
    begin
    Result:=false;
    end
    end;
     
    procedure ChatsOff;
    var x,y:integer;
    begin
    if(findcolortolerance(x,y,65280,20,475,196,650,10))or
    (findcolortolerance(x,y,65535,20,475,196,650,10))or
    (findcolortolerance(x,y,16776960,20,475,196,650,10))then
    movemousesmoothex(x,y,10,10,10,5,0);
    repeat
    clickmouse(x,y,true);
    sleep(400);
    until(findcolortolerance(x,y,255,20,475,196,650,10))
    if(findcolortolerance(x,y,65280,157,477,213,496,10))or
    (findcolortolerance(x,y,65535,157,477,213,496,10))or
    (findcolortolerance(x,y,16776960,157,477,213,496,10))then
    movemousesmoothex(x,y,10,10,10,5,0);
    repeat
    clickmouse(x,y,true);
    sleep(400);
    until(findcolortolerance(x,y,255,169,483,198,500,10))
    if(findcolortolerance(x,y,65280,292,476,351,497,10))or
    (findcolortolerance(x,y,65535,292,476,351,497,10))or
    (findcolortolerance(x,y,16776960,292,476,351,497,10))then
    movemousesmoothex(x,y,10,10,10,5,0);
    repeat
    clickmouse(x,y,true);
    sleep(400);
    until(findcolortolerance(x,y,255,292,476,351,497,10))
    end;
     
    procedure SetRun;
    begin
    sleep(50);
    movemousesmoothex(712,484,10,10,10,5,0);
    sleep(50);
    clickmouse(712,484,true);
    sleep(50);
    movemousesmoothex(625,267,10,10,10,5,0);
    sleep(50);
    clickmouse(625,267,true);
    sleep(50);
    movemousesmoothex(649,185,10,10,10,5,0);
    sleep(50);
    clickmouse(649,185,true);
    end;
     
     
    procedure LoginIfNeeded;
    begin
    activateclient;
    begin
    if(getcolor(368,246)=65535) and (getcolor(323,293)=16777215) then
    begin
    movemousesmoothex(458,292,10,10,10,5,0)
    sleep(500);
    clickmouse(458, 292, true);
    sleep(500);
    movemousesmoothex(372,255,10,10,10,5,0)
    sleep(500);
    clickmouse(372, 255, true);
    sleep(500);
    sendkeys(username);
    sendkeys(chr(13));
    sendkeys(password);
    movemousesmoothex(301,323,10,10,10,5,0)
    sleep(500);
    clickmouse(301, 323, true);
    sleep(5000);
    movemousesmoothex(392,336,10,10,10,5,0)
    sleep(500);
    clickmouse(392,336,true);
    end;
    end;
    end;
     
    procedure AntiBBan;
    begin
    if(AntiBan=true)then
    begin
    if(fighting)then
    begin
    repeat
    sleep(3000+random(1000));
    movemousesmoothex(258+random(150),164+random(150),10,10,2,5,0);
    until(not(fighting))
    end
    end
    end;
     
    Procedure Flag;
    var flagimage:integer;
    begin
         flagimage := BitmapFromString(2, 2,'FF00005D3311C656045D3311');
         repeat
         sleep(220);
         until(not(findbitmapin(flagimage,x,y,570,5,725,162)))
    end;
     
    procedure WalkToDot;
    begin
    if(YellowDot=true)then
    begin
    if(findcolortolerance(x,y,52428,573,8,723,158,10))then
    sleep(50+random(20))
    movemousesmoothex(x,y,10,10,30,5,0);
    sleep(50+random(20))
    clickmouse(x,y,true);
    flag;
    end;
    end;
     
    Procedure SetFightStyle;
    begin
    movemousesmoothex(559,186,10,10,10,5,0)
    sleep(50);
    clickmouse(559,186,true);
    sleep(50);
    if (FightStyle=1) then
    begin
    movemousesmoothex(601,284,10,10,10,5,0)
    sleep(50);
    clickmouse(601,284,true)
    end
    if (FightStyle=2) then
    begin
    movemousesmoothex(599,326,10,10,10,5,0)
    sleep(50);
    clickmouse(598,326,true);
    end
    if (FightStyle=3) then
    begin
    movemousesmoothex(599,366,10,10,10,5,0)
    sleep(50);
    clickmouse(598,366,true);
    end
    if (FightStyle=4) then
    begin
    movemousesmoothex(599,405,10,10,10,5,0)
    sleep(50);
    clickmouse(600,405,true);
    end
    movemousesmoothex(650,187,10,10,10,5,0)
    sleep(50);
    clickmouse(650,187,true);
    end;
     
    procedure FightWait;
    begin
    if(Fighting)then
    AntiBBan;
    end;
     
    procedure fightwait2;
    var sleepcounts:integer;
    begin
    sleepcounts:=0;
    repeat
    sleepcounts:=sleepcounts+1;
    sleep(50);
    until(fighting)or(sleepcounts>300);
    end;
     
    procedure FightWait3;
    begin
    if(Fighting)then
    sleep(50);
    end;
     
    procedure FindMonster;
    begin
    if(findcolortolerance(x,y,monstercolor,0,0,516,338,MonColTol)) then
    begin
    movemousesmoothex(x,y,10,10,30,5,0)
    clickmouse(x,y,true);
    end
    else
    begin
    if(not(findcolortolerance(x,y,monstercolor,0,0,516,338,MonColTol))) then
    WalkToDot;
    if(findcolortolerance(x,y,monstercolor,0,0,516,338,MonColTol)) then
    movemousesmoothex(x,y,10,10,60,5,0)
    clickmouse(x,y,true);
    end;
    end;
     
     
    procedure killmonster;
    begin
    FindMonster;
    fightwait2;
    if(Fighting)then
    if(antiban=true)then
    repeat
    FightWait;
    until(not(fighting))
    if(antiban=false)then
    repeat
    FightWait3;
    until(not(fighting))
    end;
     
    begin
    activateclient;
    sleep(100);
    LoginIfNeeded;
    ChatsOff;
    SetRun;
    SetFightStyle;
    repeat
    killmonster;
    LoginIfNeeded;
    until(false);
    end.
    Accounts banned: 1
    Good scripts used: 2
    useless scripts made: 4
    Semi-good scripts made: 3 Auto Login, Auto Meat Eater,Auto Fighter
    [MINING GOAL: 70 CURRENTLY: 67]

  2. #2
    Join Date
    Mar 2006
    Posts
    549
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    good script! mabye u can convert to SRL

  3. #3
    Join Date
    Feb 2006
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah I'll give it a go, whats movemouse, IsTextUp and clickmouse for SRL?
    Accounts banned: 1
    Good scripts used: 2
    useless scripts made: 4
    Semi-good scripts made: 3 Auto Login, Auto Meat Eater,Auto Fighter
    [MINING GOAL: 70 CURRENTLY: 67]

  4. #4
    Join Date
    May 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ty, isnt the best autofighter but it works keep it up

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need someone to help me set up an autofighter script
    By Belial in forum RS3 Outdated / Broken Scripts
    Replies: 4
    Last Post: 02-25-2007, 11:41 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
  •