ekips88
2013-03-04 17:47:54
Bit of a vague question, but I am curious to know what methods exist and which are the most successful in detecting (and clicking on) mobile NPCs.
I've tried several different strategies myself with little success.
Any help will be appreciated.
ekips88
2013-03-05 18:20:43
To clarify this is for EOC RS, NOT 2007 RS
Ashaman88
2013-03-05 18:26:07
I just loop through my object finding functions quickly, sorting the atpa nearest to my mouse position. What are you trying to click on? If I can get butterfly's, I'm sure we can find a way for whatever you are looking to do
ekips88
2013-03-05 19:00:42
Currently working on attacking Goblins, nothing too complicated.
I've been trying ACA and basic object finding with little success.
kyleinkman
2013-03-05 19:35:41
can you post your attack procedure?
ekips88
2013-03-05 19:46:36
*Auto-Color Function*
function GoblinColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.33, 0.09);
if not (FindColorsTolerance(arP, 4619386, MSX1, MSY1, MSX2, MSY2, 7)) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
Result := arC;
Writeln('AutoColor = ' + IntToStr(arC));
Break;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
*Attack Function*
If FindObjTPA (x, y, GoblinColor, 2, 1, 1, 1, 1, [('ttack'), ('alk')]) then
begin
MMouse (x, y, 3, 3);
Wait(60 + Random(30));
If IsUpText ('ttack Goblin') then ClickMouse2(Mouse_Left);
Wait(50 + Random(50));
Wait (250 + random (100));
Result := true;
Exit;
end else
Rest is just failsafes that don't hinder NPC detection
ekips88
2013-03-05 19:48:59
When it detects the Goblin I have no problem clicking and fight it.
I only have issues in detecting it (I will either find nothing when the color is present or the program will scan the uptext on completely wrong colors)
x[Warrior]x3500
2013-03-05 20:36:13
though this might not be the easy answer out, i would recommend u switch to manually creating ATPAs for this. you will have far more control over your code and probably will increase the accuracy.
ekips88
2013-03-05 21:16:34
From: x[Warrior]x3500
though this might not be the easy answer out, i would recommend u switch to manually creating ATPAs for this. you will have far more control over your code and probably will increase the accuracy.
Alright, don't have much experience with TPAs / ATPAs but it can't hurt to try something new. Thanks
x[Warrior]x3500
2013-03-05 21:19:28
From: ekips88
Alright, don't have much experience with TPAs / ATPAs but it can't hurt to try something new. Thanks
i've started making
this to help out someone im tutoring in scripting (and others). only a few days in, and needs work, but i believe i did an ok job on the TPA/ATPA sections. check it out if u want, i havnt gotten into too much detail on how to use them for specific object finding yet, just the basics.