SRL Archive - General Botting Help

A walking question...


tehYosh

2014-10-30 12:44:24

I'm attempting to make a private cosmic runecrafter, due to me spending lots of points from GOP on cosmic teletabs, and I have the following.

1. Withdrawing the teletab and the essence.
2. Using the teletab to end up by the alter.
3. Entering the ruins.
4. Walking from the entrance to the center. ****
5. Using the alter to craft runes.
6. Using teleport back to bank.

Step 4 is the only step that I am having major problems with…

Currently I am trying to find a colour on the minimap for the client to realise that is where it needs to walk, but the problem is with the cosmic alter you can end up in four different spots when you enter the alter. I have tried using ACA to find a colour that will work from all 4 entrances but unfortunately I couldn't find a way of getting it to work.

I am able to currently get it to work on the off chance, but after around 2-3 trips (possibly due to a certain entrance, not 100% sure) it will eventually fail to find the colour on the minimap to walk too, so I was wandering what would be the best method I could use to make this work (I did touch up on using SPS but I'm not sure how I could get that to work when there are 4 total paths that might need to be walked), thank you all for taking your time in reading this! :)

tehYosh

2014-11-04 10:26:29

Bump for injustice.

I have attempted to use SPS using the blindwalk function but currently whenever I use sps.getPlayerPos all I get is failure due to the following:
-- sps.init()
---- Path exists (C:\Simba\Includes\SPS\img\runescape_other\COSMIC_MAP.png)
---- Setup area "COSMIC_MAP" in 31ms
-- sps.init()
-- WARNING: sps.getPlayerPos(): Didn't find enough matches accurately calc your postion
-- sps.getPlayerPos(): result = {X = -1, Y = -1}, took 140 ms

^ COSMIC_MAP.png, I have attempted to use a smaller version (This is the largest it can be, at least I think) and I have also previously taking the dots out to no effect.

The only other option I thought I could do was maybe have a check to see which portal I had entered from and having seperate sps paths for each one (North, East, West and South) but I wouldn't know how to get Simba to realise which one I'm at. Any help would be appreciated! :)

KeepBotting

2014-11-04 10:38:06

From the debug in your second post I can only assume that you've configured your accuracy and tolerance incorrectly for that map

Read up on .setup()'s overloads and use one which will allow you to set those params

Lipcot

2014-11-04 10:52:53

lolololol a walking question

:spot::spot::spot::spot::spot::spot::spot::spot::spot::spot::spot::spot::spot:

SPS.setup('CABBAGE_MAP', RUNESCAPE_OTHER, 4, TOL, MINMATCHPERCENT);

you should try playing with those variables (tol and min match percent) and see if you can get it working.. i usually dont even touch accuracy, but if you want you can change it up to 5 maybe, not more.

Tol example: 500.00 , Minmatchpercent example: 0.40

Camel

2014-11-04 11:35:29

I would not use SPS for something like this. You could do this,

SomeTPA := minimap.getDots(MM_DOT_NPC,minimap.getBounds());
Mouse(middleTPA(someTPA));

From the image it looks like there is always that wizard npc there. This will find his dot and click on it, thus moving you to the altar. You might want to randomize that mouse though. But this is a workable idea.

You could also just search the minimap for that gray color of "island" the altar is on. It would find the altar island and all the smaller surrounding ones. You could break the findings into an ATPA and sort it by size. Like so,

findColorsSpiralTolerance(x, y, TPA, GRAY_COLOUR, minimap.getBounds(), GRAY_TOL, colorSetting(2, GRAY_HUE, GRAY_SAT));
if (Length(TPA) < 1) then
begin
writeLn('Gray colour not found');
Exit;
end;
ATPA := TPA.toATPA(45, 45); // you would have to play with this line a bit
ATPA.sortBysize(true);

Mouse(middleTPA(ATPA[0]));

You could probably get away with using a DTM of the altar. Which would be by far the easiest method. Like so,


These are not ready to go solutions but ideas. I would use one of these three methods to do this.

Ashaman88

2014-11-04 12:12:49

@tehYosh; If you are using DX mode - it won't work b/c the black MM is color 0 and sps does not like that. Try creating the map (in OGL mode) and running the map in OGL mode to see the difference. There should probably be a work around for this added.

tehYosh

2014-11-04 12:13:48

Thank you all for your responses, especially that walking question mark from @undorak7, that did make me chuckle!

As you have guessed, I haven't touched the tolerance or accuracy settings, so I will have a futher look into them shortly.

I would love to use the DTM method or the npc dot method, but the picture here shows me why I can't.

^ As you can see on the map, at this particular entrance from the alter I can't see the npc dot or the DTM, though I did look into those. I have also tried using ACA to find a colour that would match from each entrance, but for some reason I couldn't find a colour that could be found from all entrance (The problem entrance for this was the west one, as my colour match was about a third of the box on the left hand side.

I shall obviously comment if changing the tolerance settings gives me any luck, thanks again!

Home

2014-11-04 14:02:13

From: tehYosh
Thank you all for your responses, especially that walking question mark from @undorak7, that did make me chuckle!

As you have guessed, I haven't touched the tolerance or accuracy settings, so I will have a futher look into them shortly.

I would love to use the DTM method or the npc dot method, but the picture here shows me why I can't.

^ As you can see on the map, at this particular entrance from the alter I can't see the npc dot or the DTM, though I did look into those. I have also tried using ACA to find a colour that would match from each entrance, but for some reason I couldn't find a colour that could be found from all entrance (The problem entrance for this was the west one, as my colour match was about a third of the box on the left hand side.

I shall obviously comment if changing the tolerance settings gives me any luck, thanks again!



Hey there, may I use your account and try one thing (It has been a while since I scripted, so I would like to try. )

~Home

Turpinator

2014-11-04 14:10:27

soo this is the minimap, correct?

Id suggest just finding the color of the platform on the minimap, split it into 2 tpas, then click on the larger one. its as simple as that. dont need to use a dtm, or a… whatever else. should always work too.

tehYosh

2014-11-04 14:21:06

From: Home
Hey there, may I use your account and try one thing (It has been a while since I scripted, so I would like to try. )

~Home

Replied to you, hoping to see what method you come across with, I'm glad you're willing to give it a go!

From: Turpinator
soo this is the minimap, correct?

Id suggest just finding the color of the platform on the minimap, split it into 2 tpas, then click on the larger one. its as simple as that. dont need to use a dtm, or a… whatever else. should always work too.

I shall also have a look into that for future reference, but at each entrance the colour is different in slight, I couldn't find a colour that I would be able to use regardless of which entrance it ended up on, so wouldn't I end up with the same issue as before?

E:
From: Ashaman88
@tehYosh; If you are using DX mode - it won't work b/c the black MM is color 0 and sps does not like that. Try creating the map (in OGL mode) and running the map in OGL mode to see the difference. There should probably be a work around for this added.

I did try running it in openGL after searching for people having similar problems with Direct X, didn't realise this was due to the amount of black though, when I ran it in openGL I did get points come up but it still wouldn't walk to where I wanted it too, perhaps that was because I didn't screenshot the map in openGL. Thanks for shedding some light on that though, thanks @Ashaman88

Home

2014-11-04 14:34:27

function WalkTo() :Boolean;
var
WalkPoint :TPoint;
TPA, TPA2 :TPointArray;
begin
Result := False;
FindColors(TPA, minimap.getBlackBackground, miniMap.getBounds);
If Length(TPA) = 0 then Exit;
TPA2 := TPAFromBox(miniMap.getBounds).clearTPAFrom(TPA);
miniMap.filterPoints(TPA2);
TPA2.sortFromPoint(minimap.getCenterPoint);
TPA2.Invert;
WalkPoint := TPA2[0];
smartImage.drawCross(WalkPoint, 5, clRed);
mouse(WalkPoint, mouse_Left);
minimap.waitPlayerMoving;
end;

What it does:

Get TPA from black color of the minimap.
Get TPA from the bitmap.
Filter useless points out of the bitmap.
Filter Black color so all what is left are those floor colors.
Sort TPA from player location and invert it.
Walk to Location.

That function is just to give you an idea, I suggest you to edit it and add failsafes.

~Home

P.S Thanks for lending an account.

P.P.S How do I logout from RS :P?

tehYosh

2014-11-04 14:38:56

From: Home
function WalkTo() :Boolean;
var
WalkPoint :TPoint;
TPA, TPA2 :TPointArray;
begin
Result := False;
FindColors(TPA, minimap.getBlackBackground, miniMap.getBounds);
If Length(TPA) = 0 then Exit;
TPA2 := TPAFromBox(miniMap.getBounds).clearTPAFrom(TPA);
miniMap.filterPoints(TPA2);
TPA2.sortFromPoint(minimap.getCenterPoint);
TPA2.Invert;
WalkPoint := TPA2[0];
smartImage.drawCross(WalkPoint, 5, clRed);
mouse(WalkPoint, mouse_Left);
minimap.waitPlayerMoving;
end;

What it does:

Get TPA from black color of the minimap.
Get TPA from the bitmap.
Filter useless points out of the bitmap.
Filter Black color so all what is left are those floor colors.
Sort TPA from player location and invert it.
Walk to Location.

That function is just to give you an idea, I suggest you to edit it and add failsafes.

~Home

P.S Thanks for lending an account.

P.P.S How do I logout from RS :P?

Thanks for the fast reply, I'm literally just rearranging my room and I'll attempt to add this in to the script once I'm finished! Also to log out all you have to do is press the Esc key and then log out, there is also a button just above the mini map in the top right corner :)

KeepBotting

2014-11-04 14:39:44

From: Home

P.P.S How do I logout from RS :P?


<Esc> will open the options menu, and logout button is at the bottom of said menu

Alternatively the logout button is very small, and in the top-right corner

Home

2014-11-04 14:40:28

From: tehYosh
Thanks for the fast reply, I'm literally just rearranging my room and I'll attempt to add this in to the script once I'm finished! Also to log out all you have to do is press the Esc key and then log out, there is also a button just above the mini map in the top right corner :)


Yeah I got your account out (Thank god for google).
But like I said that above function doesn't even Result anything so I highly suggest you to improve it :)

~Home