Live Help
Membership
You are a guest!

Register Today!

Log In
Reset Password
Game Network
Community Forum

MMO GAME LIST
World of Warcraft
Age of Conan
Anarchy Online
Archlord
Cabal Online
City of Heroes
City of Villains
Dark Age of Camelot
Darkfall Online
Diablo 2
Dungeons and Dragons
Dofus
Eve Online
Everquest 2
Final Fantasy XI
Guild Wars
Hero Online
Knight Online
Lineage 2
Lord of the Rings Online
Maple Story
Ragnarok Online
Runescape 2
Second Life
SilkRoad Online
Star Wars Galaxies
Tibia
Warhammer Online

FPS GAME LIST
Call of Duty
Combat Arms
Counter Strike
Halo

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Fighting Bot - Unfinished
post Sep 21 2009, 06:36 PM
Post #1

n8t3d0gg



SCAR Coder
****

Group: Members
Posts: 82
Joined: 29-February 08
Member No.: 576,597






hey guys, im sick of scar scripting to be honest. I decided to post an advanced fighting bot here. Do with it what you can! It still needs alot of work.

CODE
program auto_fighter;

var
  x, y, monster_x, monster_y, player_x, player_y, r, i, count: integer;

const
  waypoint = 772351;

function player : boolean;
begin
  if(FindColor(player_x, player_y, 255, 50, 46, 972, 582))then result:= true
end;

function target_in_range : boolean;
begin
  if(player)then
  begin
    if(FindColorCircle(monster_x, monster_y, 4609124, x, y, r) or
       FindColorCircle(monster_x, monster_y, 12905468, x, y, r))then
        begin
          if(player_y < 580)then result:= true
        end;
  end;
end;

function monster : boolean;
begin
  if(FindColor(monster_x, monster_y, 4609124, 50, 46, 972, 582) or
     FindColor(monster_x, monster_y, 12905468, 50, 46, 972, 582))then result:= true
end;

function in_combat : boolean;
begin
  if(FindColor(x, y, 255, 50, 46, 972, 582))then result:= true
end;

function movement_allowed : boolean;
begin
  if(FindColorTolerance(x, y, 26108, x-10, y-10, x+10, y+10, 15))then result:= true
end;

function target_north : boolean;
begin
  if(monster_x = player_x) and (monster_y < player_y)then result:= true;
end;

function target_northeast : boolean;
begin
  if(monster_x > player_x) and (monster_y < player_y)then result:= true;
end;

function target_east : boolean;
begin
  if(monster_x > player_x) and (monster_y = player_y)then result:= true;
end;

function target_southeast : boolean;
begin
  if(monster_x > player_x) and (monster_y > player_y)then result:= true;
end;

function target_south : boolean;
begin
  if(monster_x = player_x) and (monster_y > player_y)then result:= true;
end;

function target_southwest : boolean;
begin
  if(monster_x < player_x) and (monster_y > player_y)then result:= true;
end;

function target_west : boolean;
begin
  if(monster_x < player_x) and (monster_y = player_y)then result:= true;
end;

function target_northwest : boolean;
begin
  if(monster_x < player_x) and (monster_y < player_y)then result:= true;
end;

function top_wp : boolean;
begin
  if(FindColor(x, y, waypoint, 0, 0, 1024, 66))then result:= true
end;

function right_wp : boolean;
begin
  if(FindColor(x, y, waypoint, 940, 0, 1024, 768))then result:= true
end;

function left_wp : boolean;
begin
  if(FindColor(x, y, waypoint, 0, 0, 92, 768))then result:= true
end;

function bottom_wp : boolean;
begin
  if(FindColor(x, y, waypoint, 0, 564, 1024, 768 ))then result:= true
end;

function switching_map : boolean;
begin
  if(FindColor(x, y, 0, 419, 165, 420, 166)and
  FindColor(x, y, 0, 635, 470, 636, 471))then result:= true
end;

function error : boolean;
begin
  if(count > 3000)then result:= true
end;

procedure click;
begin
  count:= 0;
  MoveMouseSmooth(x, y);
  Wait(100+random(200));
  HoldMouse(x, y, true);
  Wait(20+random(50));
  ReleaseMouse(x, y, true);
  repeat
    wait(1);
    count:= count + 1;
  until(switching_map) or (error)
  repeat
    wait(1);
  until(not(switching_map))
end;

procedure move_top;
begin
  if(top_wp)then
  begin
    click;
    i:= 1;
    if(error)then
    begin
      i:= 0;
    end;
  end;
end;

procedure move_right;
begin
  if(right_wp)then
  begin
    click;
    i:= 2;
    if(error)then
    begin
      i:= 0;
    end;
  end;
end;

procedure move_left;
begin
  if(left_wp)then
  begin
    click;
    i:= 3;
    if(error)then
    begin
      i:= 0;
    end;
  end;
end;

procedure move_bottom;
begin
  if(bottom_wp)then
  begin
    click;
    i:= 4;
    if(error)then
    begin
      i:= 0;
    end;
  end;
end;

procedure search;
begin
  case(Random(4))of
    0: begin
         if(not(right_wp or left_wp or bottom_wp))then
         begin
           Move_top;
         end else
         begin
           if(i = 4)then
           begin
           end else
           begin
             Move_top;
           end;
         end;
       end;
    1: begin
         if(not(top_wp or left_wp or bottom_wp))then
         begin
           move_right;
         end else
         begin
           if(i = 3)then
           begin
           end else
           begin
             move_right;
           end;
         end;
       end;
    2: begin
         if(not(top_wp or right_wp or bottom_wp))then
         begin
           move_left;
         end else
         begin
           if(i = 2)then
           begin
           end else
           begin
             move_left;
           end;
         end;
       end;
    3: begin
         if(not(top_wp or right_wp or left_wp))then
         begin
           move_bottom;
         end else
         begin
           if(i = 1)then
           begin
           end else
           begin
             move_bottom;
           end;
         end;
       end;
  end;
end;

procedure move_northwest;
begin
  if(player)then
  begin
    MoveMouseSmooth(player_x - 90, player_y - 40);
    Wait(200);
    GetMousePos(x, y);
    if(movement_allowed)then
    begin
      ClickMouse(x, y, true);
    end else
    begin
      MoveMouseSmooth(player_x - 23, player_y - 40);
      Wait(200);
      GetMousePos(x, y);
      if(movement_allowed)then
      begin
        ClickMouse(x, y, true);
      end else
      begin
        MoveMouseSmooth(player_x - 90, player_y);
        Wait(200);
        GetMousePos(x, y);
        if(movement_allowed)then
        begin
          ClickMouse(x, y, true);
        end else
        begin
          MoveMouseSmooth(player_x + 43, player_y - 40);
          Wait(200);
          GetMousePos(x, y);
          if(movement_allowed)then
          begin
            ClickMouse(x, y, true);
          end else
          begin
            MoveMouseSmooth(player_x - 90, player_y + 31);
            Wait(200);
            GetMousePos(x, y);
            if(movement_allowed)then
            begin
              ClickMouse(x, y, true);
            end;
          end;
        end;
      end;
    end;
  end;
end;

procedure move_west;
begin
  if(player)then
  begin
    MoveMouseSmooth(player_x - 90, player_y);
    Wait(200);
    GetMousePos(x, y);
    if(movement_allowed)then
    begin
      ClickMouse(x, y, true);
    end else
    begin
      MoveMouseSmooth(player_x - 90, player_y + 31);
      Wait(200);
      GetMousePos(x, y);
      if(movement_allowed)then
      begin
        ClickMouse(x, y, true);
      end else
      begin
        MoveMouseSmooth(player_x - 90, player_y - 40);
        Wait(200);
        GetMousePos(x, y);
        if(movement_allowed)then
        begin
          ClickMouse(x, y, true);
        end else
        begin
          MoveMouseSmooth(player_x - 90, player_y + 65);
          Wait(200);
          GetMousePos(x, y);
          if(movement_allowed)then
          begin
            ClickMouse(x, y, true);
          end else
          begin
            move_northwest;
          end;
        end;
      end;
    end;
  end;
end;

procedure move_southwest;
begin
  if(player)then
  begin
    MoveMouseSmooth(player_x - 90, player_y + 65);
    Wait(200);
    GetMousePos(x, y);
    if(movement_allowed)then
    begin
      ClickMouse(x, y, true);
    end else
    begin
      MoveMouseSmooth(player_x - 90, player_y + 31);
      Wait(200);
      GetMousePos(x, y);
      if(movement_allowed)then
      begin
        ClickMouse(x, y, true);
      end else
      begin
        MoveMouseSmooth(player_x - 25, player_y + 65);
        Wait(200);
        GetMousePos(x, y);
        if(movement_allowed)then
        begin
          ClickMouse(x, y, true);
        end else
        begin
          MoveMouseSmooth(player_x - 90, player_y);
          Wait(200);
          GetMousePos(x, y);
          if(movement_allowed)then
          begin
            ClickMouse(x, y, true);
          end else
          begin
            MoveMouseSmooth(player_x + 39, player_y + 65);
            Wait(200);
            GetMousePos(x, y);
            if(movement_allowed)then
            begin
              ClickMouse(x, y, true);
            end else
            begin
              move_west;
            end;
          end;
        end;
      end;
    end;
  end;
end;

procedure move_south;
begin
  if(player)then
  begin
    MoveMouseSmooth(player_x - 25, player_y + 65);
    Wait(200);
    GetMousePos(x, y);
    if(movement_allowed)then
    begin
      ClickMouse(x, y, true);
    end else
    begin
      MoveMouseSmooth(player_x + 39, player_y + 65);
      Wait(200);
      GetMousePos(x, y);
      if(movement_allowed)then
      begin
        ClickMouse(x, y, true);
      end else
      begin
        MoveMouseSmooth(player_x - 90, player_y + 65);
        Wait(200);
        GetMousePos(x, y);
        if(movement_allowed)then
        begin
          ClickMouse(x, y, true);
        end else
        begin
          MoveMouseSmooth(player_x + 108, player_y + 65);
          Wait(200);
          GetMousePos(x, y);
          if(movement_allowed)then
          begin
            ClickMouse(x, y, true);
          end else
          begin
            move_southwest;
          end;
        end;
      end;
    end;
  end;
end;

procedure move_southeast;
begin
  if(player)then
  begin
    MoveMouseSmooth(player_x + 108, player_y + 65);
    Wait(200);
    GetMousePos(x, y);
    if(movement_allowed)then
    begin
      ClickMouse(x, y, true);
    end else
    begin
      MoveMouseSmooth(player_x + 39, player_y + 65);
      Wait(200);
      GetMousePos(x, y);
      if(movement_allowed)then
      begin
        ClickMouse(x, y, true);
      end else
      begin
        MoveMouseSmooth(player_x + 108, player_y + 31);
        Wait(200);
        GetMousePos(x, y);
        if(movement_allowed)then
        begin
          ClickMouse(x, y, true);
        end else
        begin
          MoveMouseSmooth(player_x + 108, player_y);
          Wait(200);
          GetMousePos(x, y);
          if(movement_allowed)then
          begin
            ClickMouse(x, y, true);
          end else
          begin
            MoveMouseSmooth(player_x - 25, player_y + 65);
            Wait(200);
            GetMousePos(x, y);
            if(movement_allowed)then
            begin
              ClickMouse(x, y, true);
            end else
            begin
              move_south;
            end;
          end;
        end;
      end;
    end;
  end;
end;

procedure move_east;
begin
  if(player)then
  begin
    MoveMouseSmooth(player_x + 108, player_y + 31);
    Wait(200);
    GetMousePos(x, y);
    if(movement_allowed)then
    begin
      ClickMouse(x, y, true);
    end else
    begin
      MoveMouseSmooth(player_x + 108, player_y);
      Wait(200);
      GetMousePos(x, y);
      if(movement_allowed)then
      begin
        ClickMouse(x, y, true);
      end else
      begin
        MoveMouseSmooth(player_x + 108, player_y - 40);
        Wait(200);
        GetMousePos(x, y);
        if(movement_allowed)then
        begin
          ClickMouse(x, y, true);
        end else
        begin
          MoveMouseSmooth(player_x + 108, player_y + 65);
          Wait(200);
          GetMousePos(x, y);
          if(movement_allowed)then
          begin
            ClickMouse(x, y, true);
          end else
          begin
            move_southeast;
          end;
        end;
      end;
    end;
  end;
end;

procedure move_northeast;
begin
  if(player)then
  begin
    MoveMouseSmooth(player_x + 108, player_y - 40);
    Wait(200);
    GetMousePos(x, y);
    if(movement_allowed)then
    begin
      ClickMouse(x, y, true);
    end else
    begin
      MoveMouseSmooth(player_x - 108, player_y);
      Wait(200);
      GetMousePos(x, y);
      if(movement_allowed)then
      begin
        ClickMouse(x, y, true);
      end else
      begin
        MoveMouseSmooth(player_x + 43, player_y - 40);
        Wait(200);
        GetMousePos(x, y);
        if(movement_allowed)then
        begin
          ClickMouse(x, y, true);
        end else
        begin
          MoveMouseSmooth(player_x - 23, player_y - 40);
          Wait(200);
          GetMousePos(x, y);
          if(movement_allowed)then
          begin
            ClickMouse(x, y, true);
          end else
          begin
            MoveMouseSmooth(player_x + 108, player_y + 31);
            Wait(200);
            GetMousePos(x, y);
            if(movement_allowed)then
            begin
              ClickMouse(x, y, true);
            end else
            begin
              move_east;
            end;
          end;
        end;
      end;
    end;
  end;
end;

procedure move_north;
begin
  if(player)then
  begin
    MoveMouseSmooth(player_x + 43, player_y - 40);
    Wait(200);
    GetMousePos(x, y);
    if(movement_allowed)then
    begin
      ClickMouse(x, y, true);
    end else
    begin
      MoveMouseSmooth(player_x - 23, player_y - 40);
      Wait(200);
      GetMousePos(x, y);
      if(movement_allowed)then
      begin
        ClickMouse(x, y, true);
      end else
      begin
        MoveMouseSmooth(player_x - 90, player_y - 40);
        Wait(200);
        GetMousePos(x, y);
        if(movement_allowed)then
        begin
          ClickMouse(x, y, true);
        end else
        begin
          MoveMouseSmooth(player_x + 108, player_y - 40);
          Wait(200);
          GetMousePos(x, y);
          if(movement_allowed)then
          begin
            ClickMouse(x, y, true);
          end else
          begin
            move_northeast;
          end;
        end;
      end;
    end;
  end;
end;

procedure position_player;
begin
  if(monster and player)then
  begin
    if(target_north)then
    begin
      move_north;
    end else
    begin
      if(target_northeast)then
      begin
        move_northeast;
      end else
      begin
        if(target_east)then
        begin
          move_east;
        end else
        begin
          if(target_southeast)then
          begin
            move_southeast;
          end else
          begin
            if(target_south)then
            begin
              move_south;
            end else
            begin
              if(target_southwest)then
              begin
                move_southwest;
              end else
              begin
                if(target_west)then
                begin
                  move_west;
                end else
                begin
                  if(target_northwest)then
                  begin
                    move_northwest;
                  end;
                end;
              end;
            end;
          end;
        end;
      end;
    end;
  end;
end;

function players_turn : boolean;
begin
  if(FindColor(x, y, 26367, 589, 614, 591, 616))then result:= true
end;

function fight_started : boolean;
begin
  if(FindCOlor(x, y, 11063255, 359, 102, 361, 104))then result:= true
end;

function out_of_range : boolean;
begin
  if(r > 225)then result:= true
end;

procedure close_summary;
begin
  Wait(1000);
  if(FindColorTolerance(x, y, 25087, 752, 439, 800, 522, 15))then
  begin
    MoveMouseSmooth(x, y+12);
    Wait(100+random(200));
    HoldMouse(x, y+12, true);
    Wait(20+random(50));
    ReleaseMouse(x, y+12, true);
  end;
end;

procedure fight_preperation;
begin
  if(in_combat)then
  MoveMouseSmooth(937, 521);
  Wait(200);
  ClickMouse(937, 521, true);
  MoveMouseSmooth(907, 555);
  Wait(200);
  ClickMouse(907, 555, true);
  repeat
    wait(1);
  until(players_turn)
  Wait(1000);
  MoveMouseSmooth(964, 556);
  Wait(200);
  ClickMouse(964, 556, true);
  Wait(200);
end;

procedure start_fight;
begin
  MoveMouseSmooth(monster_x, monster_y);
  Wait(200);
  ClickMouse(monster_x, monster_y, true);
  repeat
    Wait(1);
  until(in_combat) or (error)
end;

procedure pass_turn;
begin
  MoveMouseSmooth(661, 710);
  Wait(200);
  ClickMouse(661, 710, true);
  Wait(2000);
end;

procedure cast_sequence;
begin
  MoveMouseSmooth(712, 667);
  Wait(200);
  ClickMouse(712, 667, true);
  Wait(200);
  MoveMouseSmooth(monster_x, monster_y);
  Wait(200);
  ClickMouse(monster_x, monster_y, true);
  Wait(1000);
  pass_turn;
  Wait(1000);
end;


procedure fight;
begin
  repeat
    Wait(1);
  until(players_turn) or (not(in_combat)) or (error)
  r:= 0;
    repeat
      r:= r + 35;
    until(target_in_range) or (out_of_range) or (not(in_combat)) or (error)
  if(target_in_range)then
  begin
    cast_sequence;
  end else
  begin
    r:= 0;
    position_player;
    repeat
      r:= r + 15;
    until(target_in_range) or (out_of_range) or (not(in_combat)) or (error)
    if(target_in_range)then
    begin
      cast_sequence;
    end else
    begin
      pass_turn;
    end;
  end;
end;

begin
  repeat
    count:= 0;
    if(monster)then
    begin
      start_fight;
      fight_preperation;
      repeat
        fight;
        repeat
          wait(1);
        until(players_turn) or (not(in_combat)) or (error)
      until(not(in_combat)) or (error)
        close_summary;
    end else
    begin
      search;
      Wait(1000);
    end;
  until(false);
end.

Go to the top of the page
 
+Quote Post
post Sep 21 2009, 06:36 PM
Post #

Elite Membership


To get the most out of MmorpGuides.com, please view the following information.












Already a Member?

With an Elite Membership you can. . .

  • Reach the highest levels in no time
  • Have one of the most powerful characters in your game
  • Become a valuable member of your clan or guild
  • Become part of a caring and helpful community of gamers

Elite Members enjoy. . .

  • 1,660+ Cheats - tons of working, high quality cheats
  • 1,550+ Guides - We have one of the most comprehensive collections of guides on the net
  • 539+ Bots and macros - Level up quickly, even while you sleep!
  • A chance to win free prizes such as an amazing Playstation 3! And free gold and powerleveling!

No risk, only huge benefits!

  • Your investment can pay for itself in days!
  • Earn gold that you can trade for real money
  • Sell your high level items and characters for a profit!
  • Get tons of expensive guides and cheats in one spot for one small price

Money Back Guarantee!

Not 100% satisfied? We have a 24 hour, money-back guarantee! Contact us for a prompt and courteous refund!

Upgrade to an Elite Membership now!

Not A Member?

Join today and get access to all these great features!

  • Access to newly submitted cheats and guides
  • Download newly submitted bots and macros
  • Chat about your favorite game
  • Submit working content for a FREE Elite Membership!
  • And lots more!
Register Today!
Go to the top of the page
 
Quote Post
post Sep 21 2009, 11:49 PM
Post #2

lilwitte



SCAR Coder
Group Icon

Group: Elite Members
Posts: 318
Joined: 22-June 09
From: Deep in my Coding Cave. But don't feel bad! After all, it's on the darkside, and we have cookies!
Member No.: 934,937






Wow, you write great scripts, it just seems unorganized to me, hard to read through and figure out... either way. I think I could effectively duplicate a copy of your iron mining bot, but I gave up on my agi cra i made for the bot...
It wouldn't take to long to make a "universal" copy but it'd take a hella bit of time.
If you really read much, I'm not one for making the finished product but rather, making the components.


--------------------
SCAR Coder

DofusBaseV1
[||||||||||]

Want to make progress bars like me?
CODE
use this base one as an example!
[[color="#00FF00"]|[/color][color="#FF0000"]|||||||||[/color]]
Go to the top of the page
 
+Quote Post
post Sep 25 2009, 07:25 AM
Post #3

ltjustas1



Master
*******

Group: Members
Posts: 363
Joined: 19-May 09
From: In Your ######
Member No.: 910,369






nice. can i ask you something? how long did it took you to writte it?


--------------------
FEED HIM OR DIE >>>>


Suck My Habbas!


----------------------------------------------

<<=- click him and grow him up

-----------------------------------------------
Go to the top of the page
 
+Quote Post
post Sep 26 2009, 04:42 AM
Post #4

lilwitte



SCAR Coder
Group Icon

Group: Elite Members
Posts: 318
Joined: 22-June 09
From: Deep in my Coding Cave. But don't feel bad! After all, it's on the darkside, and we have cookies!
Member No.: 934,937






QUOTE(ltjustas1 @ Sep 25 2009, 02:25 AM) *
nice. can i ask you something? how long did it took you to writte it?

I'd range in on 2 weeks to a month since he didn't use functions/procedures to simplify some of the long texty areas.
i'd say that with 1 week added for planning.


--------------------
SCAR Coder

DofusBaseV1
[||||||||||]

Want to make progress bars like me?
CODE
use this base one as an example!
[[color="#00FF00"]|[/color][color="#FF0000"]|||||||||[/color]]
Go to the top of the page
 
+Quote Post
post Nov 19 2009, 07:56 PM
Post #5

godkain



Newbie
*

Group: Members
Posts: 2
Joined: 19-November 09
Member No.: 1,047,799






Hi Guys i new here, but i need to say:

======
n8t3d0gg
======

You are my HERO you be my GODNESS and i need to prayr more for you because you make the BEST DOFUS SCRIPT on my opinion.

Just i great work, TY man!!
Go to the top of the page
 
+Quote Post
post Nov 19 2009, 08:07 PM
Post #6

lilwitte



SCAR Coder
Group Icon

Group: Elite Members
Posts: 318
Joined: 22-June 09
From: Deep in my Coding Cave. But don't feel bad! After all, it's on the darkside, and we have cookies!
Member No.: 934,937






lol, many many scripts bigger, better, and more top notch than his are released and in the elite section. sure, he codes really good codes designed to work well, but only for him, all the codes after him are community-based and aimed at wide-range-use and can pull off alot of his features!


--------------------
SCAR Coder

DofusBaseV1
[||||||||||]

Want to make progress bars like me?
CODE
use this base one as an example!
[[color="#00FF00"]|[/color][color="#FF0000"]|||||||||[/color]]
Go to the top of the page
 
+Quote Post
post Nov 24 2009, 01:54 AM
Post #7

godkain



Newbie
*

Group: Members
Posts: 2
Joined: 19-November 09
Member No.: 1,047,799






QUOTE(lilwitte @ Nov 19 2009, 08:07 PM) *
lol, many many scripts bigger, better, and more top notch than his are released and in the elite section. sure, he codes really good codes designed to work well, but only for him, all the codes after him are community-based and aimed at wide-range-use and can pull off alot of his features!



Well well i just think about to Pay for a premium, but i have a question have any Dupe Itens on Members?

And one more question whit the dofus 2.0 what happining on for the Hacks, Scripts, etc?

Ty Guys
Go to the top of the page
 
+Quote Post
post Nov 24 2009, 03:50 AM
Post #8

lilwitte



SCAR Coder
Group Icon

Group: Elite Members
Posts: 318
Joined: 22-June 09
From: Deep in my Coding Cave. But don't feel bad! After all, it's on the darkside, and we have cookies!
Member No.: 934,937






In Dofus 2.0 we are updating most if not all of the scripts we have in elite to work with the new release... I plan on moving the next release of my DofusBase Include to a week after Dofus 2.0 comes out and then maybe... I will be releasing the Dofus 2.0 version in Elite


--------------------
SCAR Coder

DofusBaseV1
[||||||||||]

Want to make progress bars like me?
CODE
use this base one as an example!
[[color="#00FF00"]|[/color][color="#FF0000"]|||||||||[/color]]
Go to the top of the page
 
+Quote Post
post Jan 31 2010, 09:12 PM
Post #9

tizwaz.



Advanced
Group Icon

Group: Elite Members
Posts: 131
Joined: 5-December 09
From: usa
Member No.: 1,060,780






i have a question ,for what class is that bot??
cra??


--------------------
level 145 int iop

level 200 agi sac:)

level 200 eni :)
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

 


> Board Footer
Time is now: 18th March 2010 - 10:03 PM