Gnome Agility
Version 1.2
So, I don't know why but this section lack working scripts and It is one of the most important skill to level when you are a member. Especially when you run a Ultimate Ironman Account like I do. Today, This is Going To Change! I am releasing a personal script I Made and Rewritten So I could Release. This script should be way easier to setup if you compare it to the previous script I released
This script will do the whole course using my most powerful custom function :-)
Simba Code:{*******************************************************************************
* Function designed to find a specific color on the screen. Once the color is
* found, it will either save the position of the color in mouseX and mouseY, Move
* the mouse on the TPA or Click the TPA if Criterias are met
* ------------------------------------------------------------------------------
* Col,Tol,Hue,Sat -> Values used for detecting the color on the screen
* FilterMin, FilterMax -> Values used for removing TPAs we don't want
* LocTopLeft, LocBotRight -> Will be used to form the area where we will search
* the color
* SizeTPA -> Max size of the TPA
* SortLocation -> Point used to Sort TPA based by their proximity to this point
* textUpText -> Uptext that should appear when mouse is hover the TPA
* MoveMouse -> Indicate if we need to move the mouse on the TPA or not
* DoWeClick -> Indicate if we need to click the TPA if all Criterias are met
* Result -> True if the Color was found!
********************************************************************************}
Function FindTPAsOnScreen(Col, Tol, FilterMin, FilterMax : Integer; Hue, Sat : Double;
LocTopLeft, LocBotRight, SizeTPA, SortLocation : TPoint; textUpText : TStringArray;
MoveMouse, DoWeClick : Boolean) : Boolean;
Var
tPointGang: TPointArray;
ATPA : T2DPointArray;
i : Integer;
FailAttempt : Integer = 0;
Begin
SetColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Hue, Sat);
//Try to find the color at the location
If FindColorsTolerance(tPointGang, Col, LocTopLeft.x, LocTopLeft.y,
LocBotRight.x, LocBotRight.y, Tol) Then
Begin
//Forming TPAs with the points we found
ATPA := TPAtoATPAEx(tPointGang, SizeTPA.x, SizeTPA.y);
//Sorting TPAs
SortATPAFromMidPoint(ATPA, SortLocation);
//Iterate TPAs
For i:= 0 to high(ATPA) do
Begin
//Filter bad TPAs
If (GetArrayLength(ATPA[i]) > FilterMin) And
(GetArrayLength(ATPA[i]) < FilterMax) Then
Begin
//Fail Safe
FailAttempt := FailAttempt + 1;
If (FailAttempt > 2) Then
Begin
Exit(False);
End;
//Debug -> Good for Debugging a Script :-)
If (Debug_State = 1) Then
Begin
debugTPA(ATPA[i],'');
End Else
Begin
If (Debug_State = 2) Then
Begin
debugBoxes([IntToBox(LocTopLeft.x, LocTopLeft.y,LocBotRight.x, LocBotRight.y)]);
End;
End;
//Determine if we need to Move the mouse or Simply find the color on the
// screen
If (MoveMouse) Then
Begin
mouseX := MiddleTPA(ATPA[i]).x;
mouseY := MiddleTPA(ATPA[i]).y;
//Move the mouse at the mentioned location
customMouse(Point(mouseX, mouseY));
//Look if UpText match
If (waitUpTextMulti(textUpText, 350 + random(100))) Then
Begin
//Next action is based on the fact if user want to Click it or Not
If (DoWeClick) Then
Begin
//Click
fastClick(MOUSE_LEFT);
Wait(Randomrange(30,120));
//Detect if we miss clicked
If (didYellowClick()) Then
Begin
wait(RandomRange(15,30));
FindTPAsOnScreen(Col,Tol,FilterMin,FilterMax,Hue,Sat,LocTopLeft,
LocBotRight,SizeTPA, Point(MSCX,MSCY), textUpText, MoveMouse,
DoWeClick);
End;
End;
Exit(True);
End Else
Begin
//If it is not the Walk Uptext, It may mean someone is standing on it.
If (Not waitUpTextMulti(['Walk'], 350 + random(100))) then
Begin
//Right Click
fastClick(MOUSE_RIGHT);
wait(RandomRange(200,300));
//Try to find the Option we are looking for
If (waitOptionMulti(textUpText, 350 + random(100))) Then
Begin
Exit(True);
End Else
waitOptionMulti(['Cancel','ancel'], 350 + random(100));
End;
End;
End Else
Begin
//If user just want to find the Color, we will save the Position where
//the color was found in case we need it later!
mouseX := MiddleTPA(ATPA[i]).x;
mouseY := MiddleTPA(ATPA[i]).y;
Exit(True);
End;
End;
End;
End;
End;
Requirements
- You must have AeroLib Revision 11
- You must start next to the first obstacle
- You must set the custom section
- You must set your Compass East Side
- Please, don't wear items that may match with the colors used in the Course
- ???
- You must Update findTalk() if you don't want Random(s) to Screw the Script
Features
- Antiban
- Random Detection
- Fail Safe
- Will Log Out if something bad happen
- 100% Color
- 6K+ Xp per Hour
- Highly Commented -> Really Good If you want to Learn Scripting by Copying Others Work
Updates
- 6/21/2015 -> Initial Release!
- 6/22/2015 -> Version 1.1
- Fixed Bug where the script was stuck in a infinite loop after solving a Random
- Fixed Bug where the script would logout after crossing the First Obstacle
- Fixed Bug where the script would logout because it couldn't find the second tree branch
- Optimised some part of the script
- Added more Antiban- 6/24/2015 -> Version 1.2
- Reworked Detections on some Obstacles
- Reworked Colors on some Obstacles
- Reworked Boxes on Some Obstacles
- The script will be a little bit faster
- This version should be way more stable than Version 1.1 which could run for 10h+ to a few minutes if you were unlucky
Bugs
Please report any bug in this Thread!
Before running the Script
Update findTalk()
- Load the Script and Click on the Search bar in Simba Under FunctionList
- type findTalk And Double Click on It
- Find the function declaration "function findTalk(): Boolean"
- Replace it with this Code
Simba Code:function findTalk(): Boolean;
var
Pnt : TPoint;
ax,ay,yCount,zCount,Count2,x1,y1,x2,y2,
X,Y,Count1,bmpScreen: Integer;
NPCName: String;
rTalkStrings: TStringArray;
begin
Result := False;
if not NicknameSet then Exit;
if rand_TxtCol.findIn(AREA_MS, Pnt) then
begin
SetArrayLength(gtalksBox, 0);
SetArrayLength(YelSkipBoxs, 0);
y1 := Pnt.y;
if ( ( Pnt.y + 5 ) > 334 ) then y2 := 334 else y2 := Pnt.y + 5;
x1 := Pnt.x; x2 := x1;
zCount := 0;
repeat
if rand_TxtCol.findIn(toBox(x2,y1+2,x2+3,y2+3), Pnt) then
zCount := 0
else
zCount := zCount + 1;
if ( zCount = 4 ) then Break;
x2 := x2 + 3;
until ( x2 + 3 > 515 );
if ( x2 + 3 <= 515 ) then x2 := x2 - 12;
if (x2 - x1 >= length(Me.Nick) * 4) then
begin
x1 := x1 - 8;
y1 := y1 - 8;
x2 := x2 + 8;
y2 := y2 + 8;
if ( x1 < 0 ) then x1 := 0;
if ( y1 < 0 ) then y1 := 0;
if ( x2 > 515 ) then x2 := 515;
if ( y2 > 334 ) then y2 := 334;
Count2 := Count2 + 1;
Count1 := Count1 + 1;
SetArrayLength(gtalksBox, Count2);
gtalksBox[Count2 - 1].x1 := x1;
gtalksBox[Count2 - 1].y1 := y1;
gtalksBox[Count2 - 1].x2 := x2;
gtalksBox[Count2 - 1].y2 := y2 + 6;
SetArrayLength(YelSkipBoxs, Count1);
YelSkipBoxs[Count1 - 1].x1 := x1;
YelSkipBoxs[Count1 - 1].y1 := y1;
YelSkipBoxs[Count1 - 1].x2 := x2;
YelSkipBoxs[Count1 - 1].y2 := y2;
end else
begin
y1 := y1 - 2;
y2 := y2 + 8;
x1 := x1 - 5;
x2 := x2 + 5;
if ( x1 < 0 ) then x1 := 0;
if ( y1 < 0 ) then y1 := 0;
if ( x2 > 515 ) then x2 := 515;
if ( y2 > 334 ) then y2 := 334;
Count1 := Count1 + 1;
SetArrayLength(YelSkipBoxs, Count1);
YelSkipBoxs[Count1 - 1].x1 := x1;
YelSkipBoxs[Count1 - 1].y1 := y1;
YelSkipBoxs[Count1 - 1].x2 := x2;
YelSkipBoxs[Count1 - 1].y2 := y2;
end;
if (GetArrayLength(gtalksBox) <> 0) then
begin
for yCount := 0 to GetArrayLength(gtalksBox) - 1 do
begin
if cs_FindBitmapMaskTolerance(NickNameBMP, 0, 40, gtalksBox[yCount], ax, ay, cs_CTS) then
begin
warn('Found NickName', WT_RANDOM);
ax := (gtalksBox[yCount].x2 + gtalksBox[yCount].x1) shr 1;
ay := gtalksBox[yCount].y2 - 2;
if findBitmapMaskTolerance(EX_ScreenText, x, y, MSX1, MSY1, MSX2, MSY2, 0, 40) then
begin
wait(randomRange(2500,3500));
Exit(false);
end;
if DISABLE_RANDOMS then
begin
missMouse(point(ax,ay), 0, 0);
if waitUpTextMulti(['Talk','lk-to','ttack','ard','curity'], RandomRange(150,300)) then
begin
fastClick(MOUSE_RIGHT);
if waitOptionMulti(['Dismi','smis'], 300) then
inc(dismissedRandoms);
FFlag(0);
Exit(true);
end;
end;
If DISABLE_RANDOMS Then
Begin
if not findDTM(DTM_RoyalFrog, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
missMouse(point(ax,ay), 0, 0);
if waitUpTextMulti(['Talk','lk-to','ttack','ard','curity'], RandomRange(150,300)) then
begin
NPCName := extractNPCNameUptext();
fastClick(MOUSE_RIGHT);
rTalkStrings := ['o Sec','o San','o Gen','o Mil','o Gil','o Nil','o Ric',
'o Dru','o Cap','o Mys','o Dr'];
if waitOptionMulti(rTalkStrings, RandomRange(150,300)) then
begin
warn('Found talking Random Event', WT_RANDOM);
FFlag(0);
waitFunc(@areTalking, 10, 3000);
if solveTalkingRandom(NPCName) then
Result := True;
Exit;
end;
end;
end else
begin
warn('Found Royal Frog Random Event', WT_RANDOM);
takeScreen('RoyalFrog', includePath+'AeroLib/screenshots/Randoms/');
if Frog_Solve then
Exit(true);
end;
End;
Exit(True);
end;
end;
end;
end;
end;
Complete this section
Simba Code:// Player info
P_NICKNAME = '';
P_LAMPSKILL = SKILL_SMITHING;
//Wait Time after Obstacle Done
FirstNumber := 500;
SecondNumber := 700;
//Minimap click Position -> Depend on how the minimap was loaded. You can adjust
//these values so you can get closer to the first Obstacle -> Default : 643,125
MinimapLocation := Point(650,125);
//0 = Normal, 1 = Show TPAs, 2 = Show Boxes
Debug_State := 0;
Adjust your screen to match like this
When you Climb the second net, on the other side, it should look like this
Progress Report
Version 1.1
***********Progress Report************
* ~By Sheepexert~
*Trip Done: 384 (73 Trip/H)
*Agility XP earned: 33024 (6278 XP/H)
*Random Solved: 1
*Total Time: 5 Hours, 14 Minutes and 32 Seconds
*************************************
***********Progress Report************
* ~By Sheepexert~
*Trip Done: 45 (62 Trip/H)
*Agility XP earned: 3870 (5292 XP/H)
*Random Solved: 0
*Total Time: 43 Minutes and 52 Seconds
**************************************
Version 1.2
I closed simba by accident which had my 11hours proggy :-(