smurg
2012-02-27 01:31:12
Test: This will be the original
Simba Code:
[LEFT]SetColorToleranceSpeed(2);
SetColorspeed2Modifiers(Monsters[0].Hue, Monsters[0].Sat);
FindColorsTolerance(TPA, Monsters[0].Color, S1X1, S1Y1, S1X2, S1Y2, Monsters[0].Tol);
FindColorsTolerance(TPA2, Monsters[0].Color, S2X1, S2Y1, S2X2, S2Y2, Monsters[0].Tol);
TPA := CombineTPA(TPA, TPA2);
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(1);
If Length(TPA) > 1 Then
Begin
ATPA := SplitTPA(TPA, 8);
SortATPASize(ATPA, True);
For I := 0 To High(ATPA) Do
Begin
If Not InsidePestControl Then Exit;
If (Length(ATPA) < 1) Or (I > 1) Then Break;
TP := MiddleTPA(ATPA);
If ((TP.X < 280) and (TP.X > 235) And (TP.Y < 190) and (TP.Y > 130)) Then Continue;
SetColorToleranceSpeed(2);
SetColorspeed2Modifiers(Monsters[1].Hue, Monsters[1].Sat);
BX1 := TP.X - 25;
AboveZero(BX1);
BY1 := TP.Y - 25
AboveZero(BY1);
BX2 := TP.X + 25;
AboveZero(BX2);
BY2 := TP.Y + 25;
AboveZero(BY2);
FindColorsTolerance(TPA2, Monsters[1].Color, BX1, BY1, BX2, BY2, Monsters[1].Tol);
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(1);
If Length(TPA2) > 7 Then
Begin
TP := MiddleTPA(TPA2);
MMose(TP.X, TP.Y, 2, 2);
If WaitUpTextMulti(['ttack ' + Copy(Monsters[0].Name, 0, 4), 'ck ' + Copy(Monsters[0].Name, 0, 2), 'tta'], 1000) Then
Begin
GetMousePos(X, Y);
Mose(X, Y, 0, 0, False);
If WaitOptionMulti(['ttack ' + Copy(Monsters[0].Name, 0, 4), 'ck ' + Copy(Monsters[0].Name, 0, 2)], 1000) Then
Result := True;
If Result Then Debug('Found Enemy! L1: ' + IntToStr(Length(TPA)) + '. L2: ' + IntToStr(Length(TPA2)) + '. ' + Monster + '.' + MainColor + '.' + SecondaryColor);
Flag;
End;
End;
End;
End;
[/LEFT]
Test: This will be the F up Post
Simba Code:
[LEFT]SetColorToleranceSpeed(2);
SetColorspeed2Modifiers(Monsters[0].Hue, Monsters[0].Sat);
FindColorsTolerance(TPA, Monsters[0].Color, S1X1, S1Y1, S1X2, S1Y2, Monsters[0].Tol);
FindColorsTolerance(TPA2, Monsters[0].Color, S2X1, S2Y1, S2X2, S2Y2, Monsters[0].Tol);
TPA := CombineTPA(TPA, TPA2);
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(1);
If Length(TPA) > 1 Then
Begin
ATPA := SplitTPA(TPA, 8);
SortATPASize(ATPA, True);
For I := 0 To High(ATPA) Do
Begin
If Not InsidePestControl Then Exit;
If (Length(ATPA) < 1) Or (I > 1) Then Break;
TP := MiddleTPA(ATPA);
If ((TP.X < 280) and (TP.X > 235) And (TP.Y < 190) and (TP.Y > 130)) Then Continue;
SetColorToleranceSpeed(2);
SetColorspeed2Modifiers(Monsters[1].Hue, Monsters[1].Sat);
BX1 := TP.X - 25;
AboveZero(BX1);
BY1 := TP.Y - 25
AboveZero(BY1);
BX2 := TP.X + 25;
AboveZero(BX2);
BY2 := TP.Y + 25;
AboveZero(BY2);
FindColorsTolerance(TPA2, Monsters[1].Color, BX1, BY1, BX2, BY2, Monsters[1].Tol);
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(1);
If Length(TPA2) > 7 Then
Begin
TP := MiddleTPA(TPA2);
MMose(TP.X, TP.Y, 2, 2);
If WaitUpTextMulti(['ttack ' + Copy(Monsters[0].Name, 0, 4), 'ck ' + Copy(Monsters[0].Name, 0, 2), 'tta'], 1000) Then
Begin
GetMousePos(X, Y);
Mose(X, Y, 0, 0, False);
If WaitOptionMulti(['ttack ' + Copy(Monsters[0].Name, 0, 4), 'ck ' + Copy(Monsters[0].Name, 0, 2)], 1000) Then
Result := True;
If Result Then Debug('Found Enemy! L1: ' + IntToStr(Length(TPA)) + '. L2: ' + IntToStr(Length(TPA2)) + '. ' + Monster + '.' + MainColor + '.' + SecondaryColor);
Flag;
End;
End;
End;
End;
[/LEFT]
Simba Code:
[LEFT]SetColorToleranceSpeed(2);
SetColorspeed2Modifiers(Monsters[0].Hue, Monsters[0].Sat);
FindColorsTolerance(TPA, Monsters[0].Color, S1X1, S1Y1, S1X2, S1Y2, Monsters[0].Tol);
FindColorsTolerance(TPA2, Monsters[0].Color, S2X1, S2Y1, S2X2, S2Y2, Monsters[0].Tol);
TPA := CombineTPA(TPA, TPA2);
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(1);
If Length(TPA) > 1 Then
Begin
ATPA := SplitTPA(TPA, 8);
SortATPASize(ATPA, True);
For I := 0 To High(ATPA) Do
Begin
If Not InsidePestControl Then Exit;
If (Length(ATPA) < 1) Or (I > 1) Then Break;
TP := MiddleTPA(ATPA);
If ((TP.X < 280) and (TP.X > 235) And (TP.Y < 190) and (TP.Y > 130)) Then Continue;
SetColorToleranceSpeed(2);
SetColorspeed2Modifiers(Monsters[1].Hue, Monsters[1].Sat);
BX1 := TP.X - 25;
AboveZero(BX1);
BY1 := TP.Y - 25
AboveZero(BY1);
BX2 := TP.X + 25;
AboveZero(BX2);
BY2 := TP.Y + 25;
AboveZero(BY2);
FindColorsTolerance(TPA2, Monsters[1].Color, BX1, BY1, BX2, BY2, Monsters[1].Tol);
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(1);
If Length(TPA2) > 7 Then
Begin
TP := MiddleTPA(TPA2);
MMose(TP.X, TP.Y, 2, 2);
If WaitUpTextMulti(['ttack ' + Copy(Monsters[0].Name, 0, 4), 'ck ' + Copy(Monsters[0].Name, 0, 2), 'tta'], 1000) Then
Begin
GetMousePos(X, Y);
Mose(X, Y, 0, 0, False);
If WaitOptionMulti(['ttack ' + Copy(Monsters[0].Name, 0, 4), 'ck ' + Copy(Monsters[0].Name, 0, 2)], 1000) Then
Result := True;
If Result Then Debug('Found Enemy! L1: ' + IntToStr(Length(TPA)) + '. L2: ' + IntToStr(Length(TPA2)) + '. ' + Monster + '.' + MainColor + '.' + SecondaryColor);
Flag;
End;
End;
End;
End;
[/LEFT]
Test: This will be the F up Post
Simba Code:
[LEFT]SetColorToleranceSpeed(2);
SetColorspeed2Modifiers(Monsters[0].Hue, Monsters[0].Sat);
FindColorsTolerance(TPA, Monsters[0].Color, S1X1, S1Y1, S1X2, S1Y2, Monsters[0].Tol);
FindColorsTolerance(TPA2, Monsters[0].Color, S2X1, S2Y1, S2X2, S2Y2, Monsters[0].Tol);
TPA := CombineTPA(TPA, TPA2);
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(1);
If Length(TPA) > 1 Then
Begin
ATPA := SplitTPA(TPA, 8);
SortATPASize(ATPA, True);
For I := 0 To High(ATPA) Do
Begin
If Not InsidePestControl Then Exit;
If (Length(ATPA) < 1) Or (I > 1) Then Break;
TP := MiddleTPA(ATPA);
If ((TP.X < 280) and (TP.X > 235) And (TP.Y < 190) and (TP.Y > 130)) Then Continue;
SetColorToleranceSpeed(2);
SetColorspeed2Modifiers(Monsters[1].Hue, Monsters[1].Sat);
BX1 := TP.X - 25;
AboveZero(BX1);
BY1 := TP.Y - 25
AboveZero(BY1);
BX2 := TP.X + 25;
AboveZero(BX2);
BY2 := TP.Y + 25;
AboveZero(BY2);
FindColorsTolerance(TPA2, Monsters[1].Color, BX1, BY1, BX2, BY2, Monsters[1].Tol);
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(1);
If Length(TPA2) > 7 Then
Begin
TP := MiddleTPA(TPA2);
MMose(TP.X, TP.Y, 2, 2);
If WaitUpTextMulti(['ttack ' + Copy(Monsters[0].Name, 0, 4), 'ck ' + Copy(Monsters[0].Name, 0, 2), 'tta'], 1000) Then
Begin
GetMousePos(X, Y);
Mose(X, Y, 0, 0, False);
If WaitOptionMulti(['ttack ' + Copy(Monsters[0].Name, 0, 4), 'ck ' + Copy(Monsters[0].Name, 0, 2)], 1000) Then
Result := True;
If Result Then Debug('Found Enemy! L1: ' + IntToStr(Length(TPA)) + '. L2: ' + IntToStr(Length(TPA2)) + '. ' + Monster + '.' + MainColor + '.' + SecondaryColor);
Flag;
End;
End;
End;
End;
[/LEFT]