View Full Version : Lunar Isle Detection
Deadly Serious
01-07-2012, 06:25 AM
I've been trying to fix my lunar isle detection problem for hours but whatever procedure I use, it never seems to work.
I'm trying to get from lunar isle home tele to the bank.
http://i40.tinypic.com/357ezw1.png
I've used Euphs system by using the near by ladders to guide the bot but the symbols occasionally cover up the ladders. Making my bot not being able to detect the walk path.
Then I used this function: if (Walking(2216175, 23, Point(653, 54))) then
But that failed to work because the bank symbol (Which I use to walk to the bank) sometimes gets covered up by the bank npc . Even when the bank npcs aren't covering up the symbol, it sometimes doesn't work.
All my other walk paths are fine but I have no idea how to fix this one.
lilcmp1
01-07-2012, 06:48 AM
I've seen SPS work in the area
Deadly Serious
01-07-2012, 06:53 AM
I've seen SPS work in the area
Care to elaborate on that or post a guide, please? I can't find any using villavus' advanced search engine.
Brandon
01-07-2012, 07:14 AM
Function FindSymbolX(Which: String; var X, Y, Dist:Integer): Boolean;
var
B: TBox;
TPA, SymbolTPA: TPointArray;
CTS, I: Integer;
ATPA: T2DPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsTolerance(TPA, 12632256, MMX1, MMY1, MMX2, MMY2, 10);
ColorToleranceSpeed(CTS);
if Length(TPA) < 1 then
Exit;
ATPA := TPAtoATPA(TPA, 14); //Size of the grey circle of the symbol..
B:= GetATPABounds(ATPA);
Case LowerCase(Which) of
'bank':
FindColorsTolerance(SymbolTPA, 2216175, B.X1, B.Y1, B.X2, B.Y2, 10);
'cw','castlewars','castle wars':
FindColorsTolerance(SymbolTPA, 2369228, B.X1, B.Y1, B.X2, B.Y2, 10);
'summoning','obby','obelisk':
FindColorsTolerance(SymbolTPA, 1988939, B.X1, B.Y1, B.X2, B.Y2, 10);
end;
SortTPAFrom(SymbolTPA, Point(MMCX, MMCY));
if (length(SymbolTPA) > 0) then
begin
MiddleTPAEx(SymbolTPA, X, Y);
Dist := Distance(MMCX, MMCY, X, Y);
Result:= True;
Exit;
end;
end;
I'd prefer if you wrote your own banking seeing as I just did the Symbol finding as the FindSymbol in SRL did not work for that bank :S No clue why.. no matter how low I put the accuracy.. Oh well.
Anyway happy trails.
Deadly Serious
01-07-2012, 07:42 AM
program new;
{$I SRL/SRL.Simba}
Function FindSymbolX(Which: String; var X, Y, Dist:Integer): Boolean;
var
B: TBox;
TPA, SymbolTPA: TPointArray;
I,CTS, Index: Integer;
ATPA: T2DPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsTolerance(TPA, 12632256, MMX1, MMY1, MMX2, MMY2, 10);
ColorToleranceSpeed(CTS);
if Length(TPA) < 1 then
Exit;
ATPA := TPAtoATPAEx(TPA, 8, 8); //Size of the grey circle of the symbol..
B:= GetATPABounds(ATPA);
Case LowerCase(Which) of
'bank':
begin
FindColorsTolerance(SymbolTPA, 2216175, B.X1-8, B.Y1-8, B.X2+8, B.Y2+8, 10);
TPAInATPA(SymbolTPA, ATPA, Index); //Needed to find the gold bank symbol color in our ATPA..
end;
'cw','castlewars','castle wars':
begin
FindColorsTolerance(SymbolTPA, 2369228, B.X1-8, B.Y1-8, B.X2+8, B.Y2+8, 10);
TPAInATPA(SymbolTPA, ATPA, Index);
end;
'summoning','obby','obelisk':
begin
FindColorsTolerance(SymbolTPA, 1988939, B.X1-8, B.Y1-8, B.X2+8, B.Y2+8, 10);
TPAInATPA(SymbolTPA, ATPA, Index);
end;
end;
Result := (Length(ATPA[i]) > 0);
if Result then
begin
MiddleTPAEx(ATPA[i], X, Y);
Dist := Distance(MMCX, MMCY, X, Y);
Exit;
end;
end;
Function ExampleLunar: Boolean;
var
X, Y, Dist: Integer;
begin
MouseSpeed:= 500;
if FindSymbolX('Bank', X, Y, Dist) then
if Dist > 25 then
begin
MMouse(X, Y, 0, 0);
ClickMouse2(1); //Left clicks..
end;
while isMoving do
wait(1);
if FindSymbolX('Bank', X, Y, Dist) then
if Dist < 15 then
writeln('We are at the bank');
end;
//Some bleh.. usage... From my edited version of flight's nature script..
var
X, Y, Dist, Count, Home: Integer;
if (FindSymbolX('Bank', X, Y, Dist) = False) then
begin
if(GameTab(Tab_Magic)) then
begin
Home:= DTMFromString('mbQAAAHicY2VgYLBmYmBwBGJ7IDYGYnMgfg oUvw/Eb4H4JRDfBeJ9Rz4xtM25gYJZgeLomBELBgMAGDAQJg==');
if(FindDTM(Home, X, Y, MIX1, MIY1, MIX2, MIY2)) then
begin
MMouse(X, Y, 5, 5);
if(WaitUptextMulti(['Home', 'Teleport'], 2000)) then
ClickMouse2(True);
end;
While(FindSymbolX('Bank', X, Y, Dist) = False) do
begin
wait(1);
Count:= Count + 1;
if Count > 1000 then
break;
end;
end;
end;
if FindSymbol('Bank', X, Y, Dist) then
begin
MMouse(X, Y, 2, 2);
ClickMouse2(True);
Wait(RandomRange(350, 575));
FFlag(0);
While IsMoving do
wait(1);
FindSymbol('Bank', X, Y, Dist);
if(Dist < 15) then
begin
if(OpenBankLunar = False) then
OpenBankNPCEx;
wait(1000);
if (Not Bankscreen) then
//........................
//.......................
FreeDTM(Home);
I'd prefer if you wrote your own banking seeing as I just did the Symbol finding as the FindSymbol in SRL did not work for that bank :S No clue why.. no matter how low I put the accuracy.. Oh well.
Anyway happy trails.
Thanks for the help, I really appreciate it. Your code clicks on the water Droplet symbol next to the bank for me. I'll try and alter it and get it to work.
Edit: I actually have no idea what's wrong with it. The color and color tolerance are fine :S
Try SPS thats what I used on My version works Okay to the Bank just a bit iffy on walking to the altar.
Mat
Failure
01-07-2012, 09:51 AM
You could make use of the yellow dot of the bankers? They're static in the 90 degrees?
Care to elaborate on that or post a guide, please? I can't find any using villavus' advanced search engine.
http://villavu.com/forum/forumdisplay.php?f=457
Try SPS.
I use SPS walking in my AstralRunner from teleport to bank and it works perfectly.
Deadly Serious
01-08-2012, 12:31 AM
Can anyone show me what sps walking looks like in the context of a script. I'm having trouble even after reading the small tutorial :S
euphemism
01-08-2012, 12:48 AM
Is it just the one click? The ladder in the building to the left of the player, and the one in the tiny little building NW of the player look like they would work.
Deadly Serious
01-08-2012, 01:50 AM
Is it just the one click? The ladder in the building to the left of the player, and the one in the tiny little building NW of the player look like they would work.
Hm, that's not a bad idea but the only problem I see is when all the ladders are uncovered by the icons there are many instances of the 2 ladders, so, it might choose another walk path. I'll test it out now, since I'm having trouble with my SPS walking.
Edit: It didn't work very well :/
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.