eh big
2013-02-24 21:33:56
So over the past couple days I have been trying to make the bot realize that I was indeed fighting something so here is my feeble attempts it seems to realize its fighting 80 percent of the time.
Program testP07;
{$I SRL/SRL.Simba}
{$I P07Include.Simba}
//LOGIN INFO STUFF
Procedure P07_DeclarePlayer;
Begin
P07_PlayerName:='username';
P07_PlayerPass:='password';
End;
const
player_mom= 6056309;//monster color
Function IsFighting: Boolean;
var
PBox: TBox;
Begin
PBox := IntToBox(238, 169, 279, 217);
Result := (AveragePixelShift(PBox, 250, 350) > 15);
End;
function fight:boolean;
var
x, y:integer;
tmpCTS,i, L,Counter,Fighter: Integer;
begin
if IsFighting then
begin
repeat
until (not IsFighting)
end;
if FindColorTolerance(X, Y, player_mom, 6, 0, 514, 484, 5) then
mmouse(x, y,1,1);
wait(randomrange(200,400))
if (P07_IsUpTextMultiCustom(['Giant', 'Attack'])) then
clickmouse (x, y, mouse_left);
Wait(RandomRange(800, 1200));
While IsFighting do
Wait(RandomRange(400, 800));
if not IsFighting then
End;
begin
P07_DeclarePlayer;
SetupP07Include;
ActivateClient;
Wait(2000);
If (Not P07_LoggedIn) Then
P07_LogInPlayer;
repeat
fight;
until(false);
End.