SRL Archive - OSR Help

Walking to symbol isnt doing the trick.


ralfpker

2013-03-31 02:38:47

I am attempting to have my script walk into the lumby bank from the stairs using FindSymbol, but sometimes the symbol doesnt happen to be over the bank making me miss click. What recommendations do you have for creating a better function which can more accurately locate the bank.

OriginalGM

2013-03-31 07:54:52

Ah. indeed this is what I was having issue with too! im hoping someone will come to our aid for this issue, i know some pascal but not much since im still fairly new to this whole simba ish.
anyways, as far as i know, the reason why is because Jagex makes the RS world Constantly shift, as to why ghostmouse and FindSymbol, DTMs are harder to script and get down pat so you can repeat over and over and not misclick or just not have it find the symbol, location whatsoever!

Another method to which i have tried using, but to no avail is SPS Pathmaker
http://villavu.com/forum/showthread.php?t=68802
http://villavu.com/forum/showthread.php?t=89180
there are a couple links, just search for SPS pathmaker if none of those suit you.

Total

2013-03-31 08:12:26

That path is relatively short so you could try using RadialWalk.

Links:
RadialWalkAid
RadialWalk Tutorial

ralfpker

2013-03-31 16:41:43

Thanks for the advice, i was thinking about using SPS as i would need to only walk to one point, but i couldn't quiet get it working after DLing/setting up SPS of course. I will attempt give radialwalk another try as well, i assume im probably not doing something wrong as i couldn't get that working either. Is there a special P07 RadialWalk that i will need to use? Or just the typical functions?

Hamish

2013-03-31 16:47:35

From: ralfpker
Thanks for the advice, i was thinking about using SPS as i would need to only walk to one point, but i couldn't quiet get it working after DLing/setting up SPS of course. I will attempt give radialwalk another try as well, i assume im probably not doing something wrong as i couldn't get that working either. Is there a special P07 RadialWalk that i will need to use? Or just the typical functions?


I was hoping for the same info. 07SPS just didn't work for me at all! Iv'e heard things about radial walk but iv'e yet to try it, I was directed to this radial walk guide however.

http://villavu.com/forum/showthread.php?t=24303

ralfpker

2013-03-31 19:32:47

Yeah, i've taken a look at a couple of them but to no avail. Could anyone explain to me if i need anything other than RadialWalk(FindRoadColor,90,180,72,99,99); <— just an example. Because this is all most of the tutorials i have see show, nothing covering any sort of functions that have to deal with RadialWalk.

Total

2013-03-31 19:38:10

It doesn't need to be the road color, it can be any color. Basically you just call RadialWalk when you want to walk, nothing more to it really. You don't need to use P07_RadialWalk(unless there is one, then you might as well), you can just use RadialWalkEx with P07_MMCX, P07_MMCY.

I'd also recommend switching to SRL-OSR instead of P07Include because it would be a lot easier and SRL-OSR supports many randoms.

Hamish

2013-03-31 21:15:42

From: Total
It doesn't need to be the road color, it can be any color. Basically you just call RadialWalk when you want to walk, nothing more to it really. You don't need to use P07_RadialWalk(unless there is one, then you might as well), you can just use RadialWalkEx with P07_MMCX, P07_MMCY.

I'd also recommend switching to SRL-OSR instead of P07Include because it would be a lot easier and SRL-OSR supports many randoms.


Does radial walk search solely in the minimap? Wouldn't searching for colours on the mini map have many matching/similar colours? Especially a road?

Total

2013-03-31 21:22:39

Yes it would but the way RadialWalk works it doesn't matter. You should just go try it out for yourself, you will see what I mean.

Hamish

2013-03-31 21:24:22

Right, cheers. I'll give it a go now. SPS just wasn't happening for me at all.

ralfpker

2013-03-31 22:34:14

So update on my scripting, I was able to get radialwalk to work and all. But because the map rotates randomly there is still an issue of it misclicking outside of the bank. Any idea on how to make it more accurate? here is my code at the moment
Procedure WalkToBank2;
begin
if (findcolortolerance(x, y, 5000276, 640, 20, 390, 80, 50)) then
begin
wait(100);
RadialWalkTolerance(5000276,5,20,45,5,MMCX,MMCY);
while (IsMoving) do
wait(100);
end;
end;

The Mayor

2013-04-01 02:23:03

If there are npc dots in the bank then you could make it walk to them. You can find the NPC minimap dots using

 GetMiniMapDots('npc'); 

serajin

2013-04-01 02:25:28

Why not give it a go to findColorTolerance(of the bank symbol, as it is unique), throw it into a TPA. Filter the TPA from a distance radiating from the center of the minimap. And then have the mouse click around that symbol. That is similar to how the find symbol works, only I have found it to be much more effective.

wthomas

2013-04-01 04:59:12

function seeMMSymbol(var x: integer; var y: integer; DTM, color, tolerance: integer; name: string): boolean;
var
angle: extended;
begin
SymbolAccuracy := 0.65;
if findsymbol(x, y, name) then
begin
//SMART_DrawBoxEx(false, false, inttobox(x - 5, y - 5, x + 5, y + 5), clGreen);
result := true;
exit;
end;
if findDTMRotatedSE(DTM, x, y, MMX1, MMY1, MMX2, MMY2, - pi() / 4, pi() / 4, pi() / 64, angle) then
begin
result := true;
// SMART_DrawBoxEx(false, false, inttobox(x - 5, y - 5, x + 5, y + 5), clGreen);
exit;
end
else
begin
if FindColorTolerance(x, y, color, MMX1, MMY1, MMX2, MMY2, tolerance) then
begin
result := true;
//SMART_DrawBoxEx(false, false, inttobox(x - 5, y - 5, x + 5, y + 5), clGreen);
end
else
begin
result := false;
end;
end;
end;

Also make a TPA of the bankers dots then walk to that, im guessing there's not going to be many other random npc's close enough together to interfere, look at my ess miner script for an example, the function is called FindBankTPA(x,y):boolean;